--- /srv/reproducible-results/rbuild-debian/r-b-build.hZ2IgJ0o/b1/dune-grid_2.10.0-1_amd64.changes +++ /srv/reproducible-results/rbuild-debian/r-b-build.hZ2IgJ0o/b2/dune-grid_2.10.0-1_amd64.changes ├── Files │ @@ -1,4 +1,4 @@ │ │ 4992fd90087095724f9488891daa0dcb 8169116 debug optional libdune-grid-dev-dbgsym_2.10.0-1_amd64.deb │ a35f2d0d6db2624bcf34cd3d32d4f397 1062528 libdevel optional libdune-grid-dev_2.10.0-1_amd64.deb │ - bb6cae496c69d9e32171293725da680a 7892048 doc optional libdune-grid-doc_2.10.0-1_all.deb │ + 6a908d5e53dfafb1c36de0f62e352e41 7892236 doc optional libdune-grid-doc_2.10.0-1_all.deb ├── libdune-grid-doc_2.10.0-1_all.deb │ ├── file list │ │ @@ -1,3 +1,3 @@ │ │ -rw-r--r-- 0 0 0 4 2024-11-14 20:09:51.000000 debian-binary │ │ --rw-r--r-- 0 0 0 41856 2024-11-14 20:09:51.000000 control.tar.xz │ │ --rw-r--r-- 0 0 0 7850000 2024-11-14 20:09:51.000000 data.tar.xz │ │ +-rw-r--r-- 0 0 0 41864 2024-11-14 20:09:51.000000 control.tar.xz │ │ +-rw-r--r-- 0 0 0 7850180 2024-11-14 20:09:51.000000 data.tar.xz │ ├── control.tar.xz │ │ ├── control.tar │ │ │ ├── ./md5sums │ │ │ │ ├── ./md5sums │ │ │ │ │┄ Files differ │ │ │ │ ├── line order │ │ │ │ │ @@ -1,99 +1,105 @@ │ │ │ │ │ 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/a00158.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00158_source.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00164.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00164_source.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00149.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00155.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00155_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/a00188.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00188_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/a00185.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00185_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/a00197.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00197_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00200.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00200_source.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00215.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00215_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/a00218.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00218_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/a00242.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00242_source.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00245.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00245_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/a00272.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00272_source.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00275.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00275_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/a00296.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00296_source.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00305.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00305_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/a00248.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00248_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/a00287.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00287_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/a00299.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00299_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00308.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00308_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/a00314.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00314_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/a00326.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00326_source.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00332.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00332_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/a00344.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00344_source.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00347.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00347_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/a00356.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00356_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/a00569.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00569_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/a00578.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00578_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/a00584.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00584_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/a00590.html │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00590_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/a00617.html │ │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00617_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/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 │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00626_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00629.html │ │ │ │ │ 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/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 │ │ │ │ │ @@ -109,38 +115,32 @@ │ │ │ │ │ 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/a00692_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/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/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/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/a00713_source.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 │ │ │ │ │ @@ -164,41 +164,51 @@ │ │ │ │ │ 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 │ │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00782_source.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00785.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00785_source.html │ │ │ │ │ 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 │ │ │ │ │ @@ -209,58 +219,48 @@ │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00845.html │ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00845_source.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/a00851_source.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 │ ├── data.tar.xz │ │ ├── data.tar │ │ │ ├── file list │ │ │ │ @@ -3,336 +3,336 @@ │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-11-14 20:09:51.000000 ./usr/share/ │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-11-14 20:09:51.000000 ./usr/share/doc/ │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/ │ │ │ │ -rw-r--r-- 0 root (0) root (0) 1388 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/changelog.Debian.gz │ │ │ │ -rw-r--r-- 0 root (0) root (0) 6138 2024-10-22 15:31:40.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-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5417 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00143.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 5804 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00146.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6608 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00158.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 18591 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00158_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5308 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00164.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 68408 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00164_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5195 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00167.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 31837 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00167_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6090 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00170.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 30249 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00170_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5119 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00173.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 17467 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00173_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9564 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00176.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 63476 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00176_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4798 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00188.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 16224 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00188_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13227 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00191.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 196698 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00191_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5384 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00194.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 20165 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00194_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5062 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00197.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 17472 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00197_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5198 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00200.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 23216 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00200_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6660 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00215.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 210196 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00215_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7353 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00218.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 32746 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00218_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6299 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00224.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 23401 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00224_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7012 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00230.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 103974 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00230_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 19456 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00242.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 47029 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00242_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4571 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00245.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 56512 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00245_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 10013 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00257.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 54462 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00257_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5372 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00272.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 20331 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00272_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12859 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00275.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 36323 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00275_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5745 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00281.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 24811 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00281_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8741 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00296.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 106215 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00296_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6588 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00305.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 24645 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00305_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5885 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00308.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 61145 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00308_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6339 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00335.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 65889 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00335_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4950 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00344.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7310 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00344_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5452 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00347.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 24835 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00347_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6319 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00362.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 31787 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00362_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5364 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00566.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 14555 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00566_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4938 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00569.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 20258 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00569_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8408 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00572.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 117631 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00572_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8578 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00578.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 70888 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00578_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4123 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00584.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6410 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00584_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6304 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00587.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 45976 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00587_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5297 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00599.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 22774 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00599_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6162 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00602.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 44586 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00602_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4783 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00605.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12569 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00605_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5065 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00617.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 18609 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00617_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4296 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00623.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4483 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00626.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5047 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00629.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 27135 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00629_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5592 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00632.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 65600 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00632_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4822 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00635.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 22389 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00635_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8631 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00641.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 91920 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00641_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5014 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00644.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6133 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00647.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 105401 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00647_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5241 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00650.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 28807 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00650_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 3889 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00653.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 67784 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00653_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5325 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00656.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 40677 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00656_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13661 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00659.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 30513 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00659_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6019 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00662.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 55372 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00662_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6327 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00665.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 109813 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00665_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6540 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00668.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 60301 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00668_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4918 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00671.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 35857 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00671_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8065 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00674.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 75017 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00674_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6061 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00677.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 86686 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00677_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 3889 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00680.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 128351 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00680_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9466 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00683.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 154753 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00683_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5482 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00686.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 33202 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00686_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 27808 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00689.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 144961 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00689_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5910 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00692.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 41406 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00692_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5259 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00698.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 84755 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00698_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5489 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00701.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 47803 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00701_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6561 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00704.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 206943 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00704_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5417 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00149.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5384 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00155.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 20165 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00155_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6299 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00167.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 23401 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00167_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6660 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00170.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 210196 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00170_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7353 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00173.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 32746 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00173_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6608 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00176.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 18591 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00176_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4798 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00182.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 16224 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00182_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5195 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00185.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 31837 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00185_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5308 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00191.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 68408 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00191_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5062 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00200.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 17472 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00200_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13227 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00209.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 196698 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00209_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9564 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00218.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 63476 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00218_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6090 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00224.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 30249 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00224_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7012 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00227.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 103974 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00227_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5198 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00230.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 23216 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00230_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5119 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00233.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 17467 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00233_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8741 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00248.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 106215 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00248_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4571 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00263.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 56512 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00263_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4950 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00287.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7310 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00287_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 19456 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00293.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 47029 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00293_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5452 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00299.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 24835 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00299_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6319 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00308.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 31787 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00308_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5885 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00314.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 61145 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00314_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6339 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00323.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 65889 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00323_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5745 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00326.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 24811 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00326_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6588 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00332.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 24645 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00332_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10013 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00338.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 54462 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00338_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5372 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00344.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 20331 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00344_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12859 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00356.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 36323 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00356_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8408 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00566.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 117631 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00566_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5364 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00569.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 14555 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00569_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6304 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00572.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 45976 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00572_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4123 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00575.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6410 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00575_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4938 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00584.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 20258 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00584_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5297 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00587.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 22774 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00587_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8578 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00590.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 70888 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00590_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6162 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00599.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 44586 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00599_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4783 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00608.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12569 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00608_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6540 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00614.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 60301 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00614_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 3889 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00620.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 128351 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00620_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9466 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00623.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 154753 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00623_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5065 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00626.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 18609 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00626_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6133 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00629.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 105401 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00629_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4918 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00632.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 35857 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00632_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5592 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00635.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 65600 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00635_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4296 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00638.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9098 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00641.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 14878 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00641_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6019 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00644.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 55372 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00644_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7361 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00647.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 123399 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00647_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5325 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00650.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 40677 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00650_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 27808 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00653.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 144961 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00653_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5910 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00656.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 41406 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00656_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4822 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00659.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 22389 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00659_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6561 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00662.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 206943 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00662_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5241 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00665.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 28807 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00665_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6061 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00668.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 86686 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00668_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6327 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00671.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 109813 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00671_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5482 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00674.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 33202 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00674_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8631 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00677.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 91920 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00677_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4483 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00680.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5047 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00683.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 27135 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00683_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13661 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00686.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 30513 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00686_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5259 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00689.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 84755 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00689_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 3889 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00692.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 67784 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00692_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8065 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00695.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 75017 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00695_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5245 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00701.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 28783 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00701_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 4935 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00707.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5245 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00710.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 28783 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00710_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9098 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00713.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 14878 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00713_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5952 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00716.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 107207 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00716_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7361 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00719.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 123399 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00719_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5952 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00710.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 107207 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00710_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5014 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00713.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5489 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00716.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 47803 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00716_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 3856 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00722.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 6306 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00722_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 5175 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00725.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 8053 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00725_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 3639 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00728.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 5090 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00728_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 7064 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00731.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 115969 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00731_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 5204 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00734.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 32991 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00734_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5313 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00737.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 15635 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00737_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5261 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00740.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 17909 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00740_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6249 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00743.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 75964 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00743_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6397 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00746.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 30301 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00746_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5266 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00749.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 17733 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00749_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5776 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00752.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 97542 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00752_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5266 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00737.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 17733 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00737_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5313 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00740.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 15635 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00740_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5776 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00743.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 97542 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00743_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6249 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00746.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 75964 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00746_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6397 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00749.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 30301 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00749_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6009 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00752.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 67469 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00752_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 5365 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00755.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 17747 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00755_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6009 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00758.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 67469 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00758_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4772 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00761.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21272 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00761_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5074 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00764.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7072 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00764_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4796 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00767.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5678 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00770.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 20081 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00770_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5391 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00773.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 18251 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00773_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4760 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00776.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4769 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00779.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 10389 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00782.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5408 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00785.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 22811 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00785_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6144 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00788.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 67657 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00788_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4763 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00791.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6877 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00794.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 30016 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00794_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4766 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00797.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4778 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00800.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5418 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00803.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 14732 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00803_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5421 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00806.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 16723 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00806_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4766 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00809.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5670 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00812.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 29281 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00812_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5366 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00815.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12764 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00815_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4796 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00818.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4757 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00821.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5421 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00824.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 15609 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00824_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6510 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00827.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 38495 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00827_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5484 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00830.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 16905 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00830_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4778 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00833.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4754 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00836.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4784 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00839.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6378 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00842.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 27387 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00842_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5456 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00845.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 15221 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00845_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5052 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00848.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 19581 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00848_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5608 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00851.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 46922 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00851_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7173 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00854.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 181939 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00854_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4587 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00857.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 33394 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00857_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5595 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00860.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 32468 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00860_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4792 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00863.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6206 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00866.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 83435 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00866_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6562 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00869.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 56957 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00869_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5875 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00872.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 50352 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00872_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5726 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00875.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 49714 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00875_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7291 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00878.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 63572 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00878_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6381 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00881.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6652 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00884.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5427 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00887.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 35447 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00887_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8072 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00890.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 109305 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00890_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6754 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00893.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 24439 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00893_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4391 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00896.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7040 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00896_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9680 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00899.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 93782 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00899_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6275 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00902.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 22623 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00902_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5461 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00905.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 19623 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00905_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5404 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00908.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 16804 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00908_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7113 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00911.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 52835 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00911_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6045 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00914.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 49270 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00914_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5727 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00917.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 59108 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00917_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 11343 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00920.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 295358 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00920_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5575 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00923.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 20603 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00923_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5652 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00926.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 25022 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00926_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5609 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00929.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 34859 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00929_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 18467 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00932.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 70982 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00932_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6100 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00935.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 90426 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00935_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6970 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00938.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 53202 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00938_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5774 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00941.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 26813 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00941_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5594 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00944.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 20372 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00944_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5925 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00947.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 75092 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00947_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9038 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00950.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 93744 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00950_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5629 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00953.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 35212 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00953_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5680 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00956.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 31397 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00956_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7166 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00959.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 37020 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00959_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5560 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00962.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 44058 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00962_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5775 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00965.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 39429 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00965_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5281 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00968.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 29536 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00968_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 10478 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00971.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 208931 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00971_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5261 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00758.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 17909 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00758_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 18467 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00761.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 70982 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00761_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6045 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00764.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 49270 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00764_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5925 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00767.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 75092 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00767_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6100 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00770.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 90426 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00770_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5404 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00773.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 16804 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00773_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9680 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00776.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 93782 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00776_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5774 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00779.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 26813 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00779_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5727 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00782.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 59108 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00782_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5594 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00785.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 20372 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00785_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5461 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00788.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 19623 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00788_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5575 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00791.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 20603 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00791_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 11343 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00794.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 295358 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00794_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5629 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00797.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 35212 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00797_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7113 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00800.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 52835 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00800_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6970 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00803.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 53202 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00803_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5652 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00806.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 25022 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00806_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7166 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00809.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 37020 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00809_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5680 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00812.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 31397 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00812_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5609 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00815.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 34859 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00815_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9038 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00818.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 93744 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00818_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6275 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00821.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 22623 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00821_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5560 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00824.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 44058 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00824_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5281 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00827.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 29536 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00827_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10478 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00830.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 208931 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00830_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4792 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00833.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6381 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00836.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6652 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00839.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5608 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00842.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 46922 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00842_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6206 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00845.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 83435 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00845_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5875 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00848.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 50352 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00848_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5726 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00851.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 49714 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00851_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4796 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00854.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4766 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00857.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4760 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00860.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4769 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00863.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6378 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00866.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 27387 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00866_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5391 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00869.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 18251 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00869_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5484 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00872.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 16905 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00872_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4778 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00875.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5456 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00878.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 15221 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00878_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6510 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00881.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 38495 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00881_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5366 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00884.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12764 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00884_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5678 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00887.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 20081 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00887_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4784 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00890.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4757 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00893.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10389 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00896.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5418 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00899.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 14732 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00899_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4754 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00902.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5421 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00905.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 16723 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00905_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4766 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00908.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4763 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00911.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5408 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00914.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 22811 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00914_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4778 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00917.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6144 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00920.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 67657 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00920_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4796 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00923.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5670 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00926.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 29281 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00926_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5421 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00929.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 15609 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00929_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6877 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00932.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 30016 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00932_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5595 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00935.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 32468 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00935_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7291 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00938.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 63572 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00938_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6562 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00941.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 56957 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00941_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5052 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00944.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 19581 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00944_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5427 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00947.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 35447 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00947_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8072 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00950.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 109305 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00950_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7173 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00953.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 181939 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00953_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5074 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00956.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7072 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00956_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4587 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00959.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 33394 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00959_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5775 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00962.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 39429 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00962_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4391 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00965.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7040 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00965_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4772 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00968.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21272 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00968_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6754 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00971.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 24439 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00971_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 11083 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00974.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 90537 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00974_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 21156 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00977.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 133682 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00977_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 6266 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00980.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 35094 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00980_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4859 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00983.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 28012 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00983_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5747 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00983.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 75427 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00983_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 5393 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00986.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 13064 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00986_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 3985 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00989.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7771 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00989_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5083 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00992.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 41589 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00992_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6056 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00995.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 31607 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00995_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6273 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00989.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 45890 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00989_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6975 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00992.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 72067 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00992_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4929 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00995.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 35763 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00995_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 8465 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00998.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 90164 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00998_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5747 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01001.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 75427 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01001_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6975 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01004.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 72067 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01004_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5912 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01007.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 35730 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01007_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4585 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01010.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 36098 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01010_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5796 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01013.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 15189 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01013_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6273 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01016.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 45890 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01016_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5083 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01001.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 41589 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01001_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5796 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01004.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 15189 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01004_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4585 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01007.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 36098 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01007_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 3985 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01010.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7771 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01010_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5912 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01013.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 35730 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01013_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4859 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01016.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 28012 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01016_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 6478 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01019.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 35420 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01019_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4929 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01022.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 35763 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01022_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6056 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01022.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 31607 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01022_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 16257 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01025.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 423167 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01025_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 11823 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01028.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 4145 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01029.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 3566 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01030.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 12404 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01031.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 16742 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01031.png │ │ │ │ @@ -1940,15 +1940,15 @@ │ │ │ │ -rw-r--r-- 0 root (0) root (0) 15163 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/dir_e674d52c20e1458e445f655f7f65f7ce.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 3025 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/dir_e674d52c20e1458e445f655f7f65f7ce_dep.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 4975 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/dir_e68e8157741866f444e17edd764ebbae.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 4837 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/dir_e68e8157741866f444e17edd764ebbae_dep.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 5859 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/dir_fefaa8b4cd9d9058a23d89b9cab78ebc.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 4696 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/dir_fefaa8b4cd9d9058a23d89b9cab78ebc_dep.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 45631 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/doxygen.css │ │ │ │ --rw-r--r-- 0 root (0) root (0) 218389 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/dune-grid.tag.gz │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 218399 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/dune-grid.tag.gz │ │ │ │ -rw-r--r-- 0 root (0) root (0) 7704 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/dynsections.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 1265 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/examplegrid1c.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 1949 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/examplegrid1cs.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 2042 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/examplegrid1gen.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 2422 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/examplegrid1genangle.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 2247 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/examplegrid1s.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 5575 2024-11-14 20:09:51.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: yaspgridhierarchiciterator.hh File Reference │ │ │ │ +dune-grid: structuredyaspgridfactory.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,35 +72,42 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
yaspgridhierarchiciterator.hh File Reference
│ │ │ │ +
structuredyaspgridfactory.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ +

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

│ │ │ │ +
#include <memory>
│ │ │ │ +#include <dune/grid/utility/structuredgridfactory.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::StructuredGridFactory< YaspGrid< dim, EquidistantCoordinates< ctype, dim > > >
 Specialization of the StructuredGridFactory for YaspGrid. More...
 
class  Dune::StructuredGridFactory< YaspGrid< dim, EquidistantOffsetCoordinates< ctype, dim > > >
 Specialization of the StructuredGridFactory for YaspGrid<EquidistantOffsetCoordinates> More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │

Detailed Description

│ │ │ │ -

The YaspHierarchicIterator class

│ │ │ │ -

Enables iteration over son entities of codim 0

│ │ │ │ +

Specialization of the StructuredGridFactory class for YaspGrid.

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,23 +2,30 @@ │ │ │ │ │ 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 │ │ │ │ │ +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_:_:_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_:_:_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_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -The YaspHierarchicIterator class │ │ │ │ │ -Enables iteration over son entities of codim 0 │ │ │ │ │ +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/a00167_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: yaspgridhierarchiciterator.hh Source File │ │ │ │ +dune-grid: structuredyaspgridfactory.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,181 +74,126 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
yaspgridhierarchiciterator.hh
│ │ │ │ +
structuredyaspgridfactory.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_YASPGRID_STRUCTUREDYASPGRIDFACTORY_HH
│ │ │ │ +
6#define DUNE_GRID_YASPGRID_STRUCTUREDYASPGRIDFACTORY_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;
│ │ │ │ -
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;
│ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │
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
│ │ │ │ +
70 static std::unique_ptr<GridType>
│ │ │ │ +
│ │ │ │ +
71 createSimplexGrid(const FieldVector<ctype,dimworld>&,
│ │ │ │ +
72 const FieldVector<ctype,dimworld>&,
│ │ │ │ +
73 const std::array<unsigned int,dim>&)
│ │ │ │ +
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>&,
│ │ │ │ +
121 const FieldVector<ctype,dimworld>&,
│ │ │ │ +
122 const std::array<unsigned int,dim>&)
│ │ │ │ +
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
│ │ │ │
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
│ │ │ │ -
Definition yaspgridentity.hh:242
│ │ │ │ -
YGLI _g
Definition yaspgridentity.hh:400
│ │ │ │ -
I _it
Definition yaspgridentity.hh:399
│ │ │ │ -
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
│ │ │ │ +
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:166
│ │ │ │ +
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 > &, const FieldVector< ctype, dimworld > &, const std::array< unsigned int, dim > &)
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 > &, const FieldVector< ctype, dimworld > &, const std::array< unsigned int, dim > &)
Create a structured simplex grid.
Definition structuredyaspgridfactory.hh:120
│ │ │ │ +
A class to construct structured cube and simplex grids using the grid factory.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,205 +1,148 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _y_a_s_p_g_r_i_d │ │ │ │ │ -yaspgridhierarchiciterator.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 © 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_YASPGRID_STRUCTUREDYASPGRIDFACTORY_HH │ │ │ │ │ +6#define DUNE_GRID_YASPGRID_STRUCTUREDYASPGRIDFACTORY_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; │ │ │ │ │ -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; │ │ │ │ │ +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 // 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 │ │ │ │ │ +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&, │ │ │ │ │ +72 const FieldVector&, │ │ │ │ │ +73 const std::array&) │ │ │ │ │ +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&, │ │ │ │ │ +121 const FieldVector&, │ │ │ │ │ +122 const std::array&) │ │ │ │ │ +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 │ │ │ │ │ _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_E_n_t_i_t_y │ │ │ │ │ -DDeeffiinniittiioonn yaspgridentity.hh:242 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_:_:___g │ │ │ │ │ -YGLI _g │ │ │ │ │ -DDeeffiinniittiioonn yaspgridentity.hh:400 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_:_:___i_t │ │ │ │ │ -I _it │ │ │ │ │ -DDeeffiinniittiioonn yaspgridentity.hh:399 │ │ │ │ │ -_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 │ │ │ │ │ +_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:166 │ │ │ │ │ +_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 > &, const FieldVector< ctype, dimworld > &, const std::array< │ │ │ │ │ +unsigned int, dim > &) │ │ │ │ │ +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 > &, const FieldVector< ctype, dimworld > &, const std::array< │ │ │ │ │ +unsigned int, dim > &) │ │ │ │ │ +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/a00170.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: yaspgridpersistentcontainer.hh File Reference │ │ │ │ +dune-grid: yaspgridentity.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,44 +72,52 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
yaspgridpersistentcontainer.hh File Reference
│ │ │ │ +
yaspgridentity.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Specialization of the PersistentContainer for YaspGrid. │ │ │ │ +

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

│ │ │ │ -
#include <cassert>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/grid/utility/persistentcontainer.hh>
│ │ │ │ -#include <dune/grid/utility/persistentcontainervector.hh>
│ │ │ │ -#include "../yaspgrid.hh"
│ │ │ │ +
#include <dune/common/math.hh>
│ │ │ │ +#include <dune/geometry/type.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::YaspPersistentContainerIndex< Grid >
class  Dune::YaspEntity< codim, dim, GridImp >
 
class  Dune::PersistentContainer< YaspGrid< dim, CoordCont >, T >
 Specialization of the PersistentContainer for YaspGrid. More...
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

│ │ │ │ -

Specialization of the PersistentContainer for YaspGrid.

│ │ │ │ +

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,29 +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 │ │ │ │ │ -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" │ │ │ │ │ +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_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_<_ _c_o_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_._._. │ │ │ │ │ + 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 ********** │ │ │ │ │ -Specialization of the PersistentContainer for YaspGrid. │ │ │ │ │ +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/a00170_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: yaspgridpersistentcontainer.hh Source File │ │ │ │ +dune-grid: yaspgridentity.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,153 +74,1064 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
yaspgridpersistentcontainer.hh
│ │ │ │ +
yaspgridentity.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_YASPGRIDENTITY_HH
│ │ │ │ +
6#define DUNE_GRID_YASPGRIDENTITY_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 {
│ │ │ │ +
8#include <dune/common/math.hh>
│ │ │ │ +
9#include <dune/geometry/type.hh>
│ │ │ │ +
10
│ │ │ │ +
24//========================================================================
│ │ │ │ +
25
│ │ │ │ +
26
│ │ │ │ +
27
│ │ │ │ +
28
│ │ │ │ +
29namespace Dune {
│ │ │ │ +
30
│ │ │ │ +
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 private:
│ │ │ │ +
47 // prevent construction
│ │ │ │ +
48 BinomialTable() = delete;
│ │ │ │ +
49
│ │ │ │ +
50 // compute binomial(r, c) and advance row `r` and column `c`
│ │ │ │ +
51 static constexpr int nextValue(int& r, int& c)
│ │ │ │ +
52 {
│ │ │ │ +
53 const auto result = Dune::binomial(r, c);
│ │ │ │ +
54
│ │ │ │ +
55 c += 1;
│ │ │ │ +
56 if (c > r) {
│ │ │ │ +
57 r += 1;
│ │ │ │ +
58 c = 0;
│ │ │ │ +
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 {
│ │ │ │ - │ │ │ │ - │ │ │ │ +
61 return result;
│ │ │ │ +
62 }
│ │ │ │ +
63
│ │ │ │ +
64 template<std::size_t... I>
│ │ │ │ +
65 static constexpr std::array<int, sizeof...(I)> computeValues(std::index_sequence<I...>)
│ │ │ │ +
66 {
│ │ │ │ +
67 int r = 0, c = 0;
│ │ │ │ +
68 return {{ ((void)I, nextValue(r, c))... }};
│ │ │ │ +
69 }
│ │ │ │ +
70
│ │ │ │ +
71 template<std::size_t... I>
│ │ │ │ +
72 static constexpr std::array<int, sizeof...(I)> computeOffsets(std::index_sequence<I...>)
│ │ │ │ +
73 { return {{ (I*(I+1)/2)... }}; }
│ │ │ │ +
74
│ │ │ │ +
75 static constexpr std::array<int,(n+1)*(n+2)/2> _values = computeValues(std::make_index_sequence<(n+1)*(n+2)/2>{});
│ │ │ │ +
76 static constexpr std::array<int,n+1> _offsets = computeOffsets(std::make_index_sequence<n+1>{});
│ │ │ │ +
77 };
│ │ │ │ +
78
│ │ │ │ +
85 template<int dimworld>
│ │ │ │ +
86 constexpr int subEnt(int d, int c)
│ │ │ │ +
87 {
│ │ │ │ +
88 return (d < c ? 0 : BinomialTable<dimworld>::evaluate(d,c) << c);
│ │ │ │ +
89 }
│ │ │ │ +
90
│ │ │ │ +
91 // Make a table mapping all subentities of a codim 0 entity to a value.
│ │ │ │ +
92 // F is the functor to be evaluated.
│ │ │ │ +
93 template<typename F, int dim>
│ │ │ │ +
94 struct EntityShiftTable
│ │ │ │ +
95 {
│ │ │ │ +
96 typedef std::bitset<dim> value_type;
│ │ │ │ +
97
│ │ │ │ +
98 static value_type evaluate(int i, int codim)
│ │ │ │ +
99 {
│ │ │ │ +
100 return {_values[_offsets[codim] + i]};
│ │ │ │ +
101 }
│ │ │ │ +
102
│ │ │ │ +
103 private:
│ │ │ │ +
104
│ │ │ │ +
105 // prevent construction
│ │ │ │ +
106 EntityShiftTable() = delete;
│ │ │ │
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 {}
│ │ │ │ +
108 // compute offset of codimension `codim` entities and advance `offset`
│ │ │ │ +
109 static constexpr int nextOffset(int& offset, int codim)
│ │ │ │ +
110 {
│ │ │ │ +
111 if (codim == 0) {
│ │ │ │ +
112 offset = 0;
│ │ │ │ +
113 return 0;
│ │ │ │ +
114 }
│ │ │ │ +
115
│ │ │ │ +
116 offset += subEnt<dim>(dim, codim-1);
│ │ │ │ +
117 return offset;
│ │ │ │ +
118 }
│ │ │ │ +
119
│ │ │ │ +
120 template<std::size_t... I>
│ │ │ │ +
121 static constexpr std::array<int, sizeof...(I)> computeOffsets(std::index_sequence<I...>)
│ │ │ │ +
122 {
│ │ │ │ +
123 int offset = 0;
│ │ │ │ +
124 return {{ (nextOffset(offset, I))... }};
│ │ │ │ +
125 }
│ │ │ │ +
126
│ │ │ │ +
127 // compute shift table entry for (`codim`, `i`) and advance `codim`, `i`
│ │ │ │ +
128 static constexpr unsigned char nextValue(int& codim, int& i)
│ │ │ │ +
129 {
│ │ │ │ +
130 const auto result = F::evaluate(i, codim);
│ │ │ │ +
131
│ │ │ │ +
132 i += 1;
│ │ │ │ +
133 if (i >= subEnt<dim>(dim, codim)) {
│ │ │ │ +
134 codim += 1;
│ │ │ │ +
135 i = 0;
│ │ │ │ +
136 }
│ │ │ │ +
137
│ │ │ │ +
138 return result;
│ │ │ │ +
139 }
│ │ │ │ +
140
│ │ │ │ +
141 template<std::size_t... I>
│ │ │ │ +
142 static constexpr std::array<unsigned char, sizeof...(I)> computeValues(std::index_sequence<I...>)
│ │ │ │ +
143 {
│ │ │ │ +
144 int codim = 0, i = 0;
│ │ │ │ +
145 return {{ ((void)I, nextValue(codim, i))... }};
│ │ │ │ +
146 }
│ │ │ │ +
147
│ │ │ │ +
148 static constexpr std::array<int,dim+1> _offsets = computeOffsets(std::make_index_sequence<dim+1>{});
│ │ │ │ +
149 static constexpr std::array<unsigned char,Dune::power(3,dim)> _values = computeValues(std::make_index_sequence<Dune::power(3,dim)>{});
│ │ │ │ +
150
│ │ │ │ +
151 };
│ │ │ │ +
152
│ │ │ │ +
153 // functor for doing the actual entity shift calculation
│ │ │ │ +
154 template<int dim>
│ │ │ │ +
155 struct calculate_entity_shift
│ │ │ │ +
156 {
│ │ │ │ +
157 static constexpr unsigned long long evaluate(int index, int cc)
│ │ │ │ +
158 {
│ │ │ │ +
159 auto result = 0ull;
│ │ │ │ +
160 for (int d = dim; d>0; d--)
│ │ │ │ +
161 {
│ │ │ │ +
162 if (cc == d)
│ │ │ │ +
163 return result;
│ │ │ │ +
164 if (index < subEnt<dim>(d-1,cc))
│ │ │ │ +
165 result |= 1ull << (d-1);
│ │ │ │ +
166 else
│ │ │ │ +
167 {
│ │ │ │ +
168 index = (index - subEnt<dim>(d-1, cc)) % subEnt<dim>(d-1,cc-1);
│ │ │ │ +
169 cc--;
│ │ │ │ +
170 }
│ │ │ │ +
171 }
│ │ │ │ +
172 return result;
│ │ │ │ +
173 }
│ │ │ │ +
174 };
│ │ │ │ +
175
│ │ │ │ +
184 template<int dim>
│ │ │ │ +
185 std::bitset<dim> entityShift(int index, int cc)
│ │ │ │ +
186 {
│ │ │ │ +
187 return EntityShiftTable<calculate_entity_shift<dim>,dim>::evaluate(index,cc);
│ │ │ │ +
188 }
│ │ │ │ +
189
│ │ │ │ +
190 // functor for doing the actual entity move calculation
│ │ │ │ +
191 template<int dim>
│ │ │ │ +
192 struct calculate_entity_move
│ │ │ │ +
193 {
│ │ │ │ +
194 static constexpr unsigned long long evaluate(int index, int cc)
│ │ │ │ +
195 {
│ │ │ │ +
196 auto result = 0ull;
│ │ │ │ +
197 for (int d = dim; d>0; d--)
│ │ │ │ +
198 {
│ │ │ │ +
199 if (d == cc)
│ │ │ │ +
200 {
│ │ │ │ +
201 // result[d-1] = index & (1<<(d-1));
│ │ │ │ +
202 result &= ~(1ull << (d-1));
│ │ │ │ +
203 result |= index & (1ull << (d-1));
│ │ │ │ +
204
│ │ │ │ +
205 index &= ~(1<<(d-1));
│ │ │ │ +
206 }
│ │ │ │ +
207 if (index >= subEnt<dim>(d-1,cc))
│ │ │ │ +
208 {
│ │ │ │ +
209 if ((index - subEnt<dim>(d-1,cc)) / subEnt<dim>(d-1,cc-1) == 1)
│ │ │ │ +
210 {
│ │ │ │ +
211 result |= 1ull << (d-1);
│ │ │ │ +
212 }
│ │ │ │ +
213 index = (index - subEnt<dim>(d-1, cc)) % subEnt<dim>(d-1,cc-1);
│ │ │ │ +
214 cc--;
│ │ │ │ +
215 }
│ │ │ │ +
216 }
│ │ │ │ +
217 return result;
│ │ │ │ +
218 }
│ │ │ │ +
219
│ │ │ │ +
220 };
│ │ │ │ +
221
│ │ │ │ +
229 template<int dim>
│ │ │ │ +
230 std::bitset<dim> entityMove(int index, int cc)
│ │ │ │ +
231 {
│ │ │ │ +
232 return EntityShiftTable<calculate_entity_move<dim>,dim>::evaluate(index,cc);
│ │ │ │ +
233 }
│ │ │ │ +
234
│ │ │ │ +
235#endif //DOXYGEN
│ │ │ │ +
236
│ │ │ │ +
237 } // namespace Yasp.
│ │ │ │ +
238
│ │ │ │ +
239 template<int codim, int dim, class GridImp>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
241 : public EntityDefaultImplementation <codim,dim,GridImp,YaspEntity>
│ │ │ │ +
242 {
│ │ │ │ +
243
│ │ │ │ +
244 template<int, PartitionIteratorType, typename>
│ │ │ │ +
245 friend class YaspLevelIterator;
│ │ │ │ +
246
│ │ │ │ +
247 public:
│ │ │ │ +
248 typedef typename GridImp::ctype ctype;
│ │ │ │ +
249
│ │ │ │ +
250 typedef typename GridImp::template Codim<codim>::Geometry Geometry;
│ │ │ │ +
251 typedef typename GridImp::Traits::template Codim<codim>::GeometryImpl GeometryImpl;
│ │ │ │ +
252
│ │ │ │ +
253 typedef typename GridImp::template Codim<codim>::EntitySeed EntitySeed;
│ │ │ │ +
254
│ │ │ │ +
│ │ │ │ +
256 int level () const
│ │ │ │ +
257 {
│ │ │ │ +
258 return _g->level();
│ │ │ │ +
259 }
│ │ │ │
│ │ │ │ -
118 };
│ │ │ │ +
260
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
265 {
│ │ │ │ +
266 return EntitySeed(YaspEntitySeed<codim,GridImp>(_g->level(), _it.coord(), _it.which()));
│ │ │ │ +
267 }
│ │ │ │
│ │ │ │ -
119
│ │ │ │ -
120} // end namespace Dune
│ │ │ │ -
121
│ │ │ │ -
122#endif // end DUNE_GRID_YASPGRIDPERSISTENTCONTAINER_HH
│ │ │ │ - │ │ │ │ +
268
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
271 {
│ │ │ │ +
272 GeometryImpl _geometry(_it.lowerleft(),_it.upperright(),_it.shift());
│ │ │ │ +
273 return Geometry(_geometry);
│ │ │ │ +
274 }
│ │ │ │ +
│ │ │ │ +
275
│ │ │ │ +
│ │ │ │ +
279 constexpr GeometryType type () const
│ │ │ │ +
280 {
│ │ │ │ +
281 return GeometryTypes::cube(Geometry::mydimension);
│ │ │ │ +
282 }
│ │ │ │ +
│ │ │ │ +
283
│ │ │ │ +
│ │ │ │ +
288 unsigned int subEntities (unsigned int cc) const
│ │ │ │ +
289 {
│ │ │ │ +
290 return Dune::Yasp::subEnt<dim>(dim-codim,cc-codim);
│ │ │ │ +
291 }
│ │ │ │ +
│ │ │ │ +
292
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
295 {
│ │ │ │ +
296 if (_g->interior[codim].inside(_it.coord(),_it.shift()))
│ │ │ │ +
297 return InteriorEntity;
│ │ │ │ +
298 if (_g->interiorborder[codim].inside(_it.coord(),_it.shift()))
│ │ │ │ +
299 return BorderEntity;
│ │ │ │ +
300 if (_g->overlap[codim].inside(_it.coord(),_it.shift()))
│ │ │ │ +
301 return OverlapEntity;
│ │ │ │ +
302 if (_g->overlapfront[codim].inside(_it.coord(),_it.shift()))
│ │ │ │ +
303 return FrontEntity;
│ │ │ │ +
304 return GhostEntity;
│ │ │ │ +
305 }
│ │ │ │ +
│ │ │ │ +
306
│ │ │ │ +
307 typedef typename GridImp::YGridLevelIterator YGLI;
│ │ │ │ +
308 typedef typename GridImp::YGrid::Iterator I;
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
310 {}
│ │ │ │ +
│ │ │ │ +
311
│ │ │ │ +
│ │ │ │ +
312 YaspEntity (const YGLI& g, const I& it)
│ │ │ │ +
313 : _it(it), _g(g)
│ │ │ │ +
314 {}
│ │ │ │ +
│ │ │ │ +
315
│ │ │ │ +
│ │ │ │ +
316 YaspEntity (YGLI&& g, const I&& it)
│ │ │ │ +
317 : _it(std::move(it)), _g(std::move(g))
│ │ │ │ +
318 {}
│ │ │ │ +
│ │ │ │ +
319
│ │ │ │ +
321 bool equals (const YaspEntity& e) const
│ │ │ │ +
322 {
│ │ │ │ +
323 return _it == e._it && _g == e._g;
│ │ │ │ +
324 }
│ │ │ │ +
325
│ │ │ │ +
326 // IndexSets needs access to the private index methods
│ │ │ │ +
327 friend class Dune::YaspIndexSet<GridImp,true>;
│ │ │ │ +
328 friend class Dune::YaspIndexSet<GridImp,false>;
│ │ │ │ +
329 friend class Dune::YaspGlobalIdSet<GridImp>;
│ │ │ │ +
330 typedef typename GridImp::PersistentIndexType PersistentIndexType;
│ │ │ │ +
331
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
334 {
│ │ │ │ +
335 // get size of global grid (in elements)
│ │ │ │ +
336 std::array<int,dim> size;
│ │ │ │ +
337
│ │ │ │ +
338 for (int i=0; i<dim; i++)
│ │ │ │ +
339 {
│ │ │ │ +
340 // correct size according to shift
│ │ │ │ +
341 size[i] = _g->mg->levelSize(_g->level(), i);
│ │ │ │ +
342 if (!_it.shift(i))
│ │ │ │ +
343 size[i]++;
│ │ │ │ +
344 }
│ │ │ │ +
345
│ │ │ │ +
346 // encode codim
│ │ │ │ +
347 PersistentIndexType id(_it.shift().to_ulong());
│ │ │ │ +
348
│ │ │ │ +
349 // encode level
│ │ │ │ +
350 id = id << yaspgrid_level_bits;
│ │ │ │ +
351 id = id+PersistentIndexType(_g->level());
│ │ │ │ +
352
│ │ │ │ +
353 // encode coordinates
│ │ │ │ +
354 for (int i=dim-1; i>=0; i--)
│ │ │ │ +
355 {
│ │ │ │ +
356 id = id << yaspgrid_dim_bits;
│ │ │ │ +
357 id = id+PersistentIndexType(_it.coord(i));
│ │ │ │ +
358 }
│ │ │ │ +
359
│ │ │ │ +
360 return id;
│ │ │ │ +
361 }
│ │ │ │ +
│ │ │ │ +
362
│ │ │ │ +
│ │ │ │ +
364 int compressedIndex () const
│ │ │ │ +
365 {
│ │ │ │ +
366 return _it.superindex();
│ │ │ │ +
367 }
│ │ │ │ +
│ │ │ │ +
368
│ │ │ │ +
│ │ │ │ +
370 int subCompressedIndex (int i, unsigned int cc) const
│ │ │ │ +
371 {
│ │ │ │ +
372 // get the shift of the entity and the subentity
│ │ │ │ +
373 // the subentity shift is only available in the space spanned by the entity
│ │ │ │ +
374 std::bitset<dim-codim> subent_shift = Dune::Yasp::entityShift<dim-codim>(i,cc-codim);
│ │ │ │ +
375 std::bitset<dim-codim> subent_move = Dune::Yasp::entityMove<dim-codim>(i,cc-codim);
│ │ │ │ +
376
│ │ │ │ +
377 std::bitset<dim> shift = _it.shift();
│ │ │ │ +
378 std::array<int, dim> coord = _it.coord();
│ │ │ │ +
379 for (int j=0, k=0; j<dim; j++)
│ │ │ │ +
380 {
│ │ │ │ +
381 if (!shift[j])
│ │ │ │ +
382 continue;
│ │ │ │ +
383
│ │ │ │ +
384 coord[j] += subent_move[k];
│ │ │ │ +
385 shift[j] = subent_shift[k];
│ │ │ │ +
386 k++;
│ │ │ │ +
387 }
│ │ │ │ +
388
│ │ │ │ +
389 int which = _g->overlapfront[cc].shiftmapping(shift);
│ │ │ │ +
390 return _g->overlapfront[cc].superindex(coord,which);
│ │ │ │ +
391 }
│ │ │ │ +
│ │ │ │ +
392 public:
│ │ │ │ +
393 const I& transformingsubiterator() const { return _it; }
│ │ │ │ +
394 const YGLI& gridlevel() const { return _g; }
│ │ │ │ + │ │ │ │ +
396 YGLI& gridlevel() { return _g; }
│ │ │ │ +
397 const GridImp * yaspgrid() const { return _g->mg; }
│ │ │ │ +
398 protected:
│ │ │ │ +
399 I _it = {}; // position in the grid level
│ │ │ │ +
400 YGLI _g = {}; // access to grid level
│ │ │ │ +
401 };
│ │ │ │ +
│ │ │ │ +
402
│ │ │ │ +
403
│ │ │ │ +
404 // specialization for codim=0
│ │ │ │ +
405 template<int dim, class GridImp>
│ │ │ │ +
│ │ │ │ +
406 class YaspEntity<0,dim,GridImp>
│ │ │ │ +
407 : public EntityDefaultImplementation <0,dim,GridImp,YaspEntity>
│ │ │ │ +
408 {
│ │ │ │ +
409 constexpr static int dimworld = GridImp::dimensionworld;
│ │ │ │ +
410
│ │ │ │ +
411 typedef typename GridImp::Traits::template Codim< 0 >::GeometryImpl GeometryImpl;
│ │ │ │ +
412
│ │ │ │ +
413 template<int, PartitionIteratorType, typename>
│ │ │ │ +
414 friend class YaspLevelIterator;
│ │ │ │ +
415
│ │ │ │ +
416 template<typename>
│ │ │ │ + │ │ │ │ +
418
│ │ │ │ +
419 public:
│ │ │ │ +
420 typedef typename GridImp::ctype ctype;
│ │ │ │ +
421
│ │ │ │ +
422 typedef typename GridImp::YGridLevelIterator YGLI;
│ │ │ │ +
423 typedef typename GridImp::YGrid::Iterator I;
│ │ │ │ +
424
│ │ │ │ +
425 typedef typename GridImp::template Codim< 0 >::Geometry Geometry;
│ │ │ │ +
426 typedef typename GridImp::template Codim< 0 >::LocalGeometry LocalGeometry;
│ │ │ │ +
427
│ │ │ │ +
428 template <int cd>
│ │ │ │ +
│ │ │ │ +
429 struct Codim
│ │ │ │ +
430 {
│ │ │ │ +
431 typedef typename GridImp::template Codim<cd>::Entity Entity;
│ │ │ │ +
432 };
│ │ │ │ +
│ │ │ │ +
433
│ │ │ │ +
434 typedef typename GridImp::template Codim<0>::Entity Entity;
│ │ │ │ +
435 typedef typename GridImp::template Codim<0>::EntitySeed EntitySeed;
│ │ │ │ +
436 typedef typename GridImp::LevelIntersectionIterator IntersectionIterator;
│ │ │ │ +
437 typedef typename GridImp::LevelIntersectionIterator LevelIntersectionIterator;
│ │ │ │ +
438 typedef typename GridImp::LeafIntersectionIterator LeafIntersectionIterator;
│ │ │ │ +
439 typedef typename GridImp::HierarchicIterator HierarchicIterator;
│ │ │ │ +
440
│ │ │ │ +
442 typedef typename GridImp::PersistentIndexType PersistentIndexType;
│ │ │ │ +
443
│ │ │ │ +
445 typedef typename GridImp::YGrid::iTupel iTupel;
│ │ │ │ +
446
│ │ │ │ +
447 // constructor
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
449 {}
│ │ │ │ +
│ │ │ │ +
450
│ │ │ │ +
│ │ │ │ +
451 YaspEntity (const YGLI& g, const I& it)
│ │ │ │ +
452 : _it(it), _g(g)
│ │ │ │ +
453 {}
│ │ │ │ +
│ │ │ │ +
454
│ │ │ │ +
│ │ │ │ +
455 YaspEntity (const YGLI& g, I&& it)
│ │ │ │ +
456 : _it(std::move(it)), _g(g)
│ │ │ │ +
457 {}
│ │ │ │ +
│ │ │ │ +
458
│ │ │ │ +
│ │ │ │ +
459 YaspEntity (YGLI&& g, I&& it)
│ │ │ │ +
460 : _it(std::move(it)), _g(std::move(g))
│ │ │ │ +
461 {}
│ │ │ │ +
│ │ │ │ +
462
│ │ │ │ +
│ │ │ │ +
464 bool equals (const YaspEntity& e) const
│ │ │ │ +
465 {
│ │ │ │ +
466 return _it == e._it && _g == e._g;
│ │ │ │ +
467 }
│ │ │ │ +
│ │ │ │ +
468
│ │ │ │ +
470 int level () const { return _g->level(); }
│ │ │ │ +
471
│ │ │ │ +
│ │ │ │ +
475 EntitySeed seed () const {
│ │ │ │ +
476 return EntitySeed(YaspEntitySeed<0,GridImp>(_g->level(), _it.coord()));
│ │ │ │ +
477 }
│ │ │ │ +
│ │ │ │ +
478
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
481 {
│ │ │ │ +
482 if (_g->interior[0].inside(_it.coord(),_it.shift()))
│ │ │ │ +
483 return InteriorEntity;
│ │ │ │ +
484 if (_g->overlap[0].inside(_it.coord(),_it.shift()))
│ │ │ │ +
485 return OverlapEntity;
│ │ │ │ +
486 DUNE_THROW(GridError, "Impossible GhostEntity");
│ │ │ │ +
487 return GhostEntity;
│ │ │ │ +
488 }
│ │ │ │ +
│ │ │ │ +
489
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
492 // the element geometry
│ │ │ │ +
493 auto ll = _it.lowerleft();
│ │ │ │ +
494 auto ur = _it.upperright();
│ │ │ │ +
495
│ │ │ │ +
496 // If on periodic overlap, transform coordinates by domain size
│ │ │ │ +
497 for (int i=0; i<dimworld; i++) {
│ │ │ │ +
498 if (gridlevel()->mg->isPeriodic(i)) {
│ │ │ │ +
499 int coord = transformingsubiterator().coord(i);
│ │ │ │ +
500 if (coord < 0) {
│ │ │ │ +
501 auto size = _g->mg->domainSize()[i];
│ │ │ │ +
502 ll[i] += size;
│ │ │ │ +
503 ur[i] += size;
│ │ │ │ +
504 } else if (coord + 1 > gridlevel()->mg->levelSize(gridlevel()->level(),i)) {
│ │ │ │ +
505 auto size = _g->mg->domainSize()[i];
│ │ │ │ +
506 ll[i] -= size;
│ │ │ │ +
507 ur[i] -= size;
│ │ │ │ +
508 }
│ │ │ │ +
509 }
│ │ │ │ +
510 }
│ │ │ │ +
511
│ │ │ │ +
512 GeometryImpl _geometry(ll,ur);
│ │ │ │ +
513 return Geometry( _geometry );
│ │ │ │ +
514 }
│ │ │ │ +
│ │ │ │ +
515
│ │ │ │ +
│ │ │ │ +
519 constexpr GeometryType type () const
│ │ │ │ +
520 {
│ │ │ │ +
521 return GeometryTypes::cube(Geometry::mydimension);
│ │ │ │ +
522 }
│ │ │ │ +
│ │ │ │ +
523
│ │ │ │ +
│ │ │ │ +
528 template<int cc> int count () const
│ │ │ │ +
529 {
│ │ │ │ +
530 return Dune::Yasp::subEnt<dim>(dim,cc);
│ │ │ │ +
531 }
│ │ │ │ +
│ │ │ │ +
532
│ │ │ │ +
│ │ │ │ +
537 unsigned int subEntities (unsigned int codim) const
│ │ │ │ +
538 {
│ │ │ │ +
539 return Dune::Yasp::subEnt<dim>(dim,codim);
│ │ │ │ +
540 }
│ │ │ │ +
│ │ │ │ +
541
│ │ │ │ +
544 template<int cc>
│ │ │ │ +
│ │ │ │ +
545 typename Codim<cc>::Entity subEntity (int i) const
│ │ │ │ +
546 {
│ │ │ │ +
547 // calculate move bitset
│ │ │ │ +
548 std::bitset<dim> move = Dune::Yasp::entityMove<dim>(i,cc);
│ │ │ │ +
549
│ │ │ │ +
550 // get the coordinate and modify it
│ │ │ │ +
551 iTupel coord = _it.coord();
│ │ │ │ +
552 for (int j=0; j<dim; j++)
│ │ │ │ +
553 if (move[j])
│ │ │ │ +
554 coord[j]++;
│ │ │ │ +
555
│ │ │ │ +
556 int which = _g->overlapfront[cc].shiftmapping(Dune::Yasp::entityShift<dim>(i,cc));
│ │ │ │ +
557 return typename Codim<cc>::Entity(YaspEntity<cc,GridImp::dimension,GridImp>(_g,_g->overlapfront[cc].begin(coord, which)));
│ │ │ │ +
558 }
│ │ │ │ +
│ │ │ │ +
559
│ │ │ │ +
│ │ │ │ +
561 Entity father () const
│ │ │ │ +
562 {
│ │ │ │ +
563 // check if coarse level exists
│ │ │ │ +
564 if (_g->level()<=0)
│ │ │ │ +
565 DUNE_THROW(GridError, "tried to call father on level 0");
│ │ │ │ +
566
│ │ │ │ +
567 // yes, get iterator to it
│ │ │ │ +
568 YGLI cg(_g);
│ │ │ │ +
569 --cg;
│ │ │ │ +
570
│ │ │ │ +
571 // coordinates of the cell
│ │ │ │ +
572 iTupel coord = _it.coord();
│ │ │ │ +
573
│ │ │ │ +
574 // get coordinates on next coarser level
│ │ │ │ +
575 for (int k=0; k<dim; k++) coord[k] = coord[k]/2;
│ │ │ │ +
576
│ │ │ │ +
577 return Entity(YaspEntity<0,GridImp::dimension,GridImp>(cg,cg->overlap[0].begin(coord)));
│ │ │ │ +
578 }
│ │ │ │ +
│ │ │ │ +
579
│ │ │ │ +
│ │ │ │ +
581 bool hasFather () const
│ │ │ │ +
582 {
│ │ │ │ +
583 return (_g->level()>0);
│ │ │ │ +
584 }
│ │ │ │ +
│ │ │ │ +
585
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
589 {
│ │ │ │ +
590 // configure one of the 2^dim transformations
│ │ │ │ +
591 FieldVector<ctype,dim> ll(0.0),ur(0.5);
│ │ │ │ +
592
│ │ │ │ +
593 for (int k=0; k<dim; k++)
│ │ │ │ +
594 {
│ │ │ │ +
595 if (_it.coord(k)%2)
│ │ │ │ +
596 {
│ │ │ │ +
597 ll[k] = 0.5;
│ │ │ │ +
598 ur[k] = 1.0;
│ │ │ │ +
599 }
│ │ │ │ +
600 }
│ │ │ │ +
601
│ │ │ │ + │ │ │ │ +
603 }
│ │ │ │ +
│ │ │ │ +
604
│ │ │ │ +
605 const I& transformingsubiterator () const { return _it; }
│ │ │ │ +
606 const YGLI& gridlevel () const { return _g; }
│ │ │ │ + │ │ │ │ +
608 YGLI& gridlevel() { return _g; }
│ │ │ │ +
609 const GridImp* yaspgrid () const { return _g->mg; }
│ │ │ │ +
610
│ │ │ │ +
│ │ │ │ +
611 bool isLeaf() const
│ │ │ │ +
612 {
│ │ │ │ +
613 return (_g->level() == yaspgrid()->maxLevel());
│ │ │ │ +
614 }
│ │ │ │ +
│ │ │ │ +
615
│ │ │ │ +
618 bool isNew () const { return yaspgrid()->adaptRefCount > 0 && yaspgrid()->maxLevel() < _g->level() + yaspgrid()->adaptRefCount; }
│ │ │ │ +
619
│ │ │ │ +
622 bool mightVanish () const { return false; }
│ │ │ │ +
623
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
626 {
│ │ │ │ +
627 return YaspIntersectionIterator<GridImp>(*this,false);
│ │ │ │ +
628 }
│ │ │ │ +
│ │ │ │ +
629
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
632 {
│ │ │ │ +
633 // only if entity is leaf this iterator delivers intersections
│ │ │ │ +
634 return YaspIntersectionIterator<GridImp>(*this, ! isLeaf() );
│ │ │ │ +
635 }
│ │ │ │ +
│ │ │ │ +
636
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
639 {
│ │ │ │ +
640 return ibegin();
│ │ │ │ +
641 }
│ │ │ │ +
│ │ │ │ +
642
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
645 {
│ │ │ │ +
646 return YaspIntersectionIterator<GridImp>(*this,true);
│ │ │ │ +
647 }
│ │ │ │ +
│ │ │ │ +
648
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
651 {
│ │ │ │ +
652 return iend();
│ │ │ │ +
653 }
│ │ │ │ +
│ │ │ │ +
654
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
657 {
│ │ │ │ +
658 return iend();
│ │ │ │ +
659 }
│ │ │ │ +
│ │ │ │ +
660
│ │ │ │ +
│ │ │ │ +
665 HierarchicIterator hbegin (int maxlevel) const
│ │ │ │ +
666 {
│ │ │ │ +
667 return YaspHierarchicIterator<GridImp>(_g,_it,maxlevel);
│ │ │ │ +
668 }
│ │ │ │ +
│ │ │ │ +
669
│ │ │ │ +
671 HierarchicIterator hend (int /* maxlevel */) const
│ │ │ │ +
672 {
│ │ │ │ +
673 return YaspHierarchicIterator<GridImp>(_g,_it,_g->level());
│ │ │ │ +
674 }
│ │ │ │ +
675
│ │ │ │ +
676 private:
│ │ │ │ +
677 // IndexSets needs access to the private index methods
│ │ │ │ +
678 friend class Dune::YaspIndexSet<GridImp,true>;
│ │ │ │ +
679 friend class Dune::YaspIndexSet<GridImp,false>;
│ │ │ │ +
680 friend class Dune::YaspGlobalIdSet<GridImp>;
│ │ │ │ +
681
│ │ │ │ + │ │ │ │ +
684 {
│ │ │ │ +
685 // encode codim
│ │ │ │ +
686 PersistentIndexType id(_it.shift().to_ulong());
│ │ │ │ +
687
│ │ │ │ +
688 // encode level
│ │ │ │ +
689 id = id << yaspgrid_level_bits;
│ │ │ │ +
690 id = id+PersistentIndexType(_g->level());
│ │ │ │ +
691
│ │ │ │ +
692
│ │ │ │ +
693 // encode coordinates
│ │ │ │ +
694 for (int i=dim-1; i>=0; i--)
│ │ │ │ +
695 {
│ │ │ │ +
696 id = id << yaspgrid_dim_bits;
│ │ │ │ +
697 id = id+PersistentIndexType(_it.coord(i));
│ │ │ │ +
698 }
│ │ │ │ +
699
│ │ │ │ +
700 return id;
│ │ │ │ +
701 }
│ │ │ │ +
702
│ │ │ │ +
704 int compressedIndex () const
│ │ │ │ +
705 {
│ │ │ │ +
706 return _it.superindex();
│ │ │ │ +
707 }
│ │ │ │ +
708
│ │ │ │ +
710 PersistentIndexType subPersistentIndex (int i, int cc) const
│ │ │ │ +
711 {
│ │ │ │ +
712 // calculate shift and move bitsets
│ │ │ │ +
713 std::bitset<dim> shift = Dune::Yasp::entityShift<dim>(i,cc);
│ │ │ │ +
714 std::bitset<dim> move = Dune::Yasp::entityMove<dim>(i,cc);
│ │ │ │ +
715
│ │ │ │ +
716 int trailing = (cc == dim) ? 1000 : 0;
│ │ │ │ +
717
│ │ │ │ +
718 std::array<int,dim> size = _g->mg->levelSize(_g->level());
│ │ │ │ +
719 std::array<int, dim> coord = _it.coord();
│ │ │ │ +
720 for (int j=0; j<dim; j++)
│ │ │ │ +
721 {
│ │ │ │ +
722 // correct size according to shift
│ │ │ │ +
723 if (!shift[j])
│ │ │ │ +
724 size[j]++;
│ │ │ │ +
725
│ │ │ │ +
726 // move the coordinates to the cell on which the entity lives
│ │ │ │ +
727 if (move[j])
│ │ │ │ +
728 coord[j]++;
│ │ │ │ +
729 }
│ │ │ │ +
730
│ │ │ │ +
731 for (int j=0; j<dim; j++)
│ │ │ │ +
732 {
│ │ │ │ +
733 // in the codim==dim case, count trailing zeroes.
│ │ │ │ +
734 if (cc == dim)
│ │ │ │ +
735 {
│ │ │ │ +
736 int zeroes = 0;
│ │ │ │ +
737 for (int k=0; k<_g->level(); k++)
│ │ │ │ +
738 if (coord[j] & (1<<k))
│ │ │ │ +
739 break;
│ │ │ │ +
740 else
│ │ │ │ +
741 zeroes++;
│ │ │ │ +
742 trailing = std::min(trailing,zeroes);
│ │ │ │ +
743 }
│ │ │ │ +
744 }
│ │ │ │ +
745
│ │ │ │ +
746 // encode codim
│ │ │ │ +
747 PersistentIndexType id(shift.to_ulong());
│ │ │ │ +
748
│ │ │ │ +
749 // encode level
│ │ │ │ +
750 id = id << yaspgrid_level_bits;
│ │ │ │ +
751 id = id+PersistentIndexType(_g->level()-trailing);
│ │ │ │ +
752
│ │ │ │ +
753 // encode coordinates
│ │ │ │ +
754 for (int j=dim-1; j>=0; j--)
│ │ │ │ +
755 {
│ │ │ │ +
756 id = id << yaspgrid_dim_bits;
│ │ │ │ +
757 id = id+PersistentIndexType(coord[j]>>trailing);
│ │ │ │ +
758 }
│ │ │ │ +
759
│ │ │ │ +
760 return id;
│ │ │ │ +
761 }
│ │ │ │ +
762
│ │ │ │ +
764 int subCompressedIndex (int i, int cc) const
│ │ │ │ +
765 {
│ │ │ │ +
766 // get shift and move of the subentity in question
│ │ │ │ +
767 std::bitset<dim> shift = Dune::Yasp::entityShift<dim>(i,cc);
│ │ │ │ +
768 std::bitset<dim> move = Dune::Yasp::entityMove<dim>(i,cc);
│ │ │ │ +
769
│ │ │ │ +
770 std::array<int, dim> coord = _it.coord();
│ │ │ │ +
771 for (int j=0; j<dim; j++)
│ │ │ │ +
772 coord[j] += move[j];
│ │ │ │ +
773
│ │ │ │ +
774 int which = _g->overlapfront[cc].shiftmapping(shift);
│ │ │ │ +
775 return _g->overlapfront[cc].superindex(coord,which);
│ │ │ │ +
776 }
│ │ │ │ +
777
│ │ │ │ +
778 I _it = {}; // position in the grid level
│ │ │ │ +
779 YGLI _g = {}; // access to grid level
│ │ │ │ +
780 };
│ │ │ │ +
│ │ │ │ +
781
│ │ │ │ +
782
│ │ │ │ +
783 // specialization for codim=dim (vertex)
│ │ │ │ +
784 template<int dim, class GridImp>
│ │ │ │ +
│ │ │ │ +
785 class YaspEntity<dim,dim,GridImp>
│ │ │ │ +
786 : public EntityDefaultImplementation <dim,dim,GridImp,YaspEntity>
│ │ │ │ +
787 {
│ │ │ │ +
788 constexpr static int dimworld = GridImp::dimensionworld;
│ │ │ │ +
789
│ │ │ │ +
790 template<int, PartitionIteratorType, typename>
│ │ │ │ +
791 friend class YaspLevelIterator;
│ │ │ │ +
792
│ │ │ │ +
793 typedef typename GridImp::Traits::template Codim<dim>::GeometryImpl GeometryImpl;
│ │ │ │ +
794
│ │ │ │ +
795 public:
│ │ │ │ +
796 typedef typename GridImp::ctype ctype;
│ │ │ │ +
797
│ │ │ │ +
798 typedef typename GridImp::YGridLevelIterator YGLI;
│ │ │ │ +
799 typedef typename GridImp::YGrid::Iterator I;
│ │ │ │ +
800
│ │ │ │ +
801 typedef typename GridImp::template Codim<dim>::Geometry Geometry;
│ │ │ │ +
802
│ │ │ │ +
803 typedef typename GridImp::template Codim<dim>::EntitySeed EntitySeed;
│ │ │ │ +
804
│ │ │ │ +
806 typedef typename GridImp::PersistentIndexType PersistentIndexType;
│ │ │ │ +
807
│ │ │ │ +
809 typedef typename GridImp::YGrid::iTupel iTupel;
│ │ │ │ +
810
│ │ │ │ +
811 // constructor
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
813 {}
│ │ │ │ +
│ │ │ │ +
814
│ │ │ │ +
│ │ │ │ +
815 YaspEntity (const YGLI& g, const I& it)
│ │ │ │ +
816 : _it(it), _g(g)
│ │ │ │ +
817 {}
│ │ │ │ +
│ │ │ │ +
818
│ │ │ │ +
│ │ │ │ +
819 YaspEntity (YGLI&& g, I&& it)
│ │ │ │ +
820 : _it(std::move(it)), _g(std::move(g))
│ │ │ │ +
821 {}
│ │ │ │ +
│ │ │ │ +
822
│ │ │ │ +
│ │ │ │ +
824 bool equals (const YaspEntity& e) const
│ │ │ │ +
825 {
│ │ │ │ +
826 return _it == e._it && _g == e._g;
│ │ │ │ +
827 }
│ │ │ │ +
│ │ │ │ +
828
│ │ │ │ +
830 int level () const {return _g->level();}
│ │ │ │ +
831
│ │ │ │ +
│ │ │ │ +
835 EntitySeed seed () const {
│ │ │ │ +
836 return EntitySeed(YaspEntitySeed<dim,GridImp>(_g->level(), _it.coord(), _it.which()));
│ │ │ │ +
837 }
│ │ │ │ +
│ │ │ │ +
838
│ │ │ │ +
│ │ │ │ +
843 unsigned int subEntities (unsigned int cc) const
│ │ │ │ +
844 {
│ │ │ │ +
845 return Dune::Yasp::subEnt<dim>(dim-dim,cc-dim);
│ │ │ │ +
846 }
│ │ │ │ +
│ │ │ │ +
847
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
850 GeometryImpl _geometry((_it).lowerleft());
│ │ │ │ +
851 return Geometry( _geometry );
│ │ │ │ +
852 }
│ │ │ │ +
│ │ │ │ +
853
│ │ │ │ +
│ │ │ │ +
857 constexpr GeometryType type () const
│ │ │ │ +
858 {
│ │ │ │ +
859 return GeometryTypes::cube(Geometry::mydimension);
│ │ │ │ +
860 }
│ │ │ │ +
│ │ │ │ +
861
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
864 {
│ │ │ │ +
865 if (_g->interior[dim].inside(_it.coord(),_it.shift()))
│ │ │ │ +
866 return InteriorEntity;
│ │ │ │ +
867 if (_g->interiorborder[dim].inside(_it.coord(),_it.shift()))
│ │ │ │ +
868 return BorderEntity;
│ │ │ │ +
869 if (_g->overlap[dim].inside(_it.coord(),_it.shift()))
│ │ │ │ +
870 return OverlapEntity;
│ │ │ │ +
871 if (_g->overlapfront[dim].inside(_it.coord(),_it.shift()))
│ │ │ │ +
872 return FrontEntity;
│ │ │ │ +
873 return GhostEntity;
│ │ │ │ +
874 }
│ │ │ │ +
│ │ │ │ +
875
│ │ │ │ +
877 int subCompressedIndex (int, unsigned int ) const
│ │ │ │ +
878 {
│ │ │ │ +
879 return compressedIndex();
│ │ │ │ +
880 }
│ │ │ │ +
881
│ │ │ │ +
882 private:
│ │ │ │ +
883 // IndexSets needs access to the private index methods
│ │ │ │ +
884 friend class Dune::YaspIndexSet<GridImp,true>;
│ │ │ │ +
885 friend class Dune::YaspIndexSet<GridImp,false>;
│ │ │ │ +
886 friend class Dune::YaspGlobalIdSet<GridImp>;
│ │ │ │ +
887
│ │ │ │ + │ │ │ │ +
890 {
│ │ │ │ +
891 // get coordinate and size of global grid
│ │ │ │ +
892 iTupel size = _g->mg->levelSize(_g->level());
│ │ │ │ +
893
│ │ │ │ +
894 for (int i=0; i<dim; i++)
│ │ │ │ +
895 {
│ │ │ │ +
896 // we have vertices, add 1 size to all directions
│ │ │ │ +
897 size[i]++;
│ │ │ │ +
898 }
│ │ │ │ +
899
│ │ │ │ +
900 // determine min number of trailing zeroes
│ │ │ │ +
901 int trailing = 1000;
│ │ │ │ +
902 for (int i=0; i<dim; i++)
│ │ │ │ +
903 {
│ │ │ │ +
904 // count trailing zeros
│ │ │ │ +
905 int zeros = 0;
│ │ │ │ +
906 for (int j=0; j<_g->level(); j++)
│ │ │ │ +
907 if (_it.coord(i)&(1<<j))
│ │ │ │ +
908 break;
│ │ │ │ +
909 else
│ │ │ │ +
910 zeros++;
│ │ │ │ +
911 trailing = std::min(trailing,zeros);
│ │ │ │ +
912 }
│ │ │ │ +
913
│ │ │ │ +
914 // determine the level of this vertex
│ │ │ │ +
915 int level = _g->level()-trailing;
│ │ │ │ +
916
│ │ │ │ +
917 // encode codim: shift vector of vertices is 0.
│ │ │ │ + │ │ │ │ +
919
│ │ │ │ +
920 // encode level
│ │ │ │ +
921 id = id << yaspgrid_level_bits;
│ │ │ │ +
922 id = id+PersistentIndexType(level);
│ │ │ │ +
923
│ │ │ │ +
924 // encode coordinates
│ │ │ │ +
925 for (int i=dim-1; i>=0; i--)
│ │ │ │ +
926 {
│ │ │ │ +
927 id = id << yaspgrid_dim_bits;
│ │ │ │ +
928 id = id+PersistentIndexType(_it.coord(i)>>trailing);
│ │ │ │ +
929 }
│ │ │ │ +
930
│ │ │ │ +
931 return id;
│ │ │ │ +
932 }
│ │ │ │ +
933
│ │ │ │ +
935 int compressedIndex () const { return _it.superindex();}
│ │ │ │ +
936
│ │ │ │ +
937 public:
│ │ │ │ +
938 const I& transformingsubiterator() const { return _it; }
│ │ │ │ +
939 const YGLI& gridlevel() const { return _g; }
│ │ │ │ + │ │ │ │ +
941 YGLI& gridlevel() { return _g; }
│ │ │ │ +
942
│ │ │ │ +
943 const GridImp * yaspgrid() const { return _g->mg; }
│ │ │ │ +
944 protected:
│ │ │ │ +
945 I _it = {}; // position in the grid level
│ │ │ │ +
946 YGLI _g = {}; // access to grid level
│ │ │ │ +
947 };
│ │ │ │ +
│ │ │ │ +
948
│ │ │ │ +
949} // namespace Dune
│ │ │ │ +
950
│ │ │ │ +
951#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
│ │ │ │ -
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:538
│ │ │ │ -
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:166
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ +
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:242
│ │ │ │ +
int level() const
level of this element
Definition yaspgridentity.hh:256
│ │ │ │ +
Geometry geometry() const
geometry of this entity
Definition yaspgridentity.hh:270
│ │ │ │ +
GridImp::ctype ctype
Definition yaspgridentity.hh:248
│ │ │ │ +
constexpr GeometryType type() const
Return the name of the reference element. The type can be used to access the Dune::ReferenceElement.
Definition yaspgridentity.hh:279
│ │ │ │ +
PersistentIndexType persistentIndex() const
globally unique, persistent index
Definition yaspgridentity.hh:333
│ │ │ │ +
const YGLI & gridlevel() const
Definition yaspgridentity.hh:394
│ │ │ │ +
const I & transformingsubiterator() const
Definition yaspgridentity.hh:393
│ │ │ │ +
YGLI _g
Definition yaspgridentity.hh:400
│ │ │ │ +
bool equals(const YaspEntity &e) const
Return true when two iterators over the same grid are equal (!).
Definition yaspgridentity.hh:321
│ │ │ │ +
PartitionType partitionType() const
return partition type attribute
Definition yaspgridentity.hh:294
│ │ │ │ +
GridImp::Traits::template Codim< codim >::GeometryImpl GeometryImpl
Definition yaspgridentity.hh:251
│ │ │ │ +
YGLI & gridlevel()
Definition yaspgridentity.hh:396
│ │ │ │ +
int subCompressedIndex(int i, unsigned int cc) const
subentity compressed index
Definition yaspgridentity.hh:370
│ │ │ │ +
GridImp::YGridLevelIterator YGLI
Definition yaspgridentity.hh:307
│ │ │ │ +
GridImp::YGrid::Iterator I
Definition yaspgridentity.hh:308
│ │ │ │ +
const GridImp * yaspgrid() const
Definition yaspgridentity.hh:397
│ │ │ │ +
GridImp::template Codim< codim >::EntitySeed EntitySeed
Definition yaspgridentity.hh:253
│ │ │ │ +
YaspEntity(YGLI &&g, const I &&it)
Definition yaspgridentity.hh:316
│ │ │ │ +
EntitySeed seed() const
Return the entity seed which contains sufficient information to generate the entity again and uses as...
Definition yaspgridentity.hh:264
│ │ │ │ +
int compressedIndex() const
consecutive, codim-wise, level-wise index
Definition yaspgridentity.hh:364
│ │ │ │ +
YaspEntity(const YGLI &g, const I &it)
Definition yaspgridentity.hh:312
│ │ │ │ +
I _it
Definition yaspgridentity.hh:399
│ │ │ │ +
YaspEntity()
Definition yaspgridentity.hh:309
│ │ │ │ +
GridImp::template Codim< codim >::Geometry Geometry
Definition yaspgridentity.hh:250
│ │ │ │ +
GridImp::PersistentIndexType PersistentIndexType
Definition yaspgridentity.hh:330
│ │ │ │ +
unsigned int subEntities(unsigned int cc) const
Definition yaspgridentity.hh:288
│ │ │ │ +
I & transformingsubiterator()
Definition yaspgridentity.hh:395
│ │ │ │ +
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
│ │ │ │ +
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:631
│ │ │ │ +
GridImp::template Codim< 0 >::LocalGeometry LocalGeometry
Definition yaspgridentity.hh:426
│ │ │ │ +
Codim< cc >::Entity subEntity(int i) const
Definition yaspgridentity.hh:545
│ │ │ │ +
bool equals(const YaspEntity &e) const
Return true when two iterators over the same grid are equal (!).
Definition yaspgridentity.hh:464
│ │ │ │ +
YaspEntity(const YGLI &g, I &&it)
Definition yaspgridentity.hh:455
│ │ │ │ +
int count() const
Definition yaspgridentity.hh:528
│ │ │ │ +
GridImp::template Codim< 0 >::EntitySeed EntitySeed
Definition yaspgridentity.hh:435
│ │ │ │ +
GridImp::PersistentIndexType PersistentIndexType
define the type used for persistent indices
Definition yaspgridentity.hh:442
│ │ │ │ +
GridImp::YGrid::iTupel iTupel
define type used for coordinates in grid module
Definition yaspgridentity.hh:445
│ │ │ │ +
const YGLI & gridlevel() const
Definition yaspgridentity.hh:606
│ │ │ │ +
IntersectionIterator iend() const
Reference to one past the last neighbor.
Definition yaspgridentity.hh:644
│ │ │ │ +
const I & transformingsubiterator() const
Definition yaspgridentity.hh:605
│ │ │ │ +
GridImp::ctype ctype
Definition yaspgridentity.hh:420
│ │ │ │ +
YGLI & gridlevel()
Definition yaspgridentity.hh:608
│ │ │ │ +
YaspEntity(const YGLI &g, const I &it)
Definition yaspgridentity.hh:451
│ │ │ │ +
const GridImp * yaspgrid() const
Definition yaspgridentity.hh:609
│ │ │ │ +
int level() const
level of this element
Definition yaspgridentity.hh:470
│ │ │ │ +
GridImp::LeafIntersectionIterator LeafIntersectionIterator
Definition yaspgridentity.hh:438
│ │ │ │ +
YaspEntity(YGLI &&g, I &&it)
Definition yaspgridentity.hh:459
│ │ │ │ +
PartitionType partitionType() const
return partition type attribute
Definition yaspgridentity.hh:480
│ │ │ │ +
LevelIntersectionIterator ilevelend() const
Reference to one past the last neighbor.
Definition yaspgridentity.hh:656
│ │ │ │ +
bool mightVanish() const
Returns true, if entity might disappear during the next call to adapt()
Definition yaspgridentity.hh:622
│ │ │ │ +
GridImp::HierarchicIterator HierarchicIterator
Definition yaspgridentity.hh:439
│ │ │ │ +
GridImp::template Codim< 0 >::Entity Entity
Definition yaspgridentity.hh:434
│ │ │ │ +
LevelIntersectionIterator ilevelbegin() const
returns intersection iterator for first intersection
Definition yaspgridentity.hh:638
│ │ │ │ +
LeafIntersectionIterator ileafend() const
Reference to one past the last neighbor.
Definition yaspgridentity.hh:650
│ │ │ │ +
YaspEntity()
Definition yaspgridentity.hh:448
│ │ │ │ +
GridImp::YGrid::Iterator I
Definition yaspgridentity.hh:423
│ │ │ │ +
GridImp::template Codim< 0 >::Geometry Geometry
Definition yaspgridentity.hh:425
│ │ │ │ +
Geometry geometry() const
geometry of this entity
Definition yaspgridentity.hh:491
│ │ │ │ +
Entity father() const
Inter-level access to father element on coarser grid. Assumes that meshes are nested.
Definition yaspgridentity.hh:561
│ │ │ │ +
bool isNew() const
Returns true, if the entity has been created during the last call to adapt()
Definition yaspgridentity.hh:618
│ │ │ │ +
constexpr GeometryType type() const
Return the name of the reference element. The type can be used to access the Dune::ReferenceElement.
Definition yaspgridentity.hh:519
│ │ │ │ +
EntitySeed seed() const
Return the entity seed which contains sufficient information to generate the entity again and uses as...
Definition yaspgridentity.hh:475
│ │ │ │ +
HierarchicIterator hbegin(int maxlevel) const
Definition yaspgridentity.hh:665
│ │ │ │ +
IntersectionIterator ibegin() const
returns intersection iterator for first intersection
Definition yaspgridentity.hh:625
│ │ │ │ +
GridImp::YGridLevelIterator YGLI
Definition yaspgridentity.hh:422
│ │ │ │ +
unsigned int subEntities(unsigned int codim) const
Definition yaspgridentity.hh:537
│ │ │ │ +
LocalGeometry geometryInFather() const
Definition yaspgridentity.hh:588
│ │ │ │ +
GridImp::LevelIntersectionIterator IntersectionIterator
Definition yaspgridentity.hh:436
│ │ │ │ +
GridImp::LevelIntersectionIterator LevelIntersectionIterator
Definition yaspgridentity.hh:437
│ │ │ │ +
I & transformingsubiterator()
Definition yaspgridentity.hh:607
│ │ │ │ +
bool isLeaf() const
Definition yaspgridentity.hh:611
│ │ │ │ +
bool hasFather() const
returns true if father entity exists
Definition yaspgridentity.hh:581
│ │ │ │ +
GridImp::template Codim< cd >::Entity Entity
Definition yaspgridentity.hh:431
│ │ │ │ +
int level() const
level of this element
Definition yaspgridentity.hh:830
│ │ │ │ +
bool equals(const YaspEntity &e) const
Return true when two iterators over the same grid are equal (!).
Definition yaspgridentity.hh:824
│ │ │ │ +
YGLI & gridlevel()
Definition yaspgridentity.hh:941
│ │ │ │ +
Geometry geometry() const
geometry of this entity
Definition yaspgridentity.hh:849
│ │ │ │ +
YaspEntity(const YGLI &g, const I &it)
Definition yaspgridentity.hh:815
│ │ │ │ +
unsigned int subEntities(unsigned int cc) const
Definition yaspgridentity.hh:843
│ │ │ │ +
PartitionType partitionType() const
return partition type attribute
Definition yaspgridentity.hh:863
│ │ │ │ +
GridImp::ctype ctype
Definition yaspgridentity.hh:796
│ │ │ │ +
GridImp::YGridLevelIterator YGLI
Definition yaspgridentity.hh:798
│ │ │ │ +
GridImp::PersistentIndexType PersistentIndexType
define the type used for persistent indices
Definition yaspgridentity.hh:806
│ │ │ │ +
EntitySeed seed() const
Return the entity seed which contains sufficient information to generate the entity again and uses as...
Definition yaspgridentity.hh:835
│ │ │ │ +
const GridImp * yaspgrid() const
Definition yaspgridentity.hh:943
│ │ │ │ +
constexpr GeometryType type() const
Return the name of the reference element. The type can be used to access the Dune::ReferenceElement.
Definition yaspgridentity.hh:857
│ │ │ │ +
GridImp::YGrid::Iterator I
Definition yaspgridentity.hh:799
│ │ │ │ +
I & transformingsubiterator()
Definition yaspgridentity.hh:940
│ │ │ │ +
const I & transformingsubiterator() const
Definition yaspgridentity.hh:938
│ │ │ │ +
GridImp::YGrid::iTupel iTupel
define type used for coordinates in grid module
Definition yaspgridentity.hh:809
│ │ │ │ +
GridImp::template Codim< dim >::Geometry Geometry
Definition yaspgridentity.hh:801
│ │ │ │ +
const YGLI & gridlevel() const
Definition yaspgridentity.hh:939
│ │ │ │ +
YaspEntity(YGLI &&g, I &&it)
Definition yaspgridentity.hh:819
│ │ │ │ +
YaspEntity()
Definition yaspgridentity.hh:812
│ │ │ │ +
GridImp::template Codim< dim >::EntitySeed EntitySeed
Definition yaspgridentity.hh:803
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,193 +1,1266 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _y_a_s_p_g_r_i_d │ │ │ │ │ -yaspgridpersistentcontainer.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 © 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_YASPGRIDENTITY_HH │ │ │ │ │ +6#define DUNE_GRID_YASPGRIDENTITY_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 { │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10 │ │ │ │ │ +24//======================================================================== │ │ │ │ │ +25 │ │ │ │ │ +26 │ │ │ │ │ +27 │ │ │ │ │ +28 │ │ │ │ │ +29namespace _D_u_n_e { │ │ │ │ │ +30 │ │ │ │ │ +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 private: │ │ │ │ │ +47 // prevent construction │ │ │ │ │ +48 BinomialTable() = delete; │ │ │ │ │ +49 │ │ │ │ │ +50 // compute binomial(r, c) and advance row `r` and column `c` │ │ │ │ │ +51 static constexpr int nextValue(int& r, int& c) │ │ │ │ │ +52 { │ │ │ │ │ +53 const auto result = Dune::binomial(r, c); │ │ │ │ │ +54 │ │ │ │ │ +55 c += 1; │ │ │ │ │ +56 if (c > r) { │ │ │ │ │ +57 r += 1; │ │ │ │ │ +58 c = 0; │ │ │ │ │ +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; │ │ │ │ │ +61 return result; │ │ │ │ │ +62 } │ │ │ │ │ +63 │ │ │ │ │ +64 template │ │ │ │ │ +65 static constexpr std::array computeValues(std:: │ │ │ │ │ +index_sequence) │ │ │ │ │ +66 { │ │ │ │ │ +67 int r = 0, c = 0; │ │ │ │ │ +68 return {{ ((void)I, nextValue(r, c))... }}; │ │ │ │ │ +69 } │ │ │ │ │ +70 │ │ │ │ │ +71 template │ │ │ │ │ +72 static constexpr std::array computeOffsets(std:: │ │ │ │ │ +index_sequence) │ │ │ │ │ +73 { return {{ (I*(I+1)/2)... }}; } │ │ │ │ │ +74 │ │ │ │ │ +75 static constexpr std::array _values = computeValues(std:: │ │ │ │ │ +make_index_sequence<(n+1)*(n+2)/2>{}); │ │ │ │ │ +76 static constexpr std::array _offsets = computeOffsets(std:: │ │ │ │ │ +make_index_sequence{}); │ │ │ │ │ +77 }; │ │ │ │ │ +78 │ │ │ │ │ +85 template │ │ │ │ │ +86 constexpr int subEnt(int d, int c) │ │ │ │ │ +87 { │ │ │ │ │ +88 return (d < c ? 0 : BinomialTable::evaluate(d,c) << c); │ │ │ │ │ +89 } │ │ │ │ │ +90 │ │ │ │ │ +91 // Make a table mapping all subentities of a codim 0 entity to a value. │ │ │ │ │ +92 // F is the functor to be evaluated. │ │ │ │ │ +93 template │ │ │ │ │ +94 struct EntityShiftTable │ │ │ │ │ +95 { │ │ │ │ │ +96 typedef std::bitset value_type; │ │ │ │ │ +97 │ │ │ │ │ +98 static value_type evaluate(int i, int codim) │ │ │ │ │ +99 { │ │ │ │ │ +100 return {_values[_offsets[codim] + i]}; │ │ │ │ │ +101 } │ │ │ │ │ +102 │ │ │ │ │ +103 private: │ │ │ │ │ +104 │ │ │ │ │ +105 // prevent construction │ │ │ │ │ +106 EntityShiftTable() = delete; │ │ │ │ │ 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 }; │ │ │ │ │ +108 // compute offset of codimension `codim` entities and advance `offset` │ │ │ │ │ +109 static constexpr int nextOffset(int& offset, int codim) │ │ │ │ │ +110 { │ │ │ │ │ +111 if (codim == 0) { │ │ │ │ │ +112 offset = 0; │ │ │ │ │ +113 return 0; │ │ │ │ │ +114 } │ │ │ │ │ +115 │ │ │ │ │ +116 offset += subEnt(dim, codim-1); │ │ │ │ │ +117 return offset; │ │ │ │ │ +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 │ │ │ │ │ +120 template │ │ │ │ │ +121 static constexpr std::array computeOffsets(std:: │ │ │ │ │ +index_sequence) │ │ │ │ │ +122 { │ │ │ │ │ +123 int offset = 0; │ │ │ │ │ +124 return {{ (nextOffset(offset, I))... }}; │ │ │ │ │ +125 } │ │ │ │ │ +126 │ │ │ │ │ +127 // compute shift table entry for (`codim`, `i`) and advance `codim`, `i` │ │ │ │ │ +128 static constexpr unsigned char nextValue(int& codim, int& i) │ │ │ │ │ +129 { │ │ │ │ │ +130 const auto result = F::evaluate(i, codim); │ │ │ │ │ +131 │ │ │ │ │ +132 i += 1; │ │ │ │ │ +133 if (i >= subEnt(dim, codim)) { │ │ │ │ │ +134 codim += 1; │ │ │ │ │ +135 i = 0; │ │ │ │ │ +136 } │ │ │ │ │ +137 │ │ │ │ │ +138 return result; │ │ │ │ │ +139 } │ │ │ │ │ +140 │ │ │ │ │ +141 template │ │ │ │ │ +142 static constexpr std::array computeValues │ │ │ │ │ +(std::index_sequence) │ │ │ │ │ +143 { │ │ │ │ │ +144 int codim = 0, i = 0; │ │ │ │ │ +145 return {{ ((void)I, nextValue(codim, i))... }}; │ │ │ │ │ +146 } │ │ │ │ │ +147 │ │ │ │ │ +148 static constexpr std::array _offsets = computeOffsets(std:: │ │ │ │ │ +make_index_sequence{}); │ │ │ │ │ +149 static constexpr std::array _values = │ │ │ │ │ +computeValues(std::make_index_sequence{}); │ │ │ │ │ +150 │ │ │ │ │ +151 }; │ │ │ │ │ +152 │ │ │ │ │ +153 // functor for doing the actual entity shift calculation │ │ │ │ │ +154 template │ │ │ │ │ +155 struct calculate_entity_shift │ │ │ │ │ +156 { │ │ │ │ │ +157 static constexpr unsigned long long evaluate(int index, int cc) │ │ │ │ │ +158 { │ │ │ │ │ +159 auto result = 0ull; │ │ │ │ │ +160 for (int d = dim; d>0; d--) │ │ │ │ │ +161 { │ │ │ │ │ +162 if (cc == d) │ │ │ │ │ +163 return result; │ │ │ │ │ +164 if (index < subEnt(d-1,cc)) │ │ │ │ │ +165 result |= 1ull << (d-1); │ │ │ │ │ +166 else │ │ │ │ │ +167 { │ │ │ │ │ +168 index = (index - subEnt(d-1, cc)) % subEnt(d-1,cc-1); │ │ │ │ │ +169 cc--; │ │ │ │ │ +170 } │ │ │ │ │ +171 } │ │ │ │ │ +172 return result; │ │ │ │ │ +173 } │ │ │ │ │ +174 }; │ │ │ │ │ +175 │ │ │ │ │ +184 template │ │ │ │ │ +185 std::bitset entityShift(int index, int cc) │ │ │ │ │ +186 { │ │ │ │ │ +187 return EntityShiftTable,dim>::evaluate │ │ │ │ │ +(index,cc); │ │ │ │ │ +188 } │ │ │ │ │ +189 │ │ │ │ │ +190 // functor for doing the actual entity move calculation │ │ │ │ │ +191 template │ │ │ │ │ +192 struct calculate_entity_move │ │ │ │ │ +193 { │ │ │ │ │ +194 static constexpr unsigned long long evaluate(int index, int cc) │ │ │ │ │ +195 { │ │ │ │ │ +196 auto result = 0ull; │ │ │ │ │ +197 for (int d = dim; d>0; d--) │ │ │ │ │ +198 { │ │ │ │ │ +199 if (d == cc) │ │ │ │ │ +200 { │ │ │ │ │ +201 // result[d-1] = index & (1<<(d-1)); │ │ │ │ │ +202 result &= ~(1ull << (d-1)); │ │ │ │ │ +203 result |= index & (1ull << (d-1)); │ │ │ │ │ +204 │ │ │ │ │ +205 index &= ~(1<<(d-1)); │ │ │ │ │ +206 } │ │ │ │ │ +207 if (index >= subEnt(d-1,cc)) │ │ │ │ │ +208 { │ │ │ │ │ +209 if ((index - subEnt(d-1,cc)) / subEnt(d-1,cc-1) == 1) │ │ │ │ │ +210 { │ │ │ │ │ +211 result |= 1ull << (d-1); │ │ │ │ │ +212 } │ │ │ │ │ +213 index = (index - subEnt(d-1, cc)) % subEnt(d-1,cc-1); │ │ │ │ │ +214 cc--; │ │ │ │ │ +215 } │ │ │ │ │ +216 } │ │ │ │ │ +217 return result; │ │ │ │ │ +218 } │ │ │ │ │ +219 │ │ │ │ │ +220 }; │ │ │ │ │ +221 │ │ │ │ │ +229 template │ │ │ │ │ +230 std::bitset entityMove(int index, int cc) │ │ │ │ │ +231 { │ │ │ │ │ +232 return EntityShiftTable,dim>::evaluate │ │ │ │ │ +(index,cc); │ │ │ │ │ +233 } │ │ │ │ │ +234 │ │ │ │ │ +235#endif //DOXYGEN │ │ │ │ │ +236 │ │ │ │ │ +237 } // namespace Yasp. │ │ │ │ │ +238 │ │ │ │ │ +239 template │ │ │ │ │ +_2_4_0 class _Y_a_s_p_E_n_t_i_t_y │ │ │ │ │ +241 : 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 │ │ │ │ │ +242 { │ │ │ │ │ +243 │ │ │ │ │ +244 template │ │ │ │ │ +_2_4_5 friend class _Y_a_s_p_L_e_v_e_l_I_t_e_r_a_t_o_r; │ │ │ │ │ +246 │ │ │ │ │ +247 public: │ │ │ │ │ +_2_4_8 typedef typename GridImp::ctype _c_t_y_p_e; │ │ │ │ │ +249 │ │ │ │ │ +_2_5_0 typedef typename GridImp::template Codim::Geometry _G_e_o_m_e_t_r_y; │ │ │ │ │ +_2_5_1 typedef typename GridImp::Traits::template Codim::GeometryImpl │ │ │ │ │ +_G_e_o_m_e_t_r_y_I_m_p_l; │ │ │ │ │ +252 │ │ │ │ │ +_2_5_3 typedef typename GridImp::template Codim::EntitySeed _E_n_t_i_t_y_S_e_e_d; │ │ │ │ │ +254 │ │ │ │ │ +_2_5_6 int _l_e_v_e_l () const │ │ │ │ │ +257 { │ │ │ │ │ +258 return ___g->level(); │ │ │ │ │ +259 } │ │ │ │ │ +260 │ │ │ │ │ +_2_6_4 _E_n_t_i_t_y_S_e_e_d _s_e_e_d() const │ │ │ │ │ +265 { │ │ │ │ │ +266 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())); │ │ │ │ │ +267 } │ │ │ │ │ +268 │ │ │ │ │ +_2_7_0 _G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y () const │ │ │ │ │ +271 { │ │ │ │ │ +272 _G_e_o_m_e_t_r_y_I_m_p_l _geometry(___i_t.lowerleft(),___i_t.upperright(),___i_t.shift()); │ │ │ │ │ +273 return _G_e_o_m_e_t_r_y(_geometry); │ │ │ │ │ +274 } │ │ │ │ │ +275 │ │ │ │ │ +_2_7_9 constexpr GeometryType _t_y_p_e () const │ │ │ │ │ +280 { │ │ │ │ │ +281 return GeometryTypes::cube(_G_e_o_m_e_t_r_y_:_:_m_y_d_i_m_e_n_s_i_o_n); │ │ │ │ │ +282 } │ │ │ │ │ +283 │ │ │ │ │ +_2_8_8 unsigned int _s_u_b_E_n_t_i_t_i_e_s (unsigned int cc) const │ │ │ │ │ +289 { │ │ │ │ │ +290 return Dune::Yasp::subEnt(dim-codim,cc-codim); │ │ │ │ │ +291 } │ │ │ │ │ +292 │ │ │ │ │ +_2_9_4 _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 │ │ │ │ │ +295 { │ │ │ │ │ +296 if (___g->interior[codim].inside(___i_t.coord(),___i_t.shift())) │ │ │ │ │ +297 return _I_n_t_e_r_i_o_r_E_n_t_i_t_y; │ │ │ │ │ +298 if (___g->interiorborder[codim].inside(___i_t.coord(),___i_t.shift())) │ │ │ │ │ +299 return _B_o_r_d_e_r_E_n_t_i_t_y; │ │ │ │ │ +300 if (___g->overlap[codim].inside(___i_t.coord(),___i_t.shift())) │ │ │ │ │ +301 return _O_v_e_r_l_a_p_E_n_t_i_t_y; │ │ │ │ │ +302 if (___g->overlapfront[codim].inside(___i_t.coord(),___i_t.shift())) │ │ │ │ │ +303 return _F_r_o_n_t_E_n_t_i_t_y; │ │ │ │ │ +304 return _G_h_o_s_t_E_n_t_i_t_y; │ │ │ │ │ +305 } │ │ │ │ │ +306 │ │ │ │ │ +_3_0_7 typedef typename GridImp::YGridLevelIterator _Y_G_L_I; │ │ │ │ │ +_3_0_8 typedef typename GridImp::YGrid::Iterator _I; │ │ │ │ │ +_3_0_9 _Y_a_s_p_E_n_t_i_t_y () │ │ │ │ │ +310 {} │ │ │ │ │ +311 │ │ │ │ │ +_3_1_2 _Y_a_s_p_E_n_t_i_t_y (const _Y_G_L_I& g, const _I& it) │ │ │ │ │ +313 : ___i_t(it), ___g(g) │ │ │ │ │ +314 {} │ │ │ │ │ +315 │ │ │ │ │ +_3_1_6 _Y_a_s_p_E_n_t_i_t_y (_Y_G_L_I&& g, const _I&& it) │ │ │ │ │ +317 : ___i_t(_s_t_d::move(it)), ___g(_s_t_d::move(g)) │ │ │ │ │ +318 {} │ │ │ │ │ +319 │ │ │ │ │ +_3_2_1 bool _e_q_u_a_l_s (const _Y_a_s_p_E_n_t_i_t_y& e) const │ │ │ │ │ +322 { │ │ │ │ │ +323 return ___i_t == e.___i_t && ___g == e.___g; │ │ │ │ │ +324 } │ │ │ │ │ +325 │ │ │ │ │ +326 // IndexSets needs access to the private index methods │ │ │ │ │ +327 friend class _D_u_n_e_:_:_Y_a_s_p_I_n_d_e_x_S_e_t; │ │ │ │ │ +328 friend class _D_u_n_e_:_:_Y_a_s_p_I_n_d_e_x_S_e_t; │ │ │ │ │ +329 friend class _D_u_n_e_:_:_Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t; │ │ │ │ │ +_3_3_0 typedef typename GridImp::PersistentIndexType _P_e_r_s_i_s_t_e_n_t_I_n_d_e_x_T_y_p_e; │ │ │ │ │ +331 │ │ │ │ │ +_3_3_3 _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 │ │ │ │ │ +334 { │ │ │ │ │ +335 // get size of global grid (in elements) │ │ │ │ │ +336 std::array size; │ │ │ │ │ +337 │ │ │ │ │ +338 for (int i=0; img->levelSize(___g->level(), i); │ │ │ │ │ +342 if (!___i_t.shift(i)) │ │ │ │ │ +343 size[i]++; │ │ │ │ │ +344 } │ │ │ │ │ +345 │ │ │ │ │ +346 // encode codim │ │ │ │ │ +347 _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()); │ │ │ │ │ +348 │ │ │ │ │ +349 // encode level │ │ │ │ │ +350 id = id << _y_a_s_p_g_r_i_d___l_e_v_e_l___b_i_t_s; │ │ │ │ │ +351 id = id+_P_e_r_s_i_s_t_e_n_t_I_n_d_e_x_T_y_p_e(___g->level()); │ │ │ │ │ +352 │ │ │ │ │ +353 // encode coordinates │ │ │ │ │ +354 for (int i=dim-1; i>=0; i--) │ │ │ │ │ +355 { │ │ │ │ │ +356 id = id << _y_a_s_p_g_r_i_d___d_i_m___b_i_t_s; │ │ │ │ │ +357 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)); │ │ │ │ │ +358 } │ │ │ │ │ +359 │ │ │ │ │ +360 return id; │ │ │ │ │ +361 } │ │ │ │ │ +362 │ │ │ │ │ +_3_6_4 int _c_o_m_p_r_e_s_s_e_d_I_n_d_e_x () const │ │ │ │ │ +365 { │ │ │ │ │ +366 return ___i_t.superindex(); │ │ │ │ │ +367 } │ │ │ │ │ +368 │ │ │ │ │ +_3_7_0 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 │ │ │ │ │ +371 { │ │ │ │ │ +372 // get the shift of the entity and the subentity │ │ │ │ │ +373 // the subentity shift is only available in the space spanned by the entity │ │ │ │ │ +374 std::bitset subent_shift = Dune::Yasp::entityShift │ │ │ │ │ +(i,cc-codim); │ │ │ │ │ +375 std::bitset subent_move = Dune::Yasp::entityMove │ │ │ │ │ +(i,cc-codim); │ │ │ │ │ +376 │ │ │ │ │ +377 std::bitset shift = ___i_t.shift(); │ │ │ │ │ +378 std::array coord = ___i_t.coord(); │ │ │ │ │ +379 for (int j=0, k=0; joverlapfront[cc].shiftmapping(shift); │ │ │ │ │ +390 return ___g->overlapfront[cc].superindex(coord,which); │ │ │ │ │ +391 } │ │ │ │ │ +392 public: │ │ │ │ │ +_3_9_3 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; } │ │ │ │ │ +_3_9_4 const _Y_G_L_I& _g_r_i_d_l_e_v_e_l() const { return ___g; } │ │ │ │ │ +_3_9_5 _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; } │ │ │ │ │ +_3_9_6 _Y_G_L_I& _g_r_i_d_l_e_v_e_l() { return ___g; } │ │ │ │ │ +_3_9_7 const GridImp * _y_a_s_p_g_r_i_d() const { return ___g->mg; } │ │ │ │ │ +398 protected: │ │ │ │ │ +_3_9_9 _I ___i_t = {}; // position in the grid level │ │ │ │ │ +_4_0_0 _Y_G_L_I ___g = {}; // access to grid level │ │ │ │ │ +401 }; │ │ │ │ │ +402 │ │ │ │ │ +403 │ │ │ │ │ +404 // specialization for codim=0 │ │ │ │ │ +405 template │ │ │ │ │ +_4_0_6 class _Y_a_s_p_E_n_t_i_t_y<0,dim,GridImp> │ │ │ │ │ +407 : 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> │ │ │ │ │ +408 { │ │ │ │ │ +409 constexpr static int dimworld = GridImp::dimensionworld; │ │ │ │ │ +410 │ │ │ │ │ +411 typedef typename GridImp::Traits::template Codim< 0 >::GeometryImpl │ │ │ │ │ +_G_e_o_m_e_t_r_y_I_m_p_l; │ │ │ │ │ +412 │ │ │ │ │ +413 template │ │ │ │ │ +_4_1_4 friend class _Y_a_s_p_L_e_v_e_l_I_t_e_r_a_t_o_r; │ │ │ │ │ +415 │ │ │ │ │ +416 template │ │ │ │ │ +_4_1_7 friend class _Y_a_s_p_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r; │ │ │ │ │ +418 │ │ │ │ │ +419 public: │ │ │ │ │ +_4_2_0 typedef typename GridImp::ctype _c_t_y_p_e; │ │ │ │ │ +421 │ │ │ │ │ +_4_2_2 typedef typename GridImp::YGridLevelIterator _Y_G_L_I; │ │ │ │ │ +_4_2_3 typedef typename GridImp::YGrid::Iterator _I; │ │ │ │ │ +424 │ │ │ │ │ +_4_2_5 typedef typename GridImp::template Codim< 0 >::Geometry _G_e_o_m_e_t_r_y; │ │ │ │ │ +_4_2_6 typedef typename GridImp::template Codim< 0 >::LocalGeometry _L_o_c_a_l_G_e_o_m_e_t_r_y; │ │ │ │ │ +427 │ │ │ │ │ +428 template │ │ │ │ │ +_4_2_9 struct Codim │ │ │ │ │ +430 { │ │ │ │ │ +_4_3_1 typedef typename GridImp::template _C_o_d_i_m_<_c_d_>_:_:_E_n_t_i_t_y _E_n_t_i_t_y; │ │ │ │ │ +432 }; │ │ │ │ │ +433 │ │ │ │ │ +_4_3_4 typedef typename GridImp::template _C_o_d_i_m_<_0_>_:_:_E_n_t_i_t_y _E_n_t_i_t_y; │ │ │ │ │ +_4_3_5 typedef typename GridImp::template Codim<0>::EntitySeed _E_n_t_i_t_y_S_e_e_d; │ │ │ │ │ +_4_3_6 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_3_7 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_3_8 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_3_9 typedef typename GridImp::HierarchicIterator _H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r; │ │ │ │ │ +440 │ │ │ │ │ +_4_4_2 typedef typename GridImp::PersistentIndexType _P_e_r_s_i_s_t_e_n_t_I_n_d_e_x_T_y_p_e; │ │ │ │ │ +443 │ │ │ │ │ +_4_4_5 typedef typename GridImp::YGrid::iTupel _i_T_u_p_e_l; │ │ │ │ │ +446 │ │ │ │ │ +447 // constructor │ │ │ │ │ +_4_4_8 _Y_a_s_p_E_n_t_i_t_y () │ │ │ │ │ +449 {} │ │ │ │ │ +450 │ │ │ │ │ +_4_5_1 _Y_a_s_p_E_n_t_i_t_y (const _Y_G_L_I& g, const _I& it) │ │ │ │ │ +452 : ___i_t(it), ___g(g) │ │ │ │ │ +453 {} │ │ │ │ │ +454 │ │ │ │ │ +_4_5_5 _Y_a_s_p_E_n_t_i_t_y (const _Y_G_L_I& g, _I&& it) │ │ │ │ │ +456 : ___i_t(_s_t_d::move(it)), ___g(g) │ │ │ │ │ +457 {} │ │ │ │ │ +458 │ │ │ │ │ +_4_5_9 _Y_a_s_p_E_n_t_i_t_y (_Y_G_L_I&& g, _I&& it) │ │ │ │ │ +460 : ___i_t(_s_t_d::move(it)), ___g(_s_t_d::move(g)) │ │ │ │ │ +461 {} │ │ │ │ │ +462 │ │ │ │ │ +_4_6_4 bool _e_q_u_a_l_s (const _Y_a_s_p_E_n_t_i_t_y& e) const │ │ │ │ │ +465 { │ │ │ │ │ +466 return ___i_t == e.___i_t && ___g == e.___g; │ │ │ │ │ +467 } │ │ │ │ │ +468 │ │ │ │ │ +_4_7_0 int _l_e_v_e_l () const { return ___g->level(); } │ │ │ │ │ +471 │ │ │ │ │ +_4_7_5 _E_n_t_i_t_y_S_e_e_d _s_e_e_d () const { │ │ │ │ │ +476 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())); │ │ │ │ │ +477 } │ │ │ │ │ +478 │ │ │ │ │ +_4_8_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 │ │ │ │ │ +481 { │ │ │ │ │ +482 if (___g->interior[0].inside(___i_t.coord(),___i_t.shift())) │ │ │ │ │ +483 return _I_n_t_e_r_i_o_r_E_n_t_i_t_y; │ │ │ │ │ +484 if (___g->overlap[0].inside(___i_t.coord(),___i_t.shift())) │ │ │ │ │ +485 return _O_v_e_r_l_a_p_E_n_t_i_t_y; │ │ │ │ │ +486 DUNE_THROW(_G_r_i_d_E_r_r_o_r, "Impossible GhostEntity"); │ │ │ │ │ +487 return _G_h_o_s_t_E_n_t_i_t_y; │ │ │ │ │ +488 } │ │ │ │ │ +489 │ │ │ │ │ +_4_9_1 _G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y () const { │ │ │ │ │ +492 // the element geometry │ │ │ │ │ +493 auto ll = ___i_t.lowerleft(); │ │ │ │ │ +494 auto ur = ___i_t.upperright(); │ │ │ │ │ +495 │ │ │ │ │ +496 // If on periodic overlap, transform coordinates by domain size │ │ │ │ │ +497 for (int i=0; img->isPeriodic(i)) { │ │ │ │ │ +499 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); │ │ │ │ │ +500 if (coord < 0) { │ │ │ │ │ +501 auto size = ___g->mg->domainSize()[i]; │ │ │ │ │ +502 ll[i] += size; │ │ │ │ │ +503 ur[i] += size; │ │ │ │ │ +504 } 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)) │ │ │ │ │ +{ │ │ │ │ │ +505 auto size = ___g->mg->domainSize()[i]; │ │ │ │ │ +506 ll[i] -= size; │ │ │ │ │ +507 ur[i] -= size; │ │ │ │ │ +508 } │ │ │ │ │ +509 } │ │ │ │ │ +510 } │ │ │ │ │ +511 │ │ │ │ │ +512 GeometryImpl _geometry(ll,ur); │ │ │ │ │ +513 return _G_e_o_m_e_t_r_y( _geometry ); │ │ │ │ │ +514 } │ │ │ │ │ +515 │ │ │ │ │ +_5_1_9 constexpr GeometryType _t_y_p_e () const │ │ │ │ │ +520 { │ │ │ │ │ +521 return GeometryTypes::cube(_G_e_o_m_e_t_r_y_:_:_m_y_d_i_m_e_n_s_i_o_n); │ │ │ │ │ +522 } │ │ │ │ │ +523 │ │ │ │ │ +_5_2_8 template int _c_o_u_n_t () const │ │ │ │ │ +529 { │ │ │ │ │ +530 return Dune::Yasp::subEnt(dim,cc); │ │ │ │ │ +531 } │ │ │ │ │ +532 │ │ │ │ │ +_5_3_7 unsigned int _s_u_b_E_n_t_i_t_i_e_s (unsigned int codim) const │ │ │ │ │ +538 { │ │ │ │ │ +539 return Dune::Yasp::subEnt(dim,codim); │ │ │ │ │ +540 } │ │ │ │ │ +541 │ │ │ │ │ +544 template │ │ │ │ │ +_5_4_5 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 │ │ │ │ │ +546 { │ │ │ │ │ +547 // calculate move bitset │ │ │ │ │ +548 std::bitset move = Dune::Yasp::entityMove(i,cc); │ │ │ │ │ +549 │ │ │ │ │ +550 // get the coordinate and modify it │ │ │ │ │ +551 _i_T_u_p_e_l coord = ___i_t.coord(); │ │ │ │ │ +552 for (int j=0; joverlapfront[cc].shiftmapping(Dune::Yasp::entityShift │ │ │ │ │ +(i,cc)); │ │ │ │ │ +557 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))); │ │ │ │ │ +558 } │ │ │ │ │ +559 │ │ │ │ │ +_5_6_1 _E_n_t_i_t_y _f_a_t_h_e_r () const │ │ │ │ │ +562 { │ │ │ │ │ +563 // check if coarse level exists │ │ │ │ │ +564 if (___g->level()<=0) │ │ │ │ │ +565 DUNE_THROW(_G_r_i_d_E_r_r_o_r, "tried to call father on level 0"); │ │ │ │ │ +566 │ │ │ │ │ +567 // yes, get iterator to it │ │ │ │ │ +568 _Y_G_L_I cg(___g); │ │ │ │ │ +569 --cg; │ │ │ │ │ +570 │ │ │ │ │ +571 // coordinates of the cell │ │ │ │ │ +572 _i_T_u_p_e_l coord = ___i_t.coord(); │ │ │ │ │ +573 │ │ │ │ │ +574 // get coordinates on next coarser level │ │ │ │ │ +575 for (int k=0; k(cg,cg->overlap │ │ │ │ │ +[0].begin(coord))); │ │ │ │ │ +578 } │ │ │ │ │ +579 │ │ │ │ │ +_5_8_1 bool _h_a_s_F_a_t_h_e_r () const │ │ │ │ │ +582 { │ │ │ │ │ +583 return (___g->level()>0); │ │ │ │ │ +584 } │ │ │ │ │ +585 │ │ │ │ │ +_5_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 │ │ │ │ │ +589 { │ │ │ │ │ +590 // configure one of the 2^dim transformations │ │ │ │ │ +591 FieldVector ll(0.0),ur(0.5); │ │ │ │ │ +592 │ │ │ │ │ +593 for (int k=0; k(ll,ur) ); │ │ │ │ │ +603 } │ │ │ │ │ +604 │ │ │ │ │ +_6_0_5 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_0_6 const _Y_G_L_I& _g_r_i_d_l_e_v_e_l () const { return ___g; } │ │ │ │ │ +_6_0_7 _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_0_8 _Y_G_L_I& _g_r_i_d_l_e_v_e_l() { return ___g; } │ │ │ │ │ +_6_0_9 const GridImp* _y_a_s_p_g_r_i_d () const { return ___g->mg; } │ │ │ │ │ +610 │ │ │ │ │ +_6_1_1 bool _i_s_L_e_a_f() const │ │ │ │ │ +612 { │ │ │ │ │ +613 return (___g->level() == _y_a_s_p_g_r_i_d()->maxLevel()); │ │ │ │ │ +614 } │ │ │ │ │ +615 │ │ │ │ │ +_6_1_8 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; } │ │ │ │ │ +619 │ │ │ │ │ +_6_2_2 bool _m_i_g_h_t_V_a_n_i_s_h () const { return false; } │ │ │ │ │ +623 │ │ │ │ │ +_6_2_5 _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 │ │ │ │ │ +626 { │ │ │ │ │ +627 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); │ │ │ │ │ +628 } │ │ │ │ │ +629 │ │ │ │ │ +_6_3_1 _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 │ │ │ │ │ +632 { │ │ │ │ │ +633 // only if entity is leaf this iterator delivers intersections │ │ │ │ │ +634 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() ); │ │ │ │ │ +635 } │ │ │ │ │ +636 │ │ │ │ │ +_6_3_8 _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 │ │ │ │ │ +639 { │ │ │ │ │ +640 return ibegin(); │ │ │ │ │ +641 } │ │ │ │ │ +642 │ │ │ │ │ +_6_4_4 _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 │ │ │ │ │ +645 { │ │ │ │ │ +646 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); │ │ │ │ │ +647 } │ │ │ │ │ +648 │ │ │ │ │ +_6_5_0 _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 │ │ │ │ │ +651 { │ │ │ │ │ +652 return iend(); │ │ │ │ │ +653 } │ │ │ │ │ +654 │ │ │ │ │ +_6_5_6 _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 │ │ │ │ │ +657 { │ │ │ │ │ +658 return iend(); │ │ │ │ │ +659 } │ │ │ │ │ +660 │ │ │ │ │ +_6_6_5 _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 │ │ │ │ │ +666 { │ │ │ │ │ +667 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); │ │ │ │ │ +668 } │ │ │ │ │ +669 │ │ │ │ │ +_6_7_1 _H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r hend (int /* maxlevel */) const │ │ │ │ │ +672 { │ │ │ │ │ +673 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()); │ │ │ │ │ +674 } │ │ │ │ │ +675 │ │ │ │ │ +676 private: │ │ │ │ │ +677 // IndexSets needs access to the private index methods │ │ │ │ │ +678 friend class _D_u_n_e_:_:_Y_a_s_p_I_n_d_e_x_S_e_t; │ │ │ │ │ +679 friend class _D_u_n_e_:_:_Y_a_s_p_I_n_d_e_x_S_e_t; │ │ │ │ │ +680 friend class _D_u_n_e_:_:_Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t; │ │ │ │ │ +681 │ │ │ │ │ +683 _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 │ │ │ │ │ +684 { │ │ │ │ │ +685 // encode codim │ │ │ │ │ +686 _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()); │ │ │ │ │ +687 │ │ │ │ │ +688 // encode level │ │ │ │ │ +689 id = id << _y_a_s_p_g_r_i_d___l_e_v_e_l___b_i_t_s; │ │ │ │ │ +690 id = id+_P_e_r_s_i_s_t_e_n_t_I_n_d_e_x_T_y_p_e(___g->level()); │ │ │ │ │ +691 │ │ │ │ │ +692 │ │ │ │ │ +693 // encode coordinates │ │ │ │ │ +694 for (int i=dim-1; i>=0; i--) │ │ │ │ │ +695 { │ │ │ │ │ +696 id = id << _y_a_s_p_g_r_i_d___d_i_m___b_i_t_s; │ │ │ │ │ +697 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)); │ │ │ │ │ +698 } │ │ │ │ │ +699 │ │ │ │ │ +700 return id; │ │ │ │ │ +701 } │ │ │ │ │ +702 │ │ │ │ │ +704 int _c_o_m_p_r_e_s_s_e_d_I_n_d_e_x () const │ │ │ │ │ +705 { │ │ │ │ │ +706 return ___i_t.superindex(); │ │ │ │ │ +707 } │ │ │ │ │ +708 │ │ │ │ │ +710 _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 │ │ │ │ │ +711 { │ │ │ │ │ +712 // calculate shift and move bitsets │ │ │ │ │ +713 std::bitset shift = Dune::Yasp::entityShift(i,cc); │ │ │ │ │ +714 std::bitset move = Dune::Yasp::entityMove(i,cc); │ │ │ │ │ +715 │ │ │ │ │ +716 int trailing = (cc == dim) ? 1000 : 0; │ │ │ │ │ +717 │ │ │ │ │ +718 std::array size = ___g->mg->levelSize(___g->level()); │ │ │ │ │ +719 std::array coord = ___i_t.coord(); │ │ │ │ │ +720 for (int j=0; jlevel(); k++) │ │ │ │ │ +738 if (coord[j] & (1<level()-trailing); │ │ │ │ │ +752 │ │ │ │ │ +753 // encode coordinates │ │ │ │ │ +754 for (int j=dim-1; j>=0; j--) │ │ │ │ │ +755 { │ │ │ │ │ +756 id = id << _y_a_s_p_g_r_i_d___d_i_m___b_i_t_s; │ │ │ │ │ +757 id = id+_P_e_r_s_i_s_t_e_n_t_I_n_d_e_x_T_y_p_e(coord[j]>>trailing); │ │ │ │ │ +758 } │ │ │ │ │ +759 │ │ │ │ │ +760 return id; │ │ │ │ │ +761 } │ │ │ │ │ +762 │ │ │ │ │ +764 int _s_u_b_C_o_m_p_r_e_s_s_e_d_I_n_d_e_x (int i, int cc) const │ │ │ │ │ +765 { │ │ │ │ │ +766 // get shift and move of the subentity in question │ │ │ │ │ +767 std::bitset shift = Dune::Yasp::entityShift(i,cc); │ │ │ │ │ +768 std::bitset move = Dune::Yasp::entityMove(i,cc); │ │ │ │ │ +769 │ │ │ │ │ +770 std::array coord = ___i_t.coord(); │ │ │ │ │ +771 for (int j=0; joverlapfront[cc].shiftmapping(shift); │ │ │ │ │ +775 return ___g->overlapfront[cc].superindex(coord,which); │ │ │ │ │ +776 } │ │ │ │ │ +777 │ │ │ │ │ +778 _I ___i_t = {}; // position in the grid level │ │ │ │ │ +779 _Y_G_L_I ___g = {}; // access to grid level │ │ │ │ │ +780 }; │ │ │ │ │ +781 │ │ │ │ │ +782 │ │ │ │ │ +783 // specialization for codim=dim (vertex) │ │ │ │ │ +784 template │ │ │ │ │ +_7_8_5 class _Y_a_s_p_E_n_t_i_t_y │ │ │ │ │ +786 : 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 │ │ │ │ │ +787 { │ │ │ │ │ +788 constexpr static int dimworld = GridImp::dimensionworld; │ │ │ │ │ +789 │ │ │ │ │ +790 template │ │ │ │ │ +_7_9_1 friend class _Y_a_s_p_L_e_v_e_l_I_t_e_r_a_t_o_r; │ │ │ │ │ +792 │ │ │ │ │ +793 typedef typename GridImp::Traits::template Codim::GeometryImpl │ │ │ │ │ +_G_e_o_m_e_t_r_y_I_m_p_l; │ │ │ │ │ +794 │ │ │ │ │ +795 public: │ │ │ │ │ +_7_9_6 typedef typename GridImp::ctype _c_t_y_p_e; │ │ │ │ │ +797 │ │ │ │ │ +_7_9_8 typedef typename GridImp::YGridLevelIterator _Y_G_L_I; │ │ │ │ │ +_7_9_9 typedef typename GridImp::YGrid::Iterator _I; │ │ │ │ │ +800 │ │ │ │ │ +_8_0_1 typedef typename GridImp::template Codim::Geometry _G_e_o_m_e_t_r_y; │ │ │ │ │ +802 │ │ │ │ │ +_8_0_3 typedef typename GridImp::template Codim::EntitySeed _E_n_t_i_t_y_S_e_e_d; │ │ │ │ │ +804 │ │ │ │ │ +_8_0_6 typedef typename GridImp::PersistentIndexType _P_e_r_s_i_s_t_e_n_t_I_n_d_e_x_T_y_p_e; │ │ │ │ │ +807 │ │ │ │ │ +_8_0_9 typedef typename GridImp::YGrid::iTupel _i_T_u_p_e_l; │ │ │ │ │ +810 │ │ │ │ │ +811 // constructor │ │ │ │ │ +_8_1_2 _Y_a_s_p_E_n_t_i_t_y () │ │ │ │ │ +813 {} │ │ │ │ │ +814 │ │ │ │ │ +_8_1_5 _Y_a_s_p_E_n_t_i_t_y (const _Y_G_L_I& g, const _I& it) │ │ │ │ │ +816 : ___i_t(it), ___g(g) │ │ │ │ │ +817 {} │ │ │ │ │ +818 │ │ │ │ │ +_8_1_9 _Y_a_s_p_E_n_t_i_t_y (_Y_G_L_I&& g, _I&& it) │ │ │ │ │ +820 : ___i_t(_s_t_d::move(it)), ___g(_s_t_d::move(g)) │ │ │ │ │ +821 {} │ │ │ │ │ +822 │ │ │ │ │ +_8_2_4 bool _e_q_u_a_l_s (const _Y_a_s_p_E_n_t_i_t_y& e) const │ │ │ │ │ +825 { │ │ │ │ │ +826 return ___i_t == e.___i_t && ___g == e.___g; │ │ │ │ │ +827 } │ │ │ │ │ +828 │ │ │ │ │ +_8_3_0 int _l_e_v_e_l () const {return ___g->level();} │ │ │ │ │ +831 │ │ │ │ │ +_8_3_5 _E_n_t_i_t_y_S_e_e_d _s_e_e_d () const { │ │ │ │ │ +836 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())); │ │ │ │ │ +837 } │ │ │ │ │ +838 │ │ │ │ │ +_8_4_3 unsigned int _s_u_b_E_n_t_i_t_i_e_s (unsigned int cc) const │ │ │ │ │ +844 { │ │ │ │ │ +845 return Dune::Yasp::subEnt(dim-dim,cc-dim); │ │ │ │ │ +846 } │ │ │ │ │ +847 │ │ │ │ │ +_8_4_9 _G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y () const { │ │ │ │ │ +850 GeometryImpl _geometry((___i_t).lowerleft()); │ │ │ │ │ +851 return _G_e_o_m_e_t_r_y( _geometry ); │ │ │ │ │ +852 } │ │ │ │ │ +853 │ │ │ │ │ +_8_5_7 constexpr GeometryType _t_y_p_e () const │ │ │ │ │ +858 { │ │ │ │ │ +859 return GeometryTypes::cube(_G_e_o_m_e_t_r_y_:_:_m_y_d_i_m_e_n_s_i_o_n); │ │ │ │ │ +860 } │ │ │ │ │ +861 │ │ │ │ │ +_8_6_3 _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 │ │ │ │ │ +864 { │ │ │ │ │ +865 if (___g->interior[dim].inside(___i_t.coord(),___i_t.shift())) │ │ │ │ │ +866 return _I_n_t_e_r_i_o_r_E_n_t_i_t_y; │ │ │ │ │ +867 if (___g->interiorborder[dim].inside(___i_t.coord(),___i_t.shift())) │ │ │ │ │ +868 return _B_o_r_d_e_r_E_n_t_i_t_y; │ │ │ │ │ +869 if (___g->overlap[dim].inside(___i_t.coord(),___i_t.shift())) │ │ │ │ │ +870 return _O_v_e_r_l_a_p_E_n_t_i_t_y; │ │ │ │ │ +871 if (___g->overlapfront[dim].inside(___i_t.coord(),___i_t.shift())) │ │ │ │ │ +872 return _F_r_o_n_t_E_n_t_i_t_y; │ │ │ │ │ +873 return _G_h_o_s_t_E_n_t_i_t_y; │ │ │ │ │ +874 } │ │ │ │ │ +875 │ │ │ │ │ +_8_7_7 int _s_u_b_C_o_m_p_r_e_s_s_e_d_I_n_d_e_x (int, unsigned int ) const │ │ │ │ │ +878 { │ │ │ │ │ +879 return _c_o_m_p_r_e_s_s_e_d_I_n_d_e_x(); │ │ │ │ │ +880 } │ │ │ │ │ +881 │ │ │ │ │ +882 private: │ │ │ │ │ +883 // IndexSets needs access to the private index methods │ │ │ │ │ +884 friend class _D_u_n_e_:_:_Y_a_s_p_I_n_d_e_x_S_e_t; │ │ │ │ │ +885 friend class _D_u_n_e_:_:_Y_a_s_p_I_n_d_e_x_S_e_t; │ │ │ │ │ +886 friend class _D_u_n_e_:_:_Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t; │ │ │ │ │ +887 │ │ │ │ │ +889 _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 │ │ │ │ │ +890 { │ │ │ │ │ +891 // get coordinate and size of global grid │ │ │ │ │ +892 iTupel size = ___g->mg->levelSize(___g->level()); │ │ │ │ │ +893 │ │ │ │ │ +894 for (int i=0; ilevel(); j++) │ │ │ │ │ +907 if (___i_t.coord(i)&(1<level()-trailing; │ │ │ │ │ +916 │ │ │ │ │ +917 // encode codim: shift vector of vertices is 0. │ │ │ │ │ +918 _P_e_r_s_i_s_t_e_n_t_I_n_d_e_x_T_y_p_e id(0); │ │ │ │ │ +919 │ │ │ │ │ +920 // encode level │ │ │ │ │ +921 id = id << _y_a_s_p_g_r_i_d___l_e_v_e_l___b_i_t_s; │ │ │ │ │ +922 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); │ │ │ │ │ +923 │ │ │ │ │ +924 // encode coordinates │ │ │ │ │ +925 for (int i=dim-1; i>=0; i--) │ │ │ │ │ +926 { │ │ │ │ │ +927 id = id << _y_a_s_p_g_r_i_d___d_i_m___b_i_t_s; │ │ │ │ │ +928 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); │ │ │ │ │ +929 } │ │ │ │ │ +930 │ │ │ │ │ +931 return id; │ │ │ │ │ +932 } │ │ │ │ │ +933 │ │ │ │ │ +935 int _c_o_m_p_r_e_s_s_e_d_I_n_d_e_x () const { return ___i_t.superindex();} │ │ │ │ │ +936 │ │ │ │ │ +937 public: │ │ │ │ │ +_9_3_8 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_3_9 const _Y_G_L_I& _g_r_i_d_l_e_v_e_l() const { return ___g; } │ │ │ │ │ +_9_4_0 _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_4_1 _Y_G_L_I& _g_r_i_d_l_e_v_e_l() { return ___g; } │ │ │ │ │ +942 │ │ │ │ │ +_9_4_3 const GridImp * _y_a_s_p_g_r_i_d() const { return ___g->mg; } │ │ │ │ │ +944 protected: │ │ │ │ │ +_9_4_5 _I ___i_t = {}; // position in the grid level │ │ │ │ │ +_9_4_6 _Y_G_L_I ___g = {}; // access to grid level │ │ │ │ │ +947 }; │ │ │ │ │ +948 │ │ │ │ │ +949} // namespace Dune │ │ │ │ │ +950 │ │ │ │ │ +951#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_:_:_l_e_v_e_l │ │ │ │ │ +_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:242 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_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:538 │ │ │ │ │ -_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:166 │ │ │ │ │ -_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 │ │ │ │ │ +level of this element │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:256 │ │ │ │ │ +_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:270 │ │ │ │ │ +_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:248 │ │ │ │ │ +_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:279 │ │ │ │ │ +_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:333 │ │ │ │ │ +_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:394 │ │ │ │ │ +_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:393 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_:_:___g │ │ │ │ │ +YGLI _g │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:400 │ │ │ │ │ +_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:321 │ │ │ │ │ +_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:294 │ │ │ │ │ +_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:251 │ │ │ │ │ +_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:396 │ │ │ │ │ +_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:370 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_:_:_Y_G_L_I │ │ │ │ │ +GridImp::YGridLevelIterator YGLI │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:307 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_:_:_I │ │ │ │ │ +GridImp::YGrid::Iterator I │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:308 │ │ │ │ │ +_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:397 │ │ │ │ │ +_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:253 │ │ │ │ │ +_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:316 │ │ │ │ │ +_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:264 │ │ │ │ │ +_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:364 │ │ │ │ │ +_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:312 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_:_:___i_t │ │ │ │ │ +I _it │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:399 │ │ │ │ │ +_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:309 │ │ │ │ │ +_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:250 │ │ │ │ │ +_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:330 │ │ │ │ │ +_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:288 │ │ │ │ │ +_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:395 │ │ │ │ │ +_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_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: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_ _>_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y │ │ │ │ │ +GridImp::template Codim< 0 >::LocalGeometry LocalGeometry │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:426 │ │ │ │ │ +_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: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_ _>_:_:_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: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(const YGLI &g, I &&it) │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:455 │ │ │ │ │ +_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:528 │ │ │ │ │ +_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:435 │ │ │ │ │ +_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:442 │ │ │ │ │ +_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:445 │ │ │ │ │ +_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:606 │ │ │ │ │ +_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: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_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:605 │ │ │ │ │ +_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:420 │ │ │ │ │ +_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:608 │ │ │ │ │ +_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: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_ _>_:_:_y_a_s_p_g_r_i_d │ │ │ │ │ +const GridImp * yaspgrid() const │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:609 │ │ │ │ │ +_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:470 │ │ │ │ │ +_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:438 │ │ │ │ │ +_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:459 │ │ │ │ │ +_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:480 │ │ │ │ │ +_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:656 │ │ │ │ │ +_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:622 │ │ │ │ │ +_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:439 │ │ │ │ │ +_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 yaspgridentity.hh:434 │ │ │ │ │ +_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:638 │ │ │ │ │ +_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:650 │ │ │ │ │ +_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: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_ _>_:_:_I │ │ │ │ │ +GridImp::YGrid::Iterator I │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:423 │ │ │ │ │ +_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:425 │ │ │ │ │ +_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:491 │ │ │ │ │ +_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:561 │ │ │ │ │ +_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:618 │ │ │ │ │ +_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:519 │ │ │ │ │ +_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:475 │ │ │ │ │ +_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:665 │ │ │ │ │ +_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:625 │ │ │ │ │ +_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 yaspgridentity.hh:422 │ │ │ │ │ +_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:537 │ │ │ │ │ +_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:588 │ │ │ │ │ +_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:436 │ │ │ │ │ +_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:437 │ │ │ │ │ +_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: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_ _>_:_:_i_s_L_e_a_f │ │ │ │ │ +bool isLeaf() const │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:611 │ │ │ │ │ +_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:581 │ │ │ │ │ +_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:431 │ │ │ │ │ +_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:830 │ │ │ │ │ +_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: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_ _>_:_:_g_r_i_d_l_e_v_e_l │ │ │ │ │ +YGLI & gridlevel() │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:941 │ │ │ │ │ +_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:849 │ │ │ │ │ +_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:815 │ │ │ │ │ +_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:843 │ │ │ │ │ +_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:863 │ │ │ │ │ +_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:796 │ │ │ │ │ +_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:798 │ │ │ │ │ +_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:806 │ │ │ │ │ +_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: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_ _>_:_:_y_a_s_p_g_r_i_d │ │ │ │ │ +const GridImp * yaspgrid() const │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:943 │ │ │ │ │ +_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:857 │ │ │ │ │ +_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:799 │ │ │ │ │ +_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:940 │ │ │ │ │ +_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:938 │ │ │ │ │ +_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:809 │ │ │ │ │ +_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:801 │ │ │ │ │ +_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:939 │ │ │ │ │ +_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:819 │ │ │ │ │ +_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:812 │ │ │ │ │ +_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:803 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00173.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: yaspgridentityseed.hh File Reference │ │ │ │ +dune-grid: partitioning.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,37 +72,49 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
yaspgridentityseed.hh File Reference
│ │ │ │ +
partitioning.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

The YaspEntitySeed class. │ │ │ │ +

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

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

│ │ │ │ Namespaces

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

Detailed Description

│ │ │ │ -

The YaspEntitySeed class.

│ │ │ │ +

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,23 +2,43 @@ │ │ │ │ │ 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_._._. │ │ │ │ │ +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 │ │ │ │ │ _G_o_ _t_o_ _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_:_:_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_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ +namespace   _D_u_n_e_:_:_Y_a_s_p │ │ │ │ │ +  │ │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -The YaspEntitySeed class. │ │ │ │ │ +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/a00173_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: yaspgridentityseed.hh Source File │ │ │ │ +dune-grid: partitioning.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,82 +74,187 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
yaspgridentityseed.hh
│ │ │ │ +
partitioning.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ -
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
│ │ │ │ +
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
│ │ │ │ +
17namespace Dune
│ │ │ │ +
18{
│ │ │ │ +
19
│ │ │ │ +
20 namespace Yasp
│ │ │ │ +
21 {
│ │ │ │ +
22
│ │ │ │ +
36 template<int d>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
38 {
│ │ │ │ +
39 public:
│ │ │ │ +
40 using iTupel = std::array<int, d>;
│ │ │ │ +
41 virtual ~Partitioning() = default;
│ │ │ │ +
42 virtual void partition(const iTupel&, int, iTupel&, int) const = 0;
│ │ │ │ +
43 };
│ │ │ │ +
│ │ │ │ +
44
│ │ │ │ +
45 template<int d>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
47 {
│ │ │ │ +
48 public:
│ │ │ │ +
49 using iTupel = std::array<int, d>;
│ │ │ │ +
50
│ │ │ │ +
│ │ │ │ +
56 void partition (const iTupel& size, int P, iTupel& dims, int overlap) const final
│ │ │ │ +
57 {
│ │ │ │ +
58 double opt=1E100;
│ │ │ │ +
59 iTupel trydims;
│ │ │ │ +
60
│ │ │ │ +
61 trydims.fill(-1);
│ │ │ │ +
62 dims.fill(-1);
│ │ │ │ +
63
│ │ │ │ +
64 optimize_dims(d-1,size,P,dims,trydims,opt,overlap);
│ │ │ │ +
65 if (dims[0] == -1)
│ │ │ │ +
66 DUNE_THROW(Dune::GridError, "Failed to find a suitable partition");
│ │ │ │ +
67 }
│ │ │ │ +
│ │ │ │ +
68
│ │ │ │ +
69 private:
│ │ │ │ +
70 void optimize_dims (int i, const iTupel& size, int P, iTupel& dims, iTupel& trydims, double &opt, int overlap ) const
│ │ │ │ +
71 {
│ │ │ │ +
72 if (i>0) // test all subdivisions recursively
│ │ │ │ +
73 {
│ │ │ │ +
74 for (int k=1; k<=P; k++)
│ │ │ │ +
75 if (
│ │ │ │ +
76 P%k==0 // k divides P
│ │ │ │ +
77 and (
│ │ │ │ +
78 k == 1 // no neighbors
│ │ │ │ +
79 or
│ │ │ │ +
80 size[i] / k >= 2*overlap // size sufficient for overlap
│ │ │ │ +
81 )
│ │ │ │ +
82 )
│ │ │ │ +
83 {
│ │ │ │ +
84 // P divisible by k
│ │ │ │ +
85 trydims[i] = k;
│ │ │ │ +
86 optimize_dims(i-1,size,P/k,dims,trydims,opt,overlap);
│ │ │ │ +
87 }
│ │ │ │ +
88 }
│ │ │ │ +
89 else
│ │ │ │ +
90 {
│ │ │ │ +
91 // found a possible combination
│ │ │ │ +
92 if (
│ │ │ │ +
93 P == 1 // no neighbors
│ │ │ │ +
94 or
│ │ │ │ +
95 size[0] / P >= 2*overlap // size sufficient for overlap
│ │ │ │ +
96 )
│ │ │ │ +
97 trydims[0] = P;
│ │ │ │ +
98 else
│ │ │ │ +
99 return;
│ │ │ │ +
100
│ │ │ │ +
101 // check for optimality
│ │ │ │ +
102 double m = -1.0;
│ │ │ │ +
103
│ │ │ │ +
104 for (int k=0; k<d; k++)
│ │ │ │ +
105 {
│ │ │ │ +
106 double mm=((double)size[k])/((double)trydims[k]);
│ │ │ │ +
107 if (fmod((double)size[k],(double)trydims[k])>0.0001) mm*=3;
│ │ │ │ +
108 if ( mm > m ) m = mm;
│ │ │ │ +
109 }
│ │ │ │ +
110 //if (_rank==0) std::cout << "optimize_dims: " << size << " | " << trydims << " norm=" << m << std::endl;
│ │ │ │ +
111 if (m<opt)
│ │ │ │ +
112 {
│ │ │ │ +
113 opt = m;
│ │ │ │ +
114 dims = trydims;
│ │ │ │ +
115 }
│ │ │ │ +
116 }
│ │ │ │ +
117 }
│ │ │ │ +
118 };
│ │ │ │ +
│ │ │ │ +
119
│ │ │ │ +
122 template<int d>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
124 {
│ │ │ │ +
125 public:
│ │ │ │ +
126 typedef std::array<int, d> iTupel;
│ │ │ │ + │ │ │ │ +
128
│ │ │ │ +
│ │ │ │ +
129 void partition (const iTupel& size, int P, iTupel& dims, int overlap) const final
│ │ │ │ +
130 {
│ │ │ │ +
131 for (int i=1; i<=P; ++i)
│ │ │ │ +
132 if (Dune::power(i, d) == P) {
│ │ │ │ +
133 std::fill(dims.begin(), dims.end(),i);
│ │ │ │ +
134 return;
│ │ │ │ +
135 }
│ │ │ │ +
136
│ │ │ │ +
137 DUNE_THROW(GridError, "Power partitioning failed: your number of processes needs to be a " << d << "-th power.");
│ │ │ │ +
138 }
│ │ │ │ +
│ │ │ │ +
139 };
│ │ │ │ +
│ │ │ │ +
140
│ │ │ │ +
145 template<int d>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
147 {
│ │ │ │ +
148 public:
│ │ │ │ +
149 FixedSizePartitioning(const std::array<int,d>& dims) : _dims(dims) {}
│ │ │ │ +
150
│ │ │ │ + │ │ │ │ +
152
│ │ │ │ +
│ │ │ │ +
153 void partition(const std::array<int,d>&, int P, std::array<int,d>& dims, int overlap) const final
│ │ │ │ +
154 {
│ │ │ │ +
155 int prod = 1;
│ │ │ │ +
156 for (int i=0; i<d; i++)
│ │ │ │ +
157 prod *= _dims[i];
│ │ │ │ +
158 if (P != prod)
│ │ │ │ +
159 DUNE_THROW(Dune::Exception,"Your processor number doesn't match your partitioning information");
│ │ │ │ +
160 dims = _dims;
│ │ │ │ +
161 }
│ │ │ │ +
│ │ │ │ +
162
│ │ │ │ +
163 private:
│ │ │ │ +
164 std::array<int,d> _dims;
│ │ │ │ +
165 };
│ │ │ │ +
│ │ │ │ +
166
│ │ │ │ +
168 }
│ │ │ │ +
169}
│ │ │ │ +
170
│ │ │ │ +
171#endif
│ │ │ │
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
│ │ │ │ +
Base class for exceptions in Dune grid modules.
Definition exceptions.hh:20
│ │ │ │ +
a base class for the yaspgrid partitioning strategy
Definition partitioning.hh:38
│ │ │ │ +
std::array< int, d > iTupel
Definition partitioning.hh:40
│ │ │ │ +
virtual ~Partitioning()=default
│ │ │ │ +
virtual void partition(const iTupel &, int, iTupel &, int) const =0
│ │ │ │ +
Definition partitioning.hh:47
│ │ │ │ +
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:56
│ │ │ │ +
std::array< int, d > iTupel
Definition partitioning.hh:49
│ │ │ │ +
Implement yaspgrid load balance strategy for P=x^{dim} processors.
Definition partitioning.hh:124
│ │ │ │ +
virtual ~PowerDPartitioning()
Definition partitioning.hh:127
│ │ │ │ +
std::array< int, d > iTupel
Definition partitioning.hh:126
│ │ │ │ +
void partition(const iTupel &size, int P, iTupel &dims, int overlap) const final
Definition partitioning.hh:129
│ │ │ │ +
Implement partitioner that gets a fixed partitioning from an array If the given partitioning doesn't ...
Definition partitioning.hh:147
│ │ │ │ +
void partition(const std::array< int, d > &, int P, std::array< int, d > &dims, int overlap) const final
Definition partitioning.hh:153
│ │ │ │ +
FixedSizePartitioning(const std::array< int, d > &dims)
Definition partitioning.hh:149
│ │ │ │ +
virtual ~FixedSizePartitioning()
Definition partitioning.hh:151
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,98 +1,211 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _y_a_s_p_g_r_i_d │ │ │ │ │ -yaspgridentityseed.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 © 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 │ │ │ │ │ -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 } │ │ │ │ │ -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 │ │ │ │ │ +3#ifndef DUNE_GRID_YASPGRID_PARTITIONING_HH │ │ │ │ │ +4#define DUNE_GRID_YASPGRID_PARTITIONING_HH │ │ │ │ │ +5 │ │ │ │ │ +13#include │ │ │ │ │ +14 │ │ │ │ │ +15#include │ │ │ │ │ +16 │ │ │ │ │ +17namespace _D_u_n_e │ │ │ │ │ +18{ │ │ │ │ │ +19 │ │ │ │ │ +20 namespace Yasp │ │ │ │ │ +21 { │ │ │ │ │ +22 │ │ │ │ │ +36 template │ │ │ │ │ +_3_7 class _P_a_r_t_i_t_i_o_n_i_n_g │ │ │ │ │ +38 { │ │ │ │ │ +39 public: │ │ │ │ │ +_4_0 using _i_T_u_p_e_l = std::array; │ │ │ │ │ +_4_1 virtual _~_P_a_r_t_i_t_i_o_n_i_n_g() = default; │ │ │ │ │ +_4_2 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; │ │ │ │ │ +43 }; │ │ │ │ │ +44 │ │ │ │ │ +45 template │ │ │ │ │ +_4_6 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 │ │ │ │ │ +47 { │ │ │ │ │ +48 public: │ │ │ │ │ +_4_9 using _i_T_u_p_e_l = std::array; │ │ │ │ │ +50 │ │ │ │ │ +_5_6 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 │ │ │ │ │ +57 { │ │ │ │ │ +58 double opt=1E100; │ │ │ │ │ +59 _i_T_u_p_e_l trydims; │ │ │ │ │ +60 │ │ │ │ │ +61 trydims.fill(-1); │ │ │ │ │ +62 dims.fill(-1); │ │ │ │ │ +63 │ │ │ │ │ +64 optimize_dims(d-1,size,P,dims,trydims,opt,overlap); │ │ │ │ │ +65 if (dims[0] == -1) │ │ │ │ │ +66 DUNE_THROW(_D_u_n_e_:_:_G_r_i_d_E_r_r_o_r, "Failed to find a suitable partition"); │ │ │ │ │ +67 } │ │ │ │ │ +68 │ │ │ │ │ +69 private: │ │ │ │ │ +70 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 │ │ │ │ │ +71 { │ │ │ │ │ +72 if (i>0) // test all subdivisions recursively │ │ │ │ │ +73 { │ │ │ │ │ +74 for (int k=1; k<=P; k++) │ │ │ │ │ +75 if ( │ │ │ │ │ +76 P%k==0 // k divides P │ │ │ │ │ +77 and ( │ │ │ │ │ +78 k == 1 // no neighbors │ │ │ │ │ +79 or │ │ │ │ │ +80 size[i] / k >= 2*overlap // size sufficient for overlap │ │ │ │ │ +81 ) │ │ │ │ │ +82 ) │ │ │ │ │ +83 { │ │ │ │ │ +84 // P divisible by k │ │ │ │ │ +85 trydims[i] = k; │ │ │ │ │ +86 optimize_dims(i-1,size,P/k,dims,trydims,opt,overlap); │ │ │ │ │ +87 } │ │ │ │ │ +88 } │ │ │ │ │ +89 else │ │ │ │ │ +90 { │ │ │ │ │ +91 // found a possible combination │ │ │ │ │ +92 if ( │ │ │ │ │ +93 P == 1 // no neighbors │ │ │ │ │ +94 or │ │ │ │ │ +95 size[0] / P >= 2*overlap // size sufficient for overlap │ │ │ │ │ +96 ) │ │ │ │ │ +97 trydims[0] = P; │ │ │ │ │ +98 else │ │ │ │ │ +99 return; │ │ │ │ │ +100 │ │ │ │ │ +101 // check for optimality │ │ │ │ │ +102 double m = -1.0; │ │ │ │ │ +103 │ │ │ │ │ +104 for (int k=0; k0.0001) mm*=3; │ │ │ │ │ +108 if ( mm > m ) m = mm; │ │ │ │ │ +109 } │ │ │ │ │ +110 //if (_rank==0) std::cout << "optimize_dims: " << size << " | " << trydims │ │ │ │ │ +<< " norm=" << m << std::endl; │ │ │ │ │ +111 if (m │ │ │ │ │ +_1_2_3 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 │ │ │ │ │ +124 { │ │ │ │ │ +125 public: │ │ │ │ │ +_1_2_6 typedef std::array _i_T_u_p_e_l; │ │ │ │ │ +_1_2_7 virtual _~_P_o_w_e_r_D_P_a_r_t_i_t_i_o_n_i_n_g() {} │ │ │ │ │ +128 │ │ │ │ │ +_1_2_9 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 │ │ │ │ │ +130 { │ │ │ │ │ +131 for (int i=1; i<=P; ++i) │ │ │ │ │ +132 if (Dune::power(i, d) == P) { │ │ │ │ │ +133 std::fill(dims.begin(), dims.end(),i); │ │ │ │ │ +134 return; │ │ │ │ │ +135 } │ │ │ │ │ +136 │ │ │ │ │ +137 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."); │ │ │ │ │ +138 } │ │ │ │ │ +139 }; │ │ │ │ │ +140 │ │ │ │ │ +145 template │ │ │ │ │ +_1_4_6 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 │ │ │ │ │ +147 { │ │ │ │ │ +148 public: │ │ │ │ │ +_1_4_9 _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) {} │ │ │ │ │ +150 │ │ │ │ │ +_1_5_1 virtual _~_F_i_x_e_d_S_i_z_e_P_a_r_t_i_t_i_o_n_i_n_g() {} │ │ │ │ │ +152 │ │ │ │ │ +_1_5_3 void _p_a_r_t_i_t_i_o_n(const std::array&, int P, std::array& dims, │ │ │ │ │ +int overlap) const final │ │ │ │ │ +154 { │ │ │ │ │ +155 int prod = 1; │ │ │ │ │ +156 for (int i=0; i _dims; │ │ │ │ │ +165 }; │ │ │ │ │ +166 │ │ │ │ │ +168 } │ │ │ │ │ +169} │ │ │ │ │ +170 │ │ │ │ │ +171#endif │ │ │ │ │ _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) │ │ │ │ │ -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 │ │ │ │ │ +_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:38 │ │ │ │ │ +_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:40 │ │ │ │ │ +_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:47 │ │ │ │ │ +_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:56 │ │ │ │ │ +_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:49 │ │ │ │ │ +_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:124 │ │ │ │ │ +_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: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_:_:_i_T_u_p_e_l │ │ │ │ │ +std::array< int, d > iTupel │ │ │ │ │ +DDeeffiinniittiioonn partitioning.hh:126 │ │ │ │ │ +_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:129 │ │ │ │ │ +_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:147 │ │ │ │ │ +_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:153 │ │ │ │ │ +_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:149 │ │ │ │ │ +_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:151 │ │ │ │ │ =============================================================================== │ │ │ │ │ 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: yaspgridgeometry.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,63 +71,47 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces | │ │ │ │ -Functions
│ │ │ │ -
coordinates.hh File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
yaspgridgeometry.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. │ │ │ │ +

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

│ │ │ │ -
#include <array>
│ │ │ │ -#include <bitset>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/common/fvector.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::YaspGeometry< mydim, cdim, GridImp >
 The general version that handles all codimensions but 0 and dim. More...
 
class  Dune::EquidistantOffsetCoordinates< ct, dim >
 Container for equidistant coordinates in a YaspGrid with non-trivial origin. More...
class  Dune::YaspGeometry< mydim, mydim, GridImp >
 specialize for dim=dimworld, i.e. a volume element More...
 
class  Dune::TensorProductCoordinates< ct, dim >
 Coordinate container for a tensor product YaspGrid. More...
class  Dune::YaspGeometry< 0, cdim, GridImp >
 specialization for dim=0, this is a vertex More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ -

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

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.

│ │ │ │ +

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,55 +1,37 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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_._._. │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +_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_._._. │ │ │ │ │ _G_o_ _t_o_ _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_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_:_:_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_._._. │ │ │ │ │ +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_:_:_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_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. │ │ │ │ │   │ │ │ │ │ -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. │ │ │ │ │ +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/a00176_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: coordinates.hh Source File │ │ │ │ +dune-grid: yaspgridgeometry.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,384 +74,97 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
coordinates.hh
│ │ │ │ +
yaspgridgeometry.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_YASPGRIDGEOMETRY_HH
│ │ │ │ +
6#define DUNE_GRID_YASPGRIDGEOMETRY_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;
│ │ │ │ +
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
│ │ │ │ - │ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ -
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
│ │ │ │ -
│ │ │ │ -
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;
│ │ │ │ -
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
│ │ │ │ -
std::ostream & operator<<(std::ostream &out, const PartitionType &type)
write a PartitionType to a stream
Definition gridenums.hh:72
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │
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
│ │ │ │ +
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,426 +1,111 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _y_a_s_p_g_r_i_d │ │ │ │ │ -coordinates.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 © 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_YASPGRIDGEOMETRY_HH │ │ │ │ │ +6#define DUNE_GRID_YASPGRIDGEOMETRY_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; │ │ │ │ │ +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 _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) │ │ │ │ │ +_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 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) │ │ │ │ │ -151 { │ │ │ │ │ -152 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 │ │ │ │ │ -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 │ │ │ │ │ -_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 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& 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 │ │ │ │ │ _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() │ │ │ │ │ -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_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 │ │ │ │ │ =============================================================================== │ │ │ │ │ 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: ygrid.hh File Reference │ │ │ │ +dune-grid: yaspgridintersection.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,81 +71,39 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces | │ │ │ │ -Functions
│ │ │ │ -
ygrid.hh File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
yaspgridintersection.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

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

The YaspIntersection class. │ │ │ │ More...

│ │ │ │ -
#include <array>
│ │ │ │ -#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::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...
 
struct  Dune::YGridList< Coordinates >::Intersection
 type describing an intersection with a neighboring processor More...
 
class  Dune::YGridList< Coordinates >::Iterator
class  Dune::YaspIntersection< GridImp >
 YaspIntersection provides data about intersection with neighboring codim 0 entities. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ -

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

Detailed Description

│ │ │ │ -

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

│ │ │ │ +

The YaspIntersection class.

│ │ │ │ +

YaspIntersection provides data about intersection with neighboring codim 0 entities.

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,82 +1,26 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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. │ │ │ │ │ -_M_o_r_e_._._. │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +yaspgridintersection.hh File Reference │ │ │ │ │ +The YaspIntersection 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_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_._._. │ │ │ │ │ -  │ │ │ │ │ -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_:_:_Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +  _Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n provides data about intersection with neighboring │ │ │ │ │ + codim 0 entities. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ 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. │ │ │ │ │ -  │ │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -This provides a YGrid, the elemental component of the yaspgrid implementation. │ │ │ │ │ +The YaspIntersection class. │ │ │ │ │ +YaspIntersection provides data about intersection with neighboring codim 0 │ │ │ │ │ +entities. │ │ │ │ │ =============================================================================== │ │ │ │ │ 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: ygrid.hh Source File │ │ │ │ +dune-grid: yaspgridintersection.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,1171 +74,401 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
ygrid.hh
│ │ │ │ +
yaspgridintersection.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_YASPGRIDINTERSECTION_HH
│ │ │ │ +
6#define DUNE_GRID_YASPGRIDINTERSECTION_HH
│ │ │ │
7
│ │ │ │ -
8#include <array>
│ │ │ │ -
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>
│ │ │ │ +
15namespace Dune {
│ │ │ │
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;
│ │ │ │ +
20 template<class GridImp>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
22 {
│ │ │ │ +
23 constexpr static int dim = GridImp::dimension;
│ │ │ │ +
24 constexpr static int dimworld = GridImp::dimensionworld;
│ │ │ │ +
25 typedef typename GridImp::ctype ctype;
│ │ │ │ +
26
│ │ │ │ +
27 typedef typename GridImp::Traits::template Codim< 1 >::GeometryImpl GeometryImpl;
│ │ │ │ +
28 typedef typename GridImp::Traits::template Codim< 1 >::LocalGeometryImpl LocalGeometryImpl;
│ │ │ │ +
29
│ │ │ │ +
30 friend class YaspIntersectionIterator<GridImp>;
│ │ │ │ +
31
│ │ │ │ +
32 public:
│ │ │ │ +
33 // types used from grids
│ │ │ │ +
34 typedef typename GridImp::YGridLevelIterator YGLI;
│ │ │ │ +
35 typedef typename GridImp::YGrid::Iterator I;
│ │ │ │ +
36 typedef typename GridImp::template Codim<0>::Entity Entity;
│ │ │ │ +
37 typedef typename GridImp::template Codim<1>::Geometry Geometry;
│ │ │ │ +
38 typedef typename GridImp::template Codim<1>::LocalGeometry LocalGeometry;
│ │ │ │ +
39
│ │ │ │ +
│ │ │ │ +
40 void update() {
│ │ │ │ +
41
│ │ │ │ +
42 // vector with per-direction movements
│ │ │ │ +
43 std::array<int,dim> dist{{0}};
│ │ │ │ +
44
│ │ │ │ +
45 // first move: back to center
│ │ │ │ +
46 dist[_dir] = 1 - 2*_face;
│ │ │ │ +
47
│ │ │ │ +
48 // update face info
│ │ │ │ +
49 _dir = _count / 2;
│ │ │ │ +
50 _face = _count % 2;
│ │ │ │ +
51
│ │ │ │ +
52 // second move: to new neighbor
│ │ │ │ +
53 dist[_dir] += -1 + 2*_face;
│ │ │ │ +
54
│ │ │ │ +
55 // move transforming iterator
│ │ │ │ +
56 _outside.transformingsubiterator().move(dist);
│ │ │ │ +
57 }
│ │ │ │ +
│ │ │ │ +
58
│ │ │ │ +
│ │ │ │ +
62 bool boundary () const
│ │ │ │ +
63 {
│ │ │ │ +
64 // Coordinate of intersection in its direction
│ │ │ │ +
65 int coord = _inside.transformingsubiterator().coord(_dir) + _face;
│ │ │ │ +
66 if (_inside.gridlevel()->mg->isPeriodic(_dir))
│ │ │ │ +
67 return false;
│ │ │ │ +
68 else
│ │ │ │ +
69 return coord == 0
│ │ │ │ +
70 ||
│ │ │ │ +
71 coord == _inside.gridlevel()->mg->levelSize(_inside.gridlevel()->level(),_dir);
│ │ │ │ +
72 }
│ │ │ │ +
│ │ │ │ +
73
│ │ │ │ +
│ │ │ │ +
75 bool neighbor () const
│ │ │ │ +
76 {
│ │ │ │ +
77 // Coordinate of intersection in its direction
│ │ │ │ +
78 int coord = _inside.transformingsubiterator().coord(_dir) + _face;
│ │ │ │ +
79 return coord > _inside.gridlevel()->overlap[0].dataBegin()->min(_dir)
│ │ │ │ +
80 &&
│ │ │ │ +
81 coord <= _inside.gridlevel()->overlap[0].dataBegin()->max(_dir);
│ │ │ │ +
82 }
│ │ │ │ +
│ │ │ │
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 {}
│ │ │ │ +
85 bool conforming () const
│ │ │ │ +
86 {
│ │ │ │ +
87 return true;
│ │ │ │ +
88 }
│ │ │ │ +
│ │ │ │ +
89
│ │ │ │ +
│ │ │ │ +
92 Entity inside() const
│ │ │ │ +
93 {
│ │ │ │ +
94 return Entity(_inside);
│ │ │ │ +
95 }
│ │ │ │ +
│ │ │ │ +
96
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
99 {
│ │ │ │ +
100 return Entity(_outside);
│ │ │ │ +
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 }
│ │ │ │ -
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
106 {
│ │ │ │ +
107 if(! boundary())
│ │ │ │ +
108 DUNE_THROW(GridError, "called boundarySegmentIndex while boundary() == false");
│ │ │ │ +
109 // size of local macro grid
│ │ │ │ +
110 const std::array<int, dim> & size = _inside.gridlevel()->mg->begin()->overlap[0].dataBegin()->size();
│ │ │ │ +
111 const std::array<int, dim> & origin = _inside.gridlevel()->mg->begin()->overlap[0].dataBegin()->origin();
│ │ │ │ +
112 std::array<int, dim> sides;
│ │ │ │ +
113 {
│ │ │ │ +
114 for (int i=0; i<dim; i++)
│ │ │ │ +
115 {
│ │ │ │ +
116 sides[i] =
│ │ │ │ +
117 ((_inside.gridlevel()->mg->begin()->overlap[0].dataBegin()->origin(i)
│ │ │ │ +
118 == 0)+
│ │ │ │ +
119 (_inside.gridlevel()->mg->begin()->overlap[0].dataBegin()->origin(i) +
│ │ │ │ +
120 _inside.gridlevel()->mg->begin()->overlap[0].dataBegin()->size(i)
│ │ │ │ +
121 ==
│ │ │ │ +
122 _inside.gridlevel()->mg->levelSize(0,i)));
│ │ │ │ +
123
│ │ │ │ +
124 }
│ │ │ │ +
125 }
│ │ │ │ +
126 // global position of the cell on macro grid
│ │ │ │ +
127 std::array<int, dim> pos = _inside.transformingsubiterator().coord();
│ │ │ │ +
128 for(int i=0; i<dim; i++)
│ │ │ │ +
129 {
│ │ │ │ +
130 pos[i] = pos[i] / (1<<_inside.level());
│ │ │ │ +
131 pos[i] = pos[i] - origin[i];
│ │ │ │ +
132 }
│ │ │ │ +
133 // compute unit-cube-face-sizes
│ │ │ │ +
134 std::array<int, dim> fsize;
│ │ │ │ +
135 {
│ │ │ │ +
136 int vol = 1;
│ │ │ │ +
137 for (int k=0; k<dim; k++)
│ │ │ │ +
138 vol *= size[k];
│ │ │ │ +
139 for (int k=0; k<dim; k++)
│ │ │ │ +
140 fsize[k] = vol/size[k];
│ │ │ │ +
141 }
│ │ │ │ +
142 // compute index in the unit-cube-face
│ │ │ │ +
143 int index = 0;
│ │ │ │ +
144 {
│ │ │ │ +
145 int localoffset = 1;
│ │ │ │ +
146 for (int k=dim-1; k>=0; k--)
│ │ │ │ +
147 {
│ │ │ │ +
148 if (k == _dir) continue;
│ │ │ │ +
149 index += (pos[k]) * localoffset;
│ │ │ │ +
150 localoffset *= size[k];
│ │ │ │ +
151 }
│ │ │ │ +
152 }
│ │ │ │ +
153 // add unit-cube-face-offsets
│ │ │ │ +
154 {
│ │ │ │ +
155 for (int k=0; k<_dir; k++)
│ │ │ │ +
156 index += sides[k] * fsize[k];
│ │ │ │ +
157 // add fsize if we are on the right face and there is a left-face-boundary on this processor
│ │ │ │ +
158 index += _face * (sides[_dir]>1) * fsize[_dir];
│ │ │ │ +
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;
│ │ │ │ +
161 return index;
│ │ │ │ +
162 }
│ │ │ │ +
│ │ │ │ +
163
│ │ │ │ +
│ │ │ │ +
165 FieldVector<ctype, dimworld> outerNormal (const FieldVector<ctype, dim-1>& /* local */) const
│ │ │ │ +
166 {
│ │ │ │ +
167 return centerUnitOuterNormal();
│ │ │ │ +
168 }
│ │ │ │ +
│ │ │ │ +
169
│ │ │ │ +
│ │ │ │ +
171 FieldVector<ctype, dimworld> unitOuterNormal (const FieldVector<ctype, dim-1>& /* local */) const
│ │ │ │ +
172 {
│ │ │ │ +
173 return centerUnitOuterNormal();
│ │ │ │ +
174 }
│ │ │ │ +
│ │ │ │ +
175
│ │ │ │ +
│ │ │ │ +
177 FieldVector<ctype, dimworld> centerUnitOuterNormal () const
│ │ │ │ +
178 {
│ │ │ │ +
179 FieldVector<ctype, dimworld> normal(0);
│ │ │ │ +
180 normal[_dir] = (_face==0) ? -1.0 : 1.0;
│ │ │ │ +
181 return normal;
│ │ │ │
182 }
│ │ │ │
│ │ │ │
183
│ │ │ │ -
│ │ │ │ -
185 int supersize (int i) const
│ │ │ │ -
186 {
│ │ │ │ -
187 return _supersize[i];
│ │ │ │ -
188 }
│ │ │ │ -
│ │ │ │ -
189
│ │ │ │ -
│ │ │ │ -
191 const iTupel & supersize () const
│ │ │ │ -
192 {
│ │ │ │ -
193 return _supersize;
│ │ │ │ -
194 }
│ │ │ │ -
│ │ │ │ -
195
│ │ │ │ -
│ │ │ │ -
197 int size (int i) const
│ │ │ │ -
198 {
│ │ │ │ -
199 return _size[i];
│ │ │ │ -
200 }
│ │ │ │ -
│ │ │ │ +
│ │ │ │ +
187 FieldVector<ctype, dimworld> integrationOuterNormal ([[maybe_unused]] const FieldVector<ctype, dim-1>& local) const
│ │ │ │ +
188 {
│ │ │ │ +
189 return geometry().volume() * centerUnitOuterNormal();
│ │ │ │ +
190 }
│ │ │ │ +
│ │ │ │ +
191
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
196 {
│ │ │ │ +
197 // set of dimensions that span the intersection
│ │ │ │ +
198 std::bitset<dim> s;
│ │ │ │ +
199 s.set();
│ │ │ │ +
200 s[_dir] = false;
│ │ │ │
201
│ │ │ │ -
│ │ │ │ -
203 iTupel size () const
│ │ │ │ -
204 {
│ │ │ │ -
205 return _size;
│ │ │ │ -
206 }
│ │ │ │ -
│ │ │ │ +
202 // lower-left and upper-right corners
│ │ │ │ +
203 Dune::FieldVector<ctype, dim> ll(0.0);
│ │ │ │ +
204 Dune::FieldVector<ctype, dim> ur(1.0);
│ │ │ │ +
205
│ │ │ │ +
206 ll[_dir] = ur[_dir] = (_face==0) ? 0.0 : 1.0;
│ │ │ │
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
│ │ │ │ -
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
│ │ │ │ +
208 return LocalGeometry(LocalGeometryImpl(ll,ur,s));
│ │ │ │ +
209 }
│ │ │ │ +
│ │ │ │ +
210
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
215 {
│ │ │ │ +
216 // set of dimensions that span the intersection
│ │ │ │ +
217 std::bitset<dim> s;
│ │ │ │ +
218 s.set();
│ │ │ │ +
219 s[_dir] = false;
│ │ │ │ +
220
│ │ │ │ +
221 // lower-left and upper-right corners
│ │ │ │ +
222 Dune::FieldVector<ctype, dim> ll(0.0);
│ │ │ │ +
223 Dune::FieldVector<ctype, dim> ur(1.0);
│ │ │ │ +
224
│ │ │ │ +
225 ll[_dir] = ur[_dir] = (_face==1) ? 0.0 : 1.0;
│ │ │ │ +
226
│ │ │ │ +
227 return LocalGeometry(LocalGeometryImpl(ll,ur,s));
│ │ │ │ +
228 }
│ │ │ │ +
│ │ │ │ +
229
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
233 {
│ │ │ │ +
234
│ │ │ │ +
235 std::bitset<dim> shift;
│ │ │ │ +
236 shift.set();
│ │ │ │ +
237 shift[_dir] = false;
│ │ │ │ +
238
│ │ │ │ +
239 Dune::FieldVector<ctype,dimworld> ll, ur;
│ │ │ │ +
240 for (int i=0; i<dimworld; i++)
│ │ │ │ +
241 {
│ │ │ │ +
242 int coord = _inside.transformingsubiterator().coord(i);
│ │ │ │ +
243
│ │ │ │ +
244 if ((i == _dir) and (_face))
│ │ │ │ +
245 coord++;
│ │ │ │ +
246
│ │ │ │ +
247 ll[i] = _inside.transformingsubiterator().coordCont()->coordinate(i,coord);
│ │ │ │ +
248 if (i != _dir)
│ │ │ │ +
249 coord++;
│ │ │ │ +
250 ur[i] = _inside.transformingsubiterator().coordCont()->coordinate(i,coord);
│ │ │ │ +
251
│ │ │ │ +
252 // If on periodic overlap, transform coordinates by domain size
│ │ │ │ +
253 if (_inside.gridlevel()->mg->isPeriodic(i)) {
│ │ │ │ +
254 int coordPeriodic = _inside.transformingsubiterator().coord(i);
│ │ │ │ +
255 if (coordPeriodic < 0) {
│ │ │ │ +
256 auto size = _inside.gridlevel()->mg->domainSize()[i];
│ │ │ │ +
257 ll[i] += size;
│ │ │ │ +
258 ur[i] += size;
│ │ │ │ +
259 } else if (coordPeriodic + 1 > _inside.gridlevel()->mg->levelSize(_inside.gridlevel()->level(),i)) {
│ │ │ │ +
260 auto size = _inside.gridlevel()->mg->domainSize()[i];
│ │ │ │ +
261 ll[i] -= size;
│ │ │ │ +
262 ur[i] -= size;
│ │ │ │ +
263 }
│ │ │ │ +
264 }
│ │ │ │ +
265 }
│ │ │ │ +
266
│ │ │ │ +
267 GeometryImpl _is_global(ll,ur,shift);
│ │ │ │ +
268 return Geometry( _is_global );
│ │ │ │ +
269 }
│ │ │ │ +
│ │ │ │ +
270
│ │ │ │ +
│ │ │ │ +
272 GeometryType type () const
│ │ │ │ +
273 {
│ │ │ │ +
274 return GeometryTypes::cube(dim-1);
│ │ │ │ +
275 }
│ │ │ │ +
│ │ │ │ +
276
│ │ │ │ +
│ │ │ │ +
278 int indexInInside () const
│ │ │ │ +
279 {
│ │ │ │ +
280 return _count;
│ │ │ │ +
281 }
│ │ │ │ +
│ │ │ │ +
282
│ │ │ │ +
│ │ │ │ +
284 int indexInOutside () const
│ │ │ │ +
285 {
│ │ │ │ +
286 // flip the last bit
│ │ │ │ +
287 return _count^1;
│ │ │ │ +
288 }
│ │ │ │ +
│ │ │ │ +
289
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
291 : _count(~std::uint8_t(0)) // Use as marker for invalid intersection
│ │ │ │ +
292 , _dir(0)
│ │ │ │ +
293 , _face(0)
│ │ │ │ +
294 {}
│ │ │ │ +
│ │ │ │ +
295
│ │ │ │ +
│ │ │ │ +
297 YaspIntersection (const YaspEntity<0,dim,GridImp>& myself, bool toend) :
│ │ │ │ +
298 _inside(myself.gridlevel(),
│ │ │ │ +
299 myself.transformingsubiterator()),
│ │ │ │ +
300 _outside(myself.gridlevel(),
│ │ │ │ +
301 myself.transformingsubiterator()),
│ │ │ │ +
302 // initialize to first neighbor
│ │ │ │ +
303 _count(0),
│ │ │ │ +
304 _dir(0),
│ │ │ │ +
305 _face(0)
│ │ │ │ +
306 {
│ │ │ │ +
307 if (toend)
│ │ │ │ +
308 {
│ │ │ │ +
309 // initialize end iterator
│ │ │ │ +
310 _count = 2*dim;
│ │ │ │ +
311 return;
│ │ │ │ +
312 }
│ │ │ │ +
313 _count = 0;
│ │ │ │ +
314
│ │ │ │ +
315 // move transforming iterator
│ │ │ │ +
316 _outside.transformingsubiterator().move(_dir,-1);
│ │ │ │ +
317 }
│ │ │ │ +
│ │ │ │ +
318
│ │ │ │ +
320
│ │ │ │ +
│ │ │ │ +
322 void assign (const YaspIntersection& it)
│ │ │ │ +
323 {
│ │ │ │ +
324 *this = it;
│ │ │ │ +
325 }
│ │ │ │ +
│ │ │ │ +
326
│ │ │ │ +
│ │ │ │ +
327 bool equals(const YaspIntersection& other) const
│ │ │ │ +
328 {
│ │ │ │ +
329 // compare counts first -- that's cheaper if the test fails
│ │ │ │ +
330 return _count == other._count && _inside.equals(other._inside);
│ │ │ │ +
331 }
│ │ │ │ +
│ │ │ │ +
332
│ │ │ │ +
333 private:
│ │ │ │ +
334 /* The two entities that make up the intersection */
│ │ │ │ + │ │ │ │ + │ │ │ │ +
337 /* current position */
│ │ │ │ +
338 std::uint8_t _count;
│ │ │ │ +
339 std::uint8_t _dir;
│ │ │ │ +
340 std::uint8_t _face;
│ │ │ │ +
341 };
│ │ │ │ +
│ │ │ │ +
342} // namespace Dune
│ │ │ │ +
343
│ │ │ │ +
344#endif // DUNE_GRID_YASPGRIDINTERSECTION_HH
│ │ │ │ +
STL namespace.
│ │ │ │
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 tuple 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
return 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 tuple.
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
│ │ │ │ +
Base class for exceptions in Dune grid modules.
Definition exceptions.hh:20
│ │ │ │ +
Definition yaspgridentity.hh:242
│ │ │ │ +
int level() const
level of this element
Definition yaspgridentity.hh:256
│ │ │ │ +
const YGLI & gridlevel() const
Definition yaspgridentity.hh:394
│ │ │ │ +
const I & transformingsubiterator() const
Definition yaspgridentity.hh:393
│ │ │ │ +
bool equals(const YaspEntity &e) const
Return true when two iterators over the same grid are equal (!).
Definition yaspgridentity.hh:321
│ │ │ │ +
YaspIntersectionIterator enables iteration over intersections with neighboring codim 0 entities.
Definition yaspgridintersectioniterator.hh:22
│ │ │ │ +
YaspIntersection provides data about intersection with neighboring codim 0 entities.
Definition yaspgridintersection.hh:22
│ │ │ │ +
FieldVector< ctype, dimworld > centerUnitOuterNormal() const
return unit outer normal at center of intersection geometry
Definition yaspgridintersection.hh:177
│ │ │ │ +
bool equals(const YaspIntersection &other) const
Definition yaspgridintersection.hh:327
│ │ │ │ +
Entity inside() const
Definition yaspgridintersection.hh:92
│ │ │ │ +
Geometry geometry() const
Definition yaspgridintersection.hh:232
│ │ │ │ +
GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
Definition yaspgridintersection.hh:38
│ │ │ │ +
YaspIntersection()
Definition yaspgridintersection.hh:290
│ │ │ │ +
int indexInOutside() const
local index of codim 1 entity in neighbor where intersection is contained in
Definition yaspgridintersection.hh:284
│ │ │ │ +
LocalGeometry geometryInInside() const
Definition yaspgridintersection.hh:195
│ │ │ │ +
int boundarySegmentIndex() const
Definition yaspgridintersection.hh:105
│ │ │ │ +
GridImp::template Codim< 1 >::Geometry Geometry
Definition yaspgridintersection.hh:37
│ │ │ │ +
bool conforming() const
Yasp is always conform.
Definition yaspgridintersection.hh:85
│ │ │ │ +
GridImp::template Codim< 0 >::Entity Entity
Definition yaspgridintersection.hh:36
│ │ │ │ +
bool neighbor() const
return true if neighbor across intersection exists in this processor
Definition yaspgridintersection.hh:75
│ │ │ │ +
FieldVector< ctype, dimworld > outerNormal(const FieldVector< ctype, dim-1 > &) const
return unit outer normal, this should be dependent on local coordinates for higher order boundary
Definition yaspgridintersection.hh:165
│ │ │ │ +
YaspIntersection(const YaspEntity< 0, dim, GridImp > &myself, bool toend)
make intersection iterator from entity, initialize to first neighbor
Definition yaspgridintersection.hh:297
│ │ │ │ +
GeometryType type() const
obtain the type of reference element for this intersection
Definition yaspgridintersection.hh:272
│ │ │ │ +
void assign(const YaspIntersection &it)
copy constructor – use default
Definition yaspgridintersection.hh:322
│ │ │ │ +
int indexInInside() const
local index of codim 1 entity in self where intersection is contained in
Definition yaspgridintersection.hh:278
│ │ │ │ +
FieldVector< ctype, dimworld > integrationOuterNormal(const FieldVector< ctype, dim-1 > &local) const
Definition yaspgridintersection.hh:187
│ │ │ │ +
GridImp::YGrid::Iterator I
Definition yaspgridintersection.hh:35
│ │ │ │ +
LocalGeometry geometryInOutside() const
Definition yaspgridintersection.hh:214
│ │ │ │ +
GridImp::YGridLevelIterator YGLI
Definition yaspgridintersection.hh:34
│ │ │ │ +
Entity outside() const
return Entity on the outside of this intersection
Definition yaspgridintersection.hh:98
│ │ │ │ +
bool boundary() const
Definition yaspgridintersection.hh:62
│ │ │ │ +
FieldVector< ctype, dimworld > unitOuterNormal(const FieldVector< ctype, dim-1 > &) const
return unit outer normal, this should be dependent on local coordinates for higher order boundary
Definition yaspgridintersection.hh:171
│ │ │ │ +
void update()
Definition yaspgridintersection.hh:40
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,1253 +1,453 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _y_a_s_p_g_r_i_d │ │ │ │ │ -ygrid.hh │ │ │ │ │ +yaspgridintersection.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 © 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_YASPGRIDINTERSECTION_HH │ │ │ │ │ +6#define DUNE_GRID_YASPGRIDINTERSECTION_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11#include │ │ │ │ │ -12 │ │ │ │ │ -13#include │ │ │ │ │ -14#include │ │ │ │ │ -15#include │ │ │ │ │ +15namespace _D_u_n_e { │ │ │ │ │ 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; │ │ │ │ │ +20 template │ │ │ │ │ +_2_1 class _Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +22 { │ │ │ │ │ +23 constexpr static int dim = GridImp::dimension; │ │ │ │ │ +24 constexpr static int dimworld = GridImp::dimensionworld; │ │ │ │ │ +25 typedef typename GridImp::ctype ctype; │ │ │ │ │ +26 │ │ │ │ │ +27 typedef typename GridImp::Traits::template Codim< 1 >::GeometryImpl │ │ │ │ │ +GeometryImpl; │ │ │ │ │ +_2_8 typedef typename GridImp::Traits::template Codim< 1 >::LocalGeometryImpl │ │ │ │ │ +LocalGeometryImpl; │ │ │ │ │ +29 │ │ │ │ │ +30 friend class _Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r; │ │ │ │ │ +31 │ │ │ │ │ +32 public: │ │ │ │ │ +33 // types used from grids │ │ │ │ │ +_3_4 typedef typename GridImp::YGridLevelIterator _Y_G_L_I; │ │ │ │ │ +_3_5 typedef typename GridImp::YGrid::Iterator _I; │ │ │ │ │ +_3_6 typedef typename GridImp::template Codim<0>::Entity _E_n_t_i_t_y; │ │ │ │ │ +_3_7 typedef typename GridImp::template Codim<1>::Geometry _G_e_o_m_e_t_r_y; │ │ │ │ │ +_3_8 typedef typename GridImp::template Codim<1>::LocalGeometry _L_o_c_a_l_G_e_o_m_e_t_r_y; │ │ │ │ │ +39 │ │ │ │ │ +_4_0 void _u_p_d_a_t_e() { │ │ │ │ │ +41 │ │ │ │ │ +42 // vector with per-direction movements │ │ │ │ │ +43 std::array dist{{0}}; │ │ │ │ │ +44 │ │ │ │ │ +45 // first move: back to center │ │ │ │ │ +46 dist[_dir] = 1 - 2*_face; │ │ │ │ │ +47 │ │ │ │ │ +48 // update face info │ │ │ │ │ +49 _dir = _count / 2; │ │ │ │ │ +50 _face = _count % 2; │ │ │ │ │ +51 │ │ │ │ │ +52 // second move: to new neighbor │ │ │ │ │ +53 dist[_dir] += -1 + 2*_face; │ │ │ │ │ +54 │ │ │ │ │ +55 // move transforming iterator │ │ │ │ │ +56 _outside._t_r_a_n_s_f_o_r_m_i_n_g_s_u_b_i_t_e_r_a_t_o_r().move(dist); │ │ │ │ │ +57 } │ │ │ │ │ +58 │ │ │ │ │ +_6_2 bool _b_o_u_n_d_a_r_y () const │ │ │ │ │ +63 { │ │ │ │ │ +64 // Coordinate of intersection in its direction │ │ │ │ │ +65 int coord = _inside._t_r_a_n_s_f_o_r_m_i_n_g_s_u_b_i_t_e_r_a_t_o_r().coord(_dir) + _face; │ │ │ │ │ +66 if (_inside._g_r_i_d_l_e_v_e_l()->mg->isPeriodic(_dir)) │ │ │ │ │ +67 return false; │ │ │ │ │ +68 else │ │ │ │ │ +69 return coord == 0 │ │ │ │ │ +70 || │ │ │ │ │ +71 coord == _inside._g_r_i_d_l_e_v_e_l()->mg->levelSize(_inside._g_r_i_d_l_e_v_e_l()->level │ │ │ │ │ +(),_dir); │ │ │ │ │ +72 } │ │ │ │ │ +73 │ │ │ │ │ +_7_5 bool _n_e_i_g_h_b_o_r () const │ │ │ │ │ +76 { │ │ │ │ │ +77 // Coordinate of intersection in its direction │ │ │ │ │ +78 int coord = _inside._t_r_a_n_s_f_o_r_m_i_n_g_s_u_b_i_t_e_r_a_t_o_r().coord(_dir) + _face; │ │ │ │ │ +79 return coord > _inside._g_r_i_d_l_e_v_e_l()->overlap[0].dataBegin()->min(_dir) │ │ │ │ │ +80 && │ │ │ │ │ +81 coord <= _inside._g_r_i_d_l_e_v_e_l()->overlap[0].dataBegin()->max(_dir); │ │ │ │ │ +82 } │ │ │ │ │ 83 │ │ │ │ │ -_8_5 _Y_G_r_i_d_C_o_m_p_o_n_e_n_t () : _shift(0ULL) │ │ │ │ │ +_8_5 bool _c_o_n_f_o_r_m_i_n_g () const │ │ │ │ │ 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 {} │ │ │ │ │ +87 return true; │ │ │ │ │ +88 } │ │ │ │ │ +89 │ │ │ │ │ +_9_2 _E_n_t_i_t_y _i_n_s_i_d_e() const │ │ │ │ │ +93 { │ │ │ │ │ +94 return _E_n_t_i_t_y(_inside); │ │ │ │ │ +95 } │ │ │ │ │ +96 │ │ │ │ │ +_9_8 _E_n_t_i_t_y _o_u_t_s_i_d_e() const │ │ │ │ │ +99 { │ │ │ │ │ +100 return _E_n_t_i_t_y(_outside); │ │ │ │ │ +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 } │ │ │ │ │ +_1_0_5 int _b_o_u_n_d_a_r_y_S_e_g_m_e_n_t_I_n_d_e_x() const │ │ │ │ │ +106 { │ │ │ │ │ +107 if(! _b_o_u_n_d_a_r_y()) │ │ │ │ │ +108 DUNE_THROW(_G_r_i_d_E_r_r_o_r, "called boundarySegmentIndex while boundary() == │ │ │ │ │ +false"); │ │ │ │ │ +109 // size of local macro grid │ │ │ │ │ +110 const std::array & size = _inside._g_r_i_d_l_e_v_e_l()->mg->begin()- │ │ │ │ │ +>overlap[0].dataBegin()->size(); │ │ │ │ │ +111 const std::array & origin = _inside._g_r_i_d_l_e_v_e_l()->mg->begin()- │ │ │ │ │ +>overlap[0].dataBegin()->origin(); │ │ │ │ │ +112 std::array sides; │ │ │ │ │ +113 { │ │ │ │ │ +114 for (int i=0; img->begin()->overlap[0].dataBegin()->origin(i) │ │ │ │ │ +118 == 0)+ │ │ │ │ │ +119 (_inside._g_r_i_d_l_e_v_e_l()->mg->begin()->overlap[0].dataBegin()->origin(i) + │ │ │ │ │ +120 _inside._g_r_i_d_l_e_v_e_l()->mg->begin()->overlap[0].dataBegin()->size(i) │ │ │ │ │ +121 == │ │ │ │ │ +122 _inside._g_r_i_d_l_e_v_e_l()->mg->levelSize(0,i))); │ │ │ │ │ +123 │ │ │ │ │ +124 } │ │ │ │ │ +125 } │ │ │ │ │ +126 // global position of the cell on macro grid │ │ │ │ │ +127 std::array pos = _inside._t_r_a_n_s_f_o_r_m_i_n_g_s_u_b_i_t_e_r_a_t_o_r().coord(); │ │ │ │ │ +128 for(int i=0; i fsize; │ │ │ │ │ +135 { │ │ │ │ │ +136 int vol = 1; │ │ │ │ │ +137 for (int k=0; k=0; k--) │ │ │ │ │ +147 { │ │ │ │ │ +148 if (k == _dir) continue; │ │ │ │ │ +149 index += (pos[k]) * localoffset; │ │ │ │ │ +150 localoffset *= size[k]; │ │ │ │ │ +151 } │ │ │ │ │ +152 } │ │ │ │ │ +153 // add unit-cube-face-offsets │ │ │ │ │ +154 { │ │ │ │ │ +155 for (int k=0; k<_dir; k++) │ │ │ │ │ +156 index += sides[k] * fsize[k]; │ │ │ │ │ +157 // add fsize if we are on the right face and there is a left-face-boundary │ │ │ │ │ +on this processor │ │ │ │ │ +158 index += _face * (sides[_dir]>1) * fsize[_dir]; │ │ │ │ │ 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; │ │ │ │ │ +161 return index; │ │ │ │ │ +162 } │ │ │ │ │ +163 │ │ │ │ │ +_1_6_5 FieldVector _o_u_t_e_r_N_o_r_m_a_l (const FieldVector& │ │ │ │ │ +/* local */) const │ │ │ │ │ +166 { │ │ │ │ │ +167 return _c_e_n_t_e_r_U_n_i_t_O_u_t_e_r_N_o_r_m_a_l(); │ │ │ │ │ +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 { │ │ │ │ │ +173 return _c_e_n_t_e_r_U_n_i_t_O_u_t_e_r_N_o_r_m_a_l(); │ │ │ │ │ +174 } │ │ │ │ │ +175 │ │ │ │ │ +_1_7_7 FieldVector _c_e_n_t_e_r_U_n_i_t_O_u_t_e_r_N_o_r_m_a_l () const │ │ │ │ │ +178 { │ │ │ │ │ +179 FieldVector normal(0); │ │ │ │ │ +180 normal[_dir] = (_face==0) ? -1.0 : 1.0; │ │ │ │ │ +181 return normal; │ │ │ │ │ 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; │ │ │ │ │ -194 } │ │ │ │ │ -195 │ │ │ │ │ -_1_9_7 int _s_i_z_e (int i) const │ │ │ │ │ -198 { │ │ │ │ │ -199 return _size[i]; │ │ │ │ │ -200 } │ │ │ │ │ +_1_8_7 FieldVector _i_n_t_e_g_r_a_t_i_o_n_O_u_t_e_r_N_o_r_m_a_l ([[maybe_unused]] const │ │ │ │ │ +FieldVector& local) const │ │ │ │ │ +188 { │ │ │ │ │ +189 return _g_e_o_m_e_t_r_y().volume() * _c_e_n_t_e_r_U_n_i_t_O_u_t_e_r_N_o_r_m_a_l(); │ │ │ │ │ +190 } │ │ │ │ │ +191 │ │ │ │ │ +_1_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_I_n_s_i_d_e () const │ │ │ │ │ +196 { │ │ │ │ │ +197 // set of dimensions that span the intersection │ │ │ │ │ +198 std::bitset s; │ │ │ │ │ +199 s.set(); │ │ │ │ │ +200 s[_dir] = false; │ │ │ │ │ 201 │ │ │ │ │ -_2_0_3 _i_T_u_p_e_l _s_i_z_e () const │ │ │ │ │ -204 { │ │ │ │ │ -205 return _size; │ │ │ │ │ -206 } │ │ │ │ │ +202 // lower-left and upper-right corners │ │ │ │ │ +203 Dune::FieldVector ll(0.0); │ │ │ │ │ +204 Dune::FieldVector ur(1.0); │ │ │ │ │ +205 │ │ │ │ │ +206 ll[_dir] = ur[_dir] = (_face==0) ? 0.0 : 1.0; │ │ │ │ │ 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) │ │ │ │ │ +208 return _L_o_c_a_l_G_e_o_m_e_t_r_y(LocalGeometryImpl(ll,ur,s)); │ │ │ │ │ +209 } │ │ │ │ │ +210 │ │ │ │ │ +_2_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_O_u_t_s_i_d_e () const │ │ │ │ │ +215 { │ │ │ │ │ +216 // set of dimensions that span the intersection │ │ │ │ │ +217 std::bitset s; │ │ │ │ │ +218 s.set(); │ │ │ │ │ +219 s[_dir] = false; │ │ │ │ │ +220 │ │ │ │ │ +221 // lower-left and upper-right corners │ │ │ │ │ +222 Dune::FieldVector ll(0.0); │ │ │ │ │ +223 Dune::FieldVector ur(1.0); │ │ │ │ │ +224 │ │ │ │ │ +225 ll[_dir] = ur[_dir] = (_face==1) ? 0.0 : 1.0; │ │ │ │ │ +226 │ │ │ │ │ +227 return _L_o_c_a_l_G_e_o_m_e_t_r_y(LocalGeometryImpl(ll,ur,s)); │ │ │ │ │ +228 } │ │ │ │ │ +229 │ │ │ │ │ +_2_3_2 _G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y () const │ │ │ │ │ 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 │ │ │ │ │ -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; │ │ │ │ │ -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 │ │ │ │ │ +234 │ │ │ │ │ +235 std::bitset shift; │ │ │ │ │ +236 shift.set(); │ │ │ │ │ +237 shift[_dir] = false; │ │ │ │ │ +238 │ │ │ │ │ +239 Dune::FieldVector ll, ur; │ │ │ │ │ +240 for (int i=0; icoordinate(i,coord); │ │ │ │ │ +248 if (i != _dir) │ │ │ │ │ +249 coord++; │ │ │ │ │ +250 ur[i] = _inside._t_r_a_n_s_f_o_r_m_i_n_g_s_u_b_i_t_e_r_a_t_o_r().coordCont()->coordinate(i,coord); │ │ │ │ │ +251 │ │ │ │ │ +252 // If on periodic overlap, transform coordinates by domain size │ │ │ │ │ +253 if (_inside._g_r_i_d_l_e_v_e_l()->mg->isPeriodic(i)) { │ │ │ │ │ +254 int coordPeriodic = _inside._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); │ │ │ │ │ +255 if (coordPeriodic < 0) { │ │ │ │ │ +256 auto size = _inside._g_r_i_d_l_e_v_e_l()->mg->domainSize()[i]; │ │ │ │ │ +257 ll[i] += size; │ │ │ │ │ +258 ur[i] += size; │ │ │ │ │ +259 } else if (coordPeriodic + 1 > _inside._g_r_i_d_l_e_v_e_l()->mg->levelSize │ │ │ │ │ +(_inside._g_r_i_d_l_e_v_e_l()->level(),i)) { │ │ │ │ │ +260 auto size = _inside._g_r_i_d_l_e_v_e_l()->mg->domainSize()[i]; │ │ │ │ │ +261 ll[i] -= size; │ │ │ │ │ +262 ur[i] -= size; │ │ │ │ │ +263 } │ │ │ │ │ +264 } │ │ │ │ │ +265 } │ │ │ │ │ +266 │ │ │ │ │ +267 GeometryImpl _is_global(ll,ur,shift); │ │ │ │ │ +268 return _G_e_o_m_e_t_r_y( _is_global ); │ │ │ │ │ +269 } │ │ │ │ │ +270 │ │ │ │ │ +_2_7_2 GeometryType _t_y_p_e () const │ │ │ │ │ +273 { │ │ │ │ │ +274 return GeometryTypes::cube(dim-1); │ │ │ │ │ +275 } │ │ │ │ │ +276 │ │ │ │ │ +_2_7_8 int _i_n_d_e_x_I_n_I_n_s_i_d_e () const │ │ │ │ │ +279 { │ │ │ │ │ +280 return _count; │ │ │ │ │ +281 } │ │ │ │ │ +282 │ │ │ │ │ +_2_8_4 int _i_n_d_e_x_I_n_O_u_t_s_i_d_e () const │ │ │ │ │ +285 { │ │ │ │ │ +286 // flip the last bit │ │ │ │ │ +287 return _count^1; │ │ │ │ │ +288 } │ │ │ │ │ +289 │ │ │ │ │ +_2_9_0 _Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n() │ │ │ │ │ +291 : _count(~_s_t_d::uint8_t(0)) // Use as marker for invalid intersection │ │ │ │ │ +292 , _dir(0) │ │ │ │ │ +293 , _face(0) │ │ │ │ │ +294 {} │ │ │ │ │ +295 │ │ │ │ │ +_2_9_7 _Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n (const _Y_a_s_p_E_n_t_i_t_y_<_0_,_d_i_m_,_G_r_i_d_I_m_p_>& myself, bool toend) : │ │ │ │ │ +298 _inside(myself.gridlevel(), │ │ │ │ │ +299 myself.transformingsubiterator()), │ │ │ │ │ +300 _outside(myself.gridlevel(), │ │ │ │ │ +301 myself.transformingsubiterator()), │ │ │ │ │ +302 // initialize to first neighbor │ │ │ │ │ +303 _count(0), │ │ │ │ │ +304 _dir(0), │ │ │ │ │ +305 _face(0) │ │ │ │ │ +306 { │ │ │ │ │ +307 if (toend) │ │ │ │ │ +308 { │ │ │ │ │ +309 // initialize end iterator │ │ │ │ │ +310 _count = 2*dim; │ │ │ │ │ +311 return; │ │ │ │ │ +312 } │ │ │ │ │ +313 _count = 0; │ │ │ │ │ +314 │ │ │ │ │ +315 // move transforming iterator │ │ │ │ │ +316 _outside._t_r_a_n_s_f_o_r_m_i_n_g_s_u_b_i_t_e_r_a_t_o_r().move(_dir,-1); │ │ │ │ │ +317 } │ │ │ │ │ +318 │ │ │ │ │ +320 │ │ │ │ │ +_3_2_2 void _a_s_s_i_g_n (const _Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n& it) │ │ │ │ │ +323 { │ │ │ │ │ +324 *this = it; │ │ │ │ │ +325 } │ │ │ │ │ +326 │ │ │ │ │ +_3_2_7 bool _e_q_u_a_l_s(const _Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n& other) const │ │ │ │ │ +328 { │ │ │ │ │ +329 // compare counts first -- that's cheaper if the test fails │ │ │ │ │ +330 return _count == other._count && _inside._e_q_u_a_l_s(other._inside); │ │ │ │ │ +331 } │ │ │ │ │ +332 │ │ │ │ │ +333 private: │ │ │ │ │ +334 /* The two entities that make up the intersection */ │ │ │ │ │ +335 _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_> _inside; │ │ │ │ │ +336 _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_> _outside; │ │ │ │ │ +337 /* current position */ │ │ │ │ │ +338 std::uint8_t _count; │ │ │ │ │ +339 std::uint8_t _dir; │ │ │ │ │ +340 std::uint8_t _face; │ │ │ │ │ +341 }; │ │ │ │ │ +342} // namespace Dune │ │ │ │ │ +343 │ │ │ │ │ +344#endif // DUNE_GRID_YASPGRIDINTERSECTION_HH │ │ │ │ │ +_s_t_d │ │ │ │ │ +STL namespace. │ │ │ │ │ _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 tuple 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 │ │ │ │ │ -return 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 tuple. │ │ │ │ │ -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 │ │ │ │ │ +_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_E_n_t_i_t_y │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:242 │ │ │ │ │ +_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:256 │ │ │ │ │ +_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:394 │ │ │ │ │ +_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:393 │ │ │ │ │ +_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 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 │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:321 │ │ │ │ │ +_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_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +YaspIntersection provides data about intersection with neighboring codim 0 │ │ │ │ │ +entities. │ │ │ │ │ +DDeeffiinniittiioonn yaspgridintersection.hh:22 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_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 │ │ │ │ │ +FieldVector< ctype, dimworld > centerUnitOuterNormal() const │ │ │ │ │ +return unit outer normal at center of intersection geometry │ │ │ │ │ +DDeeffiinniittiioonn yaspgridintersection.hh:177 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_:_:_e_q_u_a_l_s │ │ │ │ │ +bool equals(const YaspIntersection &other) const │ │ │ │ │ +DDeeffiinniittiioonn yaspgridintersection.hh:327 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_:_:_i_n_s_i_d_e │ │ │ │ │ +Entity inside() const │ │ │ │ │ +DDeeffiinniittiioonn yaspgridintersection.hh:92 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_:_:_g_e_o_m_e_t_r_y │ │ │ │ │ +Geometry geometry() const │ │ │ │ │ +DDeeffiinniittiioonn yaspgridintersection.hh:232 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_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 yaspgridintersection.hh:38 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_:_:_Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +YaspIntersection() │ │ │ │ │ +DDeeffiinniittiioonn yaspgridintersection.hh:290 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_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 index of codim 1 entity in neighbor where intersection is contained in │ │ │ │ │ +DDeeffiinniittiioonn yaspgridintersection.hh:284 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_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 yaspgridintersection.hh:195 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_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 │ │ │ │ │ +int boundarySegmentIndex() const │ │ │ │ │ +DDeeffiinniittiioonn yaspgridintersection.hh:105 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_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 yaspgridintersection.hh:37 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_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 │ │ │ │ │ +Yasp is always conform. │ │ │ │ │ +DDeeffiinniittiioonn yaspgridintersection.hh:85 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_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 yaspgridintersection.hh:36 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_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 neighbor across intersection exists in this processor │ │ │ │ │ +DDeeffiinniittiioonn yaspgridintersection.hh:75 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_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 > &) │ │ │ │ │ +const │ │ │ │ │ +return unit outer normal, this should be dependent on local coordinates for │ │ │ │ │ +higher order boundary │ │ │ │ │ +DDeeffiinniittiioonn yaspgridintersection.hh:165 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_:_:_Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +YaspIntersection(const YaspEntity< 0, dim, GridImp > &myself, bool toend) │ │ │ │ │ +make intersection iterator from entity, initialize to first neighbor │ │ │ │ │ +DDeeffiinniittiioonn yaspgridintersection.hh:297 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_:_:_t_y_p_e │ │ │ │ │ +GeometryType type() const │ │ │ │ │ +obtain the type of reference element for this intersection │ │ │ │ │ +DDeeffiinniittiioonn yaspgridintersection.hh:272 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_:_:_a_s_s_i_g_n │ │ │ │ │ +void assign(const YaspIntersection &it) │ │ │ │ │ +copy constructor – use default │ │ │ │ │ +DDeeffiinniittiioonn yaspgridintersection.hh:322 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_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 self where intersection is contained in │ │ │ │ │ +DDeeffiinniittiioonn yaspgridintersection.hh:278 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_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 │ │ │ │ │ +DDeeffiinniittiioonn yaspgridintersection.hh:187 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_:_:_I │ │ │ │ │ +GridImp::YGrid::Iterator I │ │ │ │ │ +DDeeffiinniittiioonn yaspgridintersection.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_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 yaspgridintersection.hh:214 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_:_:_Y_G_L_I │ │ │ │ │ +GridImp::YGridLevelIterator YGLI │ │ │ │ │ +DDeeffiinniittiioonn yaspgridintersection.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_:_:_o_u_t_s_i_d_e │ │ │ │ │ +Entity outside() const │ │ │ │ │ +return Entity on the outside of this intersection │ │ │ │ │ +DDeeffiinniittiioonn yaspgridintersection.hh:98 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_:_:_b_o_u_n_d_a_r_y │ │ │ │ │ +bool boundary() const │ │ │ │ │ +DDeeffiinniittiioonn yaspgridintersection.hh:62 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_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 > &) const │ │ │ │ │ +return unit outer normal, this should be dependent on local coordinates for │ │ │ │ │ +higher order boundary │ │ │ │ │ +DDeeffiinniittiioonn yaspgridintersection.hh:171 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_:_:_u_p_d_a_t_e │ │ │ │ │ +void update() │ │ │ │ │ +DDeeffiinniittiioonn yaspgridintersection.hh:40 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00200.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/a00200_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: yaspgridindexsets.hh Source File │ │ │ │ +dune-grid: yaspgridleveliterator.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,131 +74,91 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
yaspgridindexsets.hh
│ │ │ │ +
yaspgridleveliterator.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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, std::array<GeometryType, 1> >
│ │ │ │ -
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
│ │ │ │ -
│ │ │ │ -
43 YaspIndexSet ( const GridImp &g )
│ │ │ │ -
44 : grid( g )
│ │ │ │ -
45 {
│ │ │ │ -
46 assert(isLeafIndexSet);
│ │ │ │ -
47 }
│ │ │ │ -
│ │ │ │ -
48
│ │ │ │ -
50 template<int cc>
│ │ │ │ -
│ │ │ │ -
51 IndexType index (const typename std::remove_const<GridImp>::type::Traits::template Codim<cc>::Entity& e) const
│ │ │ │ -
52 {
│ │ │ │ -
53 return e.impl().compressedIndex();
│ │ │ │ -
54 }
│ │ │ │ -
│ │ │ │ -
55
│ │ │ │ -
57 template< int cc >
│ │ │ │ -
│ │ │ │ -
58 IndexType subIndex ( const typename std::remove_const< GridImp >::type::Traits::template Codim< cc >::Entity &e,
│ │ │ │ -
59 int i, unsigned int codim ) const
│ │ │ │ -
60 {
│ │ │ │ -
61 return e.impl().subCompressedIndex(i, codim);
│ │ │ │ -
62 }
│ │ │ │ -
│ │ │ │ -
63
│ │ │ │ -
│ │ │ │ -
65 std::size_t size (GeometryType type) const
│ │ │ │ -
66 {
│ │ │ │ -
67 return (isLeafIndexSet)
│ │ │ │ -
68 ? grid.size( type )
│ │ │ │ -
69 : grid.size( level, type );
│ │ │ │ -
70 }
│ │ │ │ -
│ │ │ │ -
71
│ │ │ │ -
│ │ │ │ -
73 std::size_t size (int codim) const
│ │ │ │ -
74 {
│ │ │ │ -
75 return (isLeafIndexSet)
│ │ │ │ -
76 ? grid.size( codim )
│ │ │ │ -
77 : grid.size( level, codim );
│ │ │ │ -
78 }
│ │ │ │ -
│ │ │ │ -
79
│ │ │ │ -
81 template<class EntityType>
│ │ │ │ -
│ │ │ │ -
82 bool contains (const EntityType& e) const
│ │ │ │ -
83 {
│ │ │ │ -
84 return (isLeafIndexSet)
│ │ │ │ -
85 ? e.level() == grid.maxLevel()
│ │ │ │ -
86 : e.level() == level;
│ │ │ │ -
87 }
│ │ │ │ -
│ │ │ │ -
88
│ │ │ │ -
│ │ │ │ -
90 static constexpr std::array<GeometryType, 1> types (int codim)
│ │ │ │ -
91 {
│ │ │ │ -
92 return { GeometryTypes::cube(GridImp::dimension - codim) };
│ │ │ │ -
93 }
│ │ │ │ -
│ │ │ │ -
94
│ │ │ │ -
95 private:
│ │ │ │ -
96 const GridImp& grid;
│ │ │ │ -
97 int level;
│ │ │ │ -
98 };
│ │ │ │ -
│ │ │ │ -
99
│ │ │ │ -
100} // namespace Dune
│ │ │ │ -
101
│ │ │ │ -
102#endif // DUNE_GRID_YASPGRIDINDEXSET_HH
│ │ │ │ +
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
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Index Set Interface base class.
Definition common/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 common/indexidset.hh:153
│ │ │ │ -
Export the type of the entity used as parameter in the index(...) method.
Definition common/indexidset.hh:87
│ │ │ │ -
Implementation of Level- and LeafIndexSets for YaspGrid.
Definition yaspgridindexsets.hh:25
│ │ │ │ -
YaspIndexSet(const GridImp &g)
Level grid view constructor stores reference to a grid and level.
Definition yaspgridindexsets.hh:43
│ │ │ │ -
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:51
│ │ │ │ -
bool contains(const EntityType &e) const
return true if the given entity is contained in .
Definition yaspgridindexsets.hh:82
│ │ │ │ -
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:65
│ │ │ │ -
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:58
│ │ │ │ -
static constexpr std::array< GeometryType, 1 > types(int codim)
obtain all geometry types of entities in domain
Definition yaspgridindexsets.hh:90
│ │ │ │ -
std::size_t size(int codim) const
return size of set for a given codim
Definition yaspgridindexsets.hh:73
│ │ │ │ -
Base::IndexType IndexType
Definition yaspgridindexsets.hh:30
│ │ │ │ +
Definition yaspgridentity.hh:242
│ │ │ │ +
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,153 +1,103 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 © 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, std::array > │ │ │ │ │ -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_,_ _s_t_d_:_:_a_r_r_a_y_<_G_e_o_m_e_t_r_y_T_y_p_e_,_ _1_> > │ │ │ │ │ -_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 │ │ │ │ │ -_4_3 _Y_a_s_p_I_n_d_e_x_S_e_t ( const GridImp &g ) │ │ │ │ │ -44 : grid( g ) │ │ │ │ │ -45 { │ │ │ │ │ -46 assert(isLeafIndexSet); │ │ │ │ │ -47 } │ │ │ │ │ -48 │ │ │ │ │ -50 template │ │ │ │ │ -_5_1 _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 │ │ │ │ │ -52 { │ │ │ │ │ -53 return e.impl().compressedIndex(); │ │ │ │ │ -54 } │ │ │ │ │ -55 │ │ │ │ │ -57 template< int cc > │ │ │ │ │ -_5_8 _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, │ │ │ │ │ -59 int i, unsigned int codim ) const │ │ │ │ │ -60 { │ │ │ │ │ -61 return e.impl().subCompressedIndex(i, codim); │ │ │ │ │ -62 } │ │ │ │ │ -63 │ │ │ │ │ -_6_5 std::size_t _s_i_z_e (GeometryType type) const │ │ │ │ │ -66 { │ │ │ │ │ -67 return (isLeafIndexSet) │ │ │ │ │ -68 ? grid.size( type ) │ │ │ │ │ -69 : grid.size( level, type ); │ │ │ │ │ -70 } │ │ │ │ │ -71 │ │ │ │ │ -_7_3 std::size_t _s_i_z_e (int codim) const │ │ │ │ │ -74 { │ │ │ │ │ -75 return (isLeafIndexSet) │ │ │ │ │ -76 ? grid.size( codim ) │ │ │ │ │ -77 : grid.size( level, codim ); │ │ │ │ │ -78 } │ │ │ │ │ -79 │ │ │ │ │ -81 template │ │ │ │ │ -_8_2 bool _c_o_n_t_a_i_n_s (const EntityType& e) const │ │ │ │ │ -83 { │ │ │ │ │ -84 return (isLeafIndexSet) │ │ │ │ │ -85 ? e.level() == grid.maxLevel() │ │ │ │ │ -86 : e.level() == level; │ │ │ │ │ -87 } │ │ │ │ │ -88 │ │ │ │ │ -_9_0 static constexpr std::array _t_y_p_e_s (int codim) │ │ │ │ │ -91 { │ │ │ │ │ -92 return { GeometryTypes::cube(GridImp::dimension - codim) }; │ │ │ │ │ -93 } │ │ │ │ │ -94 │ │ │ │ │ -95 private: │ │ │ │ │ -96 const GridImp& grid; │ │ │ │ │ -97 int level; │ │ │ │ │ -98 }; │ │ │ │ │ -99 │ │ │ │ │ -100} // namespace Dune │ │ │ │ │ -101 │ │ │ │ │ -102#endif // DUNE_GRID_YASPGRIDINDEXSET_HH │ │ │ │ │ +_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 │ │ │ │ │ _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 common/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 common/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 common/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_:_:_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:43 │ │ │ │ │ -_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:51 │ │ │ │ │ -_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:82 │ │ │ │ │ -_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:65 │ │ │ │ │ -_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:58 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_I_n_d_e_x_S_e_t_:_:_t_y_p_e_s │ │ │ │ │ -static constexpr std::array< GeometryType, 1 > types(int codim) │ │ │ │ │ -obtain all geometry types of entities in domain │ │ │ │ │ -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(int codim) const │ │ │ │ │ -return size of set for a given codim │ │ │ │ │ -DDeeffiinniittiioonn yaspgridindexsets.hh:73 │ │ │ │ │ -_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:242 │ │ │ │ │ +_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/a00218.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: partitioning.hh File Reference │ │ │ │ +dune-grid: coordinates.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,50 +71,63 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces
│ │ │ │ -
partitioning.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Functions
│ │ │ │ +
coordinates.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. │ │ │ │ +

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 <dune/common/math.hh>
│ │ │ │ +#include <bitset>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/common/fvector.hh>
│ │ │ │
│ │ │ │

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::EquidistantCoordinates< ct, dim >
 Container for equidistant coordinates in a YaspGrid. More...
 
class  Dune::Yasp::DefaultPartitioning< d >
class  Dune::EquidistantOffsetCoordinates< ct, dim >
 Container for equidistant coordinates in a YaspGrid with non-trivial origin. More...
 
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::TensorProductCoordinates< ct, dim >
 Coordinate container for a tensor product YaspGrid. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

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

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.

│ │ │ │ +

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,44 +1,55 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ -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_._._. │ │ │ │ │ +_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 │ │ │ │ │ +#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_:_:_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_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_:_:_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_._._. │ │ │ │ │   │ │ │ │ │ -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_:_:_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_:_:_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 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. │ │ │ │ │ +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/a00218_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: partitioning.hh Source File │ │ │ │ +dune-grid: coordinates.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,187 +74,384 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
partitioning.hh
│ │ │ │ +
coordinates.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │ -
5
│ │ │ │ -
13#include<array>
│ │ │ │ -
14
│ │ │ │ -
15#include<dune/common/math.hh>
│ │ │ │ -
16
│ │ │ │ -
17namespace Dune
│ │ │ │ -
18{
│ │ │ │ -
19
│ │ │ │ -
20 namespace Yasp
│ │ │ │ -
21 {
│ │ │ │ -
22
│ │ │ │ -
36 template<int d>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
38 {
│ │ │ │ -
39 public:
│ │ │ │ -
40 using iTupel = std::array<int, d>;
│ │ │ │ -
41 virtual ~Partitioning() = default;
│ │ │ │ -
42 virtual void partition(const iTupel&, int, iTupel&, int) const = 0;
│ │ │ │ -
43 };
│ │ │ │ -
│ │ │ │ -
44
│ │ │ │ -
45 template<int d>
│ │ │ │ -
│ │ │ │ - │ │ │ │ +
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
│ │ │ │ +
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 public:
│ │ │ │ -
49 using iTupel = std::array<int, d>;
│ │ │ │ -
50
│ │ │ │ +
48 for (int i=0; i<dim; i++)
│ │ │ │ +
49 _h[i] = upperRight[i] / _s[i];
│ │ │ │ +
50 }
│ │ │ │ +
│ │ │ │ +
51
│ │ │ │
│ │ │ │ -
56 void partition (const iTupel& size, int P, iTupel& dims, int overlap) const final
│ │ │ │ -
57 {
│ │ │ │ -
58 double opt=1E100;
│ │ │ │ -
59 iTupel trydims;
│ │ │ │ +
56 inline ct meshsize(int d, [[maybe_unused]] int i) const
│ │ │ │ +
57 {
│ │ │ │ +
58 return _h[d];
│ │ │ │ +
59 }
│ │ │ │ +
│ │ │ │
60
│ │ │ │ -
61 trydims.fill(-1);
│ │ │ │ -
62 dims.fill(-1);
│ │ │ │ -
63
│ │ │ │ -
64 optimize_dims(d-1,size,P,dims,trydims,opt,overlap);
│ │ │ │ -
65 if (dims[0] == -1)
│ │ │ │ -
66 DUNE_THROW(Dune::GridError, "Failed to find a suitable partition");
│ │ │ │ -
67 }
│ │ │ │ -
│ │ │ │ -
68
│ │ │ │ -
69 private:
│ │ │ │ -
70 void optimize_dims (int i, const iTupel& size, int P, iTupel& dims, iTupel& trydims, double &opt, int overlap ) const
│ │ │ │ -
71 {
│ │ │ │ -
72 if (i>0) // test all subdivisions recursively
│ │ │ │ -
73 {
│ │ │ │ -
74 for (int k=1; k<=P; k++)
│ │ │ │ -
75 if (
│ │ │ │ -
76 P%k==0 // k divides P
│ │ │ │ -
77 and (
│ │ │ │ -
78 k == 1 // no neighbors
│ │ │ │ -
79 or
│ │ │ │ -
80 size[i] / k >= 2*overlap // size sufficient for overlap
│ │ │ │ -
81 )
│ │ │ │ -
82 )
│ │ │ │ -
83 {
│ │ │ │ -
84 // P divisible by k
│ │ │ │ -
85 trydims[i] = k;
│ │ │ │ -
86 optimize_dims(i-1,size,P/k,dims,trydims,opt,overlap);
│ │ │ │ -
87 }
│ │ │ │ -
88 }
│ │ │ │ -
89 else
│ │ │ │ -
90 {
│ │ │ │ -
91 // found a possible combination
│ │ │ │ -
92 if (
│ │ │ │ -
93 P == 1 // no neighbors
│ │ │ │ -
94 or
│ │ │ │ -
95 size[0] / P >= 2*overlap // size sufficient for overlap
│ │ │ │ -
96 )
│ │ │ │ -
97 trydims[0] = P;
│ │ │ │ -
98 else
│ │ │ │ -
99 return;
│ │ │ │ +
│ │ │ │ +
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 // check for optimality
│ │ │ │ -
102 double m = -1.0;
│ │ │ │ -
103
│ │ │ │ -
104 for (int k=0; k<d; k++)
│ │ │ │ -
105 {
│ │ │ │ -
106 double mm=((double)size[k])/((double)trydims[k]);
│ │ │ │ -
107 if (fmod((double)size[k],(double)trydims[k])>0.0001) mm*=3;
│ │ │ │ -
108 if ( mm > m ) m = mm;
│ │ │ │ -
109 }
│ │ │ │ -
110 //if (_rank==0) std::cout << "optimize_dims: " << size << " | " << trydims << " norm=" << m << std::endl;
│ │ │ │ -
111 if (m<opt)
│ │ │ │ -
112 {
│ │ │ │ -
113 opt = m;
│ │ │ │ -
114 dims = trydims;
│ │ │ │ -
115 }
│ │ │ │ -
116 }
│ │ │ │ -
117 }
│ │ │ │ -
118 };
│ │ │ │ -
│ │ │ │ -
119
│ │ │ │ -
122 template<int d>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
124 {
│ │ │ │ -
125 public:
│ │ │ │ -
126 typedef std::array<int, d> iTupel;
│ │ │ │ - │ │ │ │ -
128
│ │ │ │ -
│ │ │ │ -
129 void partition (const iTupel& size, int P, iTupel& dims, int overlap) const final
│ │ │ │ -
130 {
│ │ │ │ -
131 for (int i=1; i<=P; ++i)
│ │ │ │ -
132 if (Dune::power(i, d) == P) {
│ │ │ │ -
133 std::fill(dims.begin(), dims.end(),i);
│ │ │ │ -
134 return;
│ │ │ │ -
135 }
│ │ │ │ -
136
│ │ │ │ -
137 DUNE_THROW(GridError, "Power partitioning failed: your number of processes needs to be a " << d << "-th power.");
│ │ │ │ -
138 }
│ │ │ │ -
│ │ │ │ -
139 };
│ │ │ │ -
│ │ │ │ +
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
│ │ │ │ -
145 template<int d>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
147 {
│ │ │ │ -
148 public:
│ │ │ │ -
149 FixedSizePartitioning(const std::array<int,d>& dims) : _dims(dims) {}
│ │ │ │ -
150
│ │ │ │ - │ │ │ │ -
152
│ │ │ │ -
│ │ │ │ -
153 void partition(const std::array<int,d>&, int P, std::array<int,d>& dims, int overlap) const final
│ │ │ │ -
154 {
│ │ │ │ -
155 int prod = 1;
│ │ │ │ -
156 for (int i=0; i<d; i++)
│ │ │ │ -
157 prod *= _dims[i];
│ │ │ │ -
158 if (P != prod)
│ │ │ │ -
159 DUNE_THROW(Dune::Exception,"Your processor number doesn't match your partitioning information");
│ │ │ │ -
160 dims = _dims;
│ │ │ │ -
161 }
│ │ │ │ -
│ │ │ │ -
162
│ │ │ │ -
163 private:
│ │ │ │ -
164 std::array<int,d> _dims;
│ │ │ │ -
165 };
│ │ │ │ -
│ │ │ │ -
166
│ │ │ │ -
168 }
│ │ │ │ -
169}
│ │ │ │ -
170
│ │ │ │ -
171#endif
│ │ │ │ +
│ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ +
│ │ │ │ +
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;
│ │ │ │ +
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
│ │ │ │ +
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
│ │ │ │ -
Base class for exceptions in Dune grid modules.
Definition exceptions.hh:20
│ │ │ │ -
a base class for the yaspgrid partitioning strategy
Definition partitioning.hh:38
│ │ │ │ -
std::array< int, d > iTupel
Definition partitioning.hh:40
│ │ │ │ -
virtual ~Partitioning()=default
│ │ │ │ -
virtual void partition(const iTupel &, int, iTupel &, int) const =0
│ │ │ │ -
Definition partitioning.hh:47
│ │ │ │ -
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:56
│ │ │ │ -
std::array< int, d > iTupel
Definition partitioning.hh:49
│ │ │ │ -
Implement yaspgrid load balance strategy for P=x^{dim} processors.
Definition partitioning.hh:124
│ │ │ │ -
virtual ~PowerDPartitioning()
Definition partitioning.hh:127
│ │ │ │ -
std::array< int, d > iTupel
Definition partitioning.hh:126
│ │ │ │ -
void partition(const iTupel &size, int P, iTupel &dims, int overlap) const final
Definition partitioning.hh:129
│ │ │ │ -
Implement partitioner that gets a fixed partitioning from an array If the given partitioning doesn't ...
Definition partitioning.hh:147
│ │ │ │ -
void partition(const std::array< int, d > &, int P, std::array< int, d > &dims, int overlap) const final
Definition partitioning.hh:153
│ │ │ │ -
FixedSizePartitioning(const std::array< int, d > &dims)
Definition partitioning.hh:149
│ │ │ │ -
virtual ~FixedSizePartitioning()
Definition partitioning.hh:151
│ │ │ │ +
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,211 +1,426 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _y_a_s_p_g_r_i_d │ │ │ │ │ -partitioning.hh │ │ │ │ │ +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 © 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 │ │ │ │ │ -5 │ │ │ │ │ -13#include │ │ │ │ │ -14 │ │ │ │ │ -15#include │ │ │ │ │ -16 │ │ │ │ │ -17namespace _D_u_n_e │ │ │ │ │ -18{ │ │ │ │ │ -19 │ │ │ │ │ -20 namespace Yasp │ │ │ │ │ -21 { │ │ │ │ │ -22 │ │ │ │ │ -36 template │ │ │ │ │ -_3_7 class _P_a_r_t_i_t_i_o_n_i_n_g │ │ │ │ │ -38 { │ │ │ │ │ -39 public: │ │ │ │ │ -_4_0 using _i_T_u_p_e_l = std::array; │ │ │ │ │ -_4_1 virtual _~_P_a_r_t_i_t_i_o_n_i_n_g() = default; │ │ │ │ │ -_4_2 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; │ │ │ │ │ -43 }; │ │ │ │ │ -44 │ │ │ │ │ -45 template │ │ │ │ │ -_4_6 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 │ │ │ │ │ +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 │ │ │ │ │ +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 public: │ │ │ │ │ -_4_9 using _i_T_u_p_e_l = std::array; │ │ │ │ │ -50 │ │ │ │ │ -_5_6 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 │ │ │ │ │ +48 for (int i=0; i0) // test all subdivisions recursively │ │ │ │ │ -73 { │ │ │ │ │ -74 for (int k=1; k<=P; k++) │ │ │ │ │ -75 if ( │ │ │ │ │ -76 P%k==0 // k divides P │ │ │ │ │ -77 and ( │ │ │ │ │ -78 k == 1 // no neighbors │ │ │ │ │ -79 or │ │ │ │ │ -80 size[i] / k >= 2*overlap // size sufficient for overlap │ │ │ │ │ -81 ) │ │ │ │ │ -82 ) │ │ │ │ │ -83 { │ │ │ │ │ -84 // P divisible by k │ │ │ │ │ -85 trydims[i] = k; │ │ │ │ │ -86 optimize_dims(i-1,size,P/k,dims,trydims,opt,overlap); │ │ │ │ │ -87 } │ │ │ │ │ -88 } │ │ │ │ │ -89 else │ │ │ │ │ -90 { │ │ │ │ │ -91 // found a possible combination │ │ │ │ │ -92 if ( │ │ │ │ │ -93 P == 1 // no neighbors │ │ │ │ │ -94 or │ │ │ │ │ -95 size[0] / P >= 2*overlap // size sufficient for overlap │ │ │ │ │ -96 ) │ │ │ │ │ -97 trydims[0] = P; │ │ │ │ │ -98 else │ │ │ │ │ -99 return; │ │ │ │ │ +_6_5 inline ct _c_o_o_r_d_i_n_a_t_e(int d, int i) const │ │ │ │ │ +66 { │ │ │ │ │ +67 return i*_h[d]; │ │ │ │ │ +68 } │ │ │ │ │ +69 │ │ │ │ │ +_7_3 inline int _s_i_z_e(int d) const │ │ │ │ │ +74 { │ │ │ │ │ +75 return _s[d]; │ │ │ │ │ +76 } │ │ │ │ │ +77 │ │ │ │ │ +_8_4 _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_> _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; i0.0001) mm*=3; │ │ │ │ │ -108 if ( mm > m ) m = mm; │ │ │ │ │ -109 } │ │ │ │ │ -110 //if (_rank==0) std::cout << "optimize_dims: " << size << " | " << trydims │ │ │ │ │ -<< " norm=" << m << std::endl; │ │ │ │ │ -111 if (m │ │ │ │ │ -_1_2_3 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 │ │ │ │ │ -124 { │ │ │ │ │ -125 public: │ │ │ │ │ -_1_2_6 typedef std::array _i_T_u_p_e_l; │ │ │ │ │ -_1_2_7 virtual _~_P_o_w_e_r_D_P_a_r_t_i_t_i_o_n_i_n_g() {} │ │ │ │ │ -128 │ │ │ │ │ -_1_2_9 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 │ │ │ │ │ -130 { │ │ │ │ │ -131 for (int i=1; i<=P; ++i) │ │ │ │ │ -132 if (Dune::power(i, d) == P) { │ │ │ │ │ -133 std::fill(dims.begin(), dims.end(),i); │ │ │ │ │ -134 return; │ │ │ │ │ -135 } │ │ │ │ │ -136 │ │ │ │ │ -137 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."); │ │ │ │ │ -138 } │ │ │ │ │ -139 }; │ │ │ │ │ +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 │ │ │ │ │ +_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 │ │ │ │ │ -145 template │ │ │ │ │ -_1_4_6 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 │ │ │ │ │ -147 { │ │ │ │ │ -148 public: │ │ │ │ │ -_1_4_9 _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) {} │ │ │ │ │ -150 │ │ │ │ │ -_1_5_1 virtual _~_F_i_x_e_d_S_i_z_e_P_a_r_t_i_t_i_o_n_i_n_g() {} │ │ │ │ │ -152 │ │ │ │ │ -_1_5_3 void _p_a_r_t_i_t_i_o_n(const std::array&, int P, std::array& dims, │ │ │ │ │ -int overlap) const final │ │ │ │ │ -154 { │ │ │ │ │ -155 int prod = 1; │ │ │ │ │ -156 for (int i=0; i _dims; │ │ │ │ │ -165 }; │ │ │ │ │ -166 │ │ │ │ │ -168 } │ │ │ │ │ -169} │ │ │ │ │ -170 │ │ │ │ │ -171#endif │ │ │ │ │ +_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 _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 │ │ │ │ │ +_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 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 iTupel │ │ │ │ │ -DDeeffiinniittiioonn partitioning.hh:40 │ │ │ │ │ -_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:47 │ │ │ │ │ -_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:56 │ │ │ │ │ -_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:49 │ │ │ │ │ -_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:124 │ │ │ │ │ -_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: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_:_:_i_T_u_p_e_l │ │ │ │ │ -std::array< int, d > iTupel │ │ │ │ │ -DDeeffiinniittiioonn partitioning.hh:126 │ │ │ │ │ -_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:129 │ │ │ │ │ -_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:147 │ │ │ │ │ -_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:153 │ │ │ │ │ -_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:149 │ │ │ │ │ -_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:151 │ │ │ │ │ +_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/a00224.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: structuredyaspgridfactory.hh File Reference │ │ │ │ +dune-grid: yaspgridpersistentcontainer.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,42 +72,44 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
structuredyaspgridfactory.hh File Reference
│ │ │ │ +
yaspgridpersistentcontainer.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

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

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

│ │ │ │ -
#include <memory>
│ │ │ │ -#include <dune/grid/utility/structuredgridfactory.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.

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

│ │ │ │ Classes

class  Dune::StructuredGridFactory< YaspGrid< dim, EquidistantCoordinates< ctype, dim > > >
 Specialization of the StructuredGridFactory for YaspGrid. More...
class  Dune::YaspPersistentContainerIndex< Grid >
 
class  Dune::StructuredGridFactory< YaspGrid< dim, EquidistantOffsetCoordinates< ctype, dim > > >
 Specialization of the StructuredGridFactory for YaspGrid<EquidistantOffsetCoordinates> More...
class  Dune::PersistentContainer< YaspGrid< dim, CoordCont >, T >
 Specialization of the PersistentContainer for YaspGrid. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │

Detailed Description

│ │ │ │ -

Specialization of the StructuredGridFactory class for YaspGrid.

│ │ │ │ +

Specialization of the PersistentContainer for YaspGrid.

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,30 +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 │ │ │ │ │ -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> │ │ │ │ │ +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_:_:_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_:_:_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_:_:_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_:_:_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. │ │ │ │ │   │ │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -Specialization of the StructuredGridFactory class for YaspGrid. │ │ │ │ │ +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/a00224_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: structuredyaspgridfactory.hh Source File │ │ │ │ +dune-grid: yaspgridpersistentcontainer.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,126 +74,153 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
structuredyaspgridfactory.hh
│ │ │ │ +
yaspgridpersistentcontainer.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │ +
5#ifndef DUNE_GRID_YASPGRIDPERSISTENTCONTAINER_HH
│ │ │ │ +
6#define DUNE_GRID_YASPGRIDPERSISTENTCONTAINER_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)
│ │ │ │ -
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());
│ │ │ │ +
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 return std::make_unique<GridType>(upperRight, elem,
│ │ │ │ -
62 std::bitset<dim>(), 1); // default constructor of bitset sets to zero
│ │ │ │ -
63 }
│ │ │ │ -
│ │ │ │ -
64
│ │ │ │ -
70 static std::unique_ptr<GridType>
│ │ │ │ -
│ │ │ │ -
71 createSimplexGrid(const FieldVector<ctype,dimworld>&,
│ │ │ │ -
72 const FieldVector<ctype,dimworld>&,
│ │ │ │ -
73 const std::array<unsigned int,dim>&)
│ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ +
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
│ │ │ │ -
119 static std::unique_ptr<GridType>
│ │ │ │ -
│ │ │ │ -
120 createSimplexGrid(const FieldVector<ctype,dimworld>&,
│ │ │ │ -
121 const FieldVector<ctype,dimworld>&,
│ │ │ │ -
122 const std::array<unsigned int,dim>&)
│ │ │ │ -
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
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ +
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:538
│ │ │ │ +
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:166
│ │ │ │ -
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 > &, const FieldVector< ctype, dimworld > &, const std::array< unsigned int, dim > &)
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 > &, const FieldVector< ctype, dimworld > &, const std::array< unsigned int, dim > &)
Create a structured simplex grid.
Definition structuredyaspgridfactory.hh:120
│ │ │ │ -
A class to construct structured cube and simplex grids using the grid factory.
│ │ │ │ +
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,148 +1,193 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _y_a_s_p_g_r_i_d │ │ │ │ │ -structuredyaspgridfactory.hh │ │ │ │ │ +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 © 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 │ │ │ │ │ +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_/_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()); │ │ │ │ │ +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 return std::make_unique(upperRight, elem, │ │ │ │ │ -62 std::bitset(), 1); // default constructor of bitset sets to zero │ │ │ │ │ -63 } │ │ │ │ │ -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&, │ │ │ │ │ -72 const FieldVector&, │ │ │ │ │ -73 const std::array&) │ │ │ │ │ -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 } │ │ │ │ │ +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 │ │ │ │ │ -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&, │ │ │ │ │ -121 const FieldVector&, │ │ │ │ │ -122 const std::array&) │ │ │ │ │ -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 │ │ │ │ │ +_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_:_:_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_:_:_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:538 │ │ │ │ │ +_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:166 │ │ │ │ │ -_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 > &, const FieldVector< ctype, dimworld > &, const std::array< │ │ │ │ │ -unsigned int, dim > &) │ │ │ │ │ -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 > &, const FieldVector< ctype, dimworld > &, const std::array< │ │ │ │ │ -unsigned int, dim > &) │ │ │ │ │ -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_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/a00230.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: torus.hh File Reference │ │ │ │ +dune-grid: yaspgridindexsets.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,58 +71,38 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces | │ │ │ │ -Functions
│ │ │ │ -
torus.hh File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
yaspgridindexsets.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

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

level-wise, non-persistent, consecutive indices 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"
│ │ │ │ -
│ │ │ │ + │ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::Torus< Communication, d >
 
class  Dune::Torus< Communication, d >::ProcListIterator
class  Dune::YaspIndexSet< GridImp, isLeafIndexSet >
 Implementation of Level- and LeafIndexSets for YaspGrid. 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.

│ │ │ │ +

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

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,42 +1,23 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ +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_:_:_T_o_r_u_s_<_ _C_o_m_m_u_n_i_c_a_t_i_o_n_,_ _d_ _> │ │ │ │ │ -  │ │ │ │ │ -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_:_:_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. │ │ │ │ │   │ │ │ │ │ -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. │ │ │ │ │ +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/a00230_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: torus.hh Source File │ │ │ │ +dune-grid: yaspgridindexsets.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,619 +74,131 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
torus.hh
│ │ │ │ +
yaspgridindexsets.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_YASPGRIDINDEXSET_HH
│ │ │ │ +
6#define DUNE_GRID_YASPGRIDINDEXSET_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{
│ │ │ │ +
14namespace Dune {
│ │ │ │ +
15
│ │ │ │ +
22 template<class GridImp, bool isLeafIndexSet>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
24 : public IndexSet< GridImp, YaspIndexSet< GridImp, isLeafIndexSet >, unsigned int, std::array<GeometryType, 1> >
│ │ │ │ +
25 {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
28
│ │ │ │ +
29 public:
│ │ │ │ +
30 typedef typename Base::IndexType IndexType;
│ │ │ │
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!");
│ │ │ │ +
32 using Base::subIndex;
│ │ │ │ +
33
│ │ │ │ +
│ │ │ │ +
35 YaspIndexSet ( const GridImp &g, int l )
│ │ │ │ +
36 : grid( g ),
│ │ │ │ +
37 level( l )
│ │ │ │ +
38 {
│ │ │ │ +
39 assert(not isLeafIndexSet);
│ │ │ │ +
40 }
│ │ │ │ +
│ │ │ │ +
41
│ │ │ │ +
│ │ │ │ +
43 YaspIndexSet ( const GridImp &g )
│ │ │ │ +
44 : grid( g )
│ │ │ │ +
45 {
│ │ │ │ +
46 assert(isLeafIndexSet);
│ │ │ │ +
47 }
│ │ │ │ +
│ │ │ │ +
48
│ │ │ │ +
50 template<int cc>
│ │ │ │ +
│ │ │ │ +
51 IndexType index (const typename std::remove_const<GridImp>::type::Traits::template Codim<cc>::Entity& e) const
│ │ │ │ +
52 {
│ │ │ │ +
53 return e.impl().compressedIndex();
│ │ │ │ +
54 }
│ │ │ │ +
│ │ │ │ +
55
│ │ │ │ +
57 template< int cc >
│ │ │ │ +
│ │ │ │ +
58 IndexType subIndex ( const typename std::remove_const< GridImp >::type::Traits::template Codim< cc >::Entity &e,
│ │ │ │ +
59 int i, unsigned int codim ) const
│ │ │ │ +
60 {
│ │ │ │ +
61 return e.impl().subCompressedIndex(i, codim);
│ │ │ │ +
62 }
│ │ │ │ +
│ │ │ │ +
63
│ │ │ │ +
│ │ │ │ +
65 std::size_t size (GeometryType type) const
│ │ │ │ +
66 {
│ │ │ │ +
67 return (isLeafIndexSet)
│ │ │ │ +
68 ? grid.size( type )
│ │ │ │ +
69 : grid.size( level, type );
│ │ │ │ +
70 }
│ │ │ │ +
│ │ │ │ +
71
│ │ │ │ +
│ │ │ │ +
73 std::size_t size (int codim) const
│ │ │ │ +
74 {
│ │ │ │ +
75 return (isLeafIndexSet)
│ │ │ │ +
76 ? grid.size( codim )
│ │ │ │ +
77 : grid.size( level, codim );
│ │ │ │ +
78 }
│ │ │ │ +
│ │ │ │ +
79
│ │ │ │ +
81 template<class EntityType>
│ │ │ │ +
│ │ │ │ +
82 bool contains (const EntityType& e) const
│ │ │ │ +
83 {
│ │ │ │ +
84 return (isLeafIndexSet)
│ │ │ │ +
85 ? e.level() == grid.maxLevel()
│ │ │ │ +
86 : e.level() == level;
│ │ │ │ +
87 }
│ │ │ │ +
│ │ │ │
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;
│ │ │ │ -
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
│ │ │ │ +
│ │ │ │ +
90 static constexpr std::array<GeometryType, 1> types (int codim)
│ │ │ │ +
91 {
│ │ │ │ +
92 return { GeometryTypes::cube(GridImp::dimension - codim) };
│ │ │ │ +
93 }
│ │ │ │ +
│ │ │ │ +
94
│ │ │ │ +
95 private:
│ │ │ │ +
96 const GridImp& grid;
│ │ │ │ +
97 int level;
│ │ │ │ +
98 };
│ │ │ │ +
│ │ │ │ +
99
│ │ │ │ +
100} // namespace Dune
│ │ │ │ +
101
│ │ │ │ +
102#endif // DUNE_GRID_YASPGRIDINDEXSET_HH
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
a base class for the yaspgrid partitioning strategy
Definition partitioning.hh:38
│ │ │ │ -
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
│ │ │ │ +
Index Set Interface base class.
Definition common/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 common/indexidset.hh:153
│ │ │ │ +
Export the type of the entity used as parameter in the index(...) method.
Definition common/indexidset.hh:87
│ │ │ │ +
Implementation of Level- and LeafIndexSets for YaspGrid.
Definition yaspgridindexsets.hh:25
│ │ │ │ +
YaspIndexSet(const GridImp &g)
Level grid view constructor stores reference to a grid and level.
Definition yaspgridindexsets.hh:43
│ │ │ │ +
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:51
│ │ │ │ +
bool contains(const EntityType &e) const
return true if the given entity is contained in .
Definition yaspgridindexsets.hh:82
│ │ │ │ +
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:65
│ │ │ │ +
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:58
│ │ │ │ +
static constexpr std::array< GeometryType, 1 > types(int codim)
obtain all geometry types of entities in domain
Definition yaspgridindexsets.hh:90
│ │ │ │ +
std::size_t size(int codim) const
return size of set for a given codim
Definition yaspgridindexsets.hh:73
│ │ │ │ +
Base::IndexType IndexType
Definition yaspgridindexsets.hh:30
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,680 +1,153 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _y_a_s_p_g_r_i_d │ │ │ │ │ -torus.hh │ │ │ │ │ +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 © 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_YASPGRIDINDEXSET_HH │ │ │ │ │ +6#define DUNE_GRID_YASPGRIDINDEXSET_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{ │ │ │ │ │ +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, std::array > │ │ │ │ │ +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_,_ _s_t_d_:_:_a_r_r_a_y_<_G_e_o_m_e_t_r_y_T_y_p_e_,_ _1_> > │ │ │ │ │ +_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 │ │ │ │ │ -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 │ │ │ │ │ +_5_1 _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 │ │ │ │ │ +52 { │ │ │ │ │ +53 return e.impl().compressedIndex(); │ │ │ │ │ +54 } │ │ │ │ │ +55 │ │ │ │ │ +57 template< int cc > │ │ │ │ │ +_5_8 _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, │ │ │ │ │ +59 int i, unsigned int codim ) const │ │ │ │ │ +60 { │ │ │ │ │ +61 return e.impl().subCompressedIndex(i, codim); │ │ │ │ │ +62 } │ │ │ │ │ +63 │ │ │ │ │ +_6_5 std::size_t _s_i_z_e (GeometryType type) const │ │ │ │ │ +66 { │ │ │ │ │ +67 return (isLeafIndexSet) │ │ │ │ │ +68 ? grid.size( type ) │ │ │ │ │ +69 : grid.size( level, type ); │ │ │ │ │ +70 } │ │ │ │ │ +71 │ │ │ │ │ +_7_3 std::size_t _s_i_z_e (int codim) const │ │ │ │ │ +74 { │ │ │ │ │ +75 return (isLeafIndexSet) │ │ │ │ │ +76 ? grid.size( codim ) │ │ │ │ │ +77 : grid.size( level, codim ); │ │ │ │ │ +78 } │ │ │ │ │ +79 │ │ │ │ │ +81 template │ │ │ │ │ +_8_2 bool _c_o_n_t_a_i_n_s (const EntityType& e) const │ │ │ │ │ +83 { │ │ │ │ │ +84 return (isLeafIndexSet) │ │ │ │ │ +85 ? e.level() == grid.maxLevel() │ │ │ │ │ +86 : e.level() == level; │ │ │ │ │ +87 } │ │ │ │ │ 88 │ │ │ │ │ -89 // make full schedule │ │ │ │ │ -90 proclists(); │ │ │ │ │ -91 } │ │ │ │ │ -92 │ │ │ │ │ -_9_4 int _r_a_n_k () const │ │ │ │ │ -95 { │ │ │ │ │ -96 return _comm.rank(); │ │ │ │ │ -97 } │ │ │ │ │ -98 │ │ │ │ │ -_1_0_0 _i_T_u_p_e_l _c_o_o_r_d () const │ │ │ │ │ -101 { │ │ │ │ │ -102 return _r_a_n_k___t_o___c_o_o_r_d(_comm.rank()); │ │ │ │ │ -103 } │ │ │ │ │ -104 │ │ │ │ │ -_1_0_6 int _p_r_o_c_s () const │ │ │ │ │ -107 { │ │ │ │ │ -108 return _comm.size(); │ │ │ │ │ -109 } │ │ │ │ │ -110 │ │ │ │ │ -_1_1_2 const _i_T_u_p_e_l & _d_i_m_s () const │ │ │ │ │ -113 { │ │ │ │ │ -114 return _dims; │ │ │ │ │ -115 } │ │ │ │ │ -116 │ │ │ │ │ -_1_1_8 int _d_i_m_s (int i) const │ │ │ │ │ -119 { │ │ │ │ │ -120 return _dims[i]; │ │ │ │ │ -121 } │ │ │ │ │ -122 │ │ │ │ │ -_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 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 │ │ │ │ │ +_9_0 static constexpr std::array _t_y_p_e_s (int codim) │ │ │ │ │ +91 { │ │ │ │ │ +92 return { GeometryTypes::cube(GridImp::dimension - codim) }; │ │ │ │ │ +93 } │ │ │ │ │ +94 │ │ │ │ │ +95 private: │ │ │ │ │ +96 const GridImp& grid; │ │ │ │ │ +97 int level; │ │ │ │ │ +98 }; │ │ │ │ │ +99 │ │ │ │ │ +100} // namespace Dune │ │ │ │ │ +101 │ │ │ │ │ +102#endif // DUNE_GRID_YASPGRIDINDEXSET_HH │ │ │ │ │ _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:38 │ │ │ │ │ -_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_:_:_I_n_d_e_x_S_e_t │ │ │ │ │ +Index Set Interface base class. │ │ │ │ │ +DDeeffiinniittiioonn common/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 common/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 common/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_:_:_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:43 │ │ │ │ │ +_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:51 │ │ │ │ │ +_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:82 │ │ │ │ │ +_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:65 │ │ │ │ │ +_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:58 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_I_n_d_e_x_S_e_t_:_:_t_y_p_e_s │ │ │ │ │ +static constexpr std::array< GeometryType, 1 > types(int codim) │ │ │ │ │ +obtain all geometry types of entities in domain │ │ │ │ │ +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(int codim) const │ │ │ │ │ +return size of set for a given codim │ │ │ │ │ +DDeeffiinniittiioonn yaspgridindexsets.hh:73 │ │ │ │ │ +_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/a00308.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: sizecache.hh File Reference │ │ │ │ +dune-grid: adaptcallback.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,48 +72,43 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
sizecache.hh File Reference
│ │ │ │ +
adaptcallback.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

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 │ │ │ │ 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...
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 >
 
class  Dune::CombinedAdaptProlongRestrict< A, B >
 class for combining 2 index sets together for adaptation process More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │

Detailed Description

│ │ │ │ -

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

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

interfaces and wrappers needed for the callback adaptation provided by AlbertaGrid and dune-ALUGrid

│ │ │ │ +
Author
Martin Nolte
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,36 +2,33 @@ │ │ │ │ │ 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. │ │ │ │ │ -_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> │ │ │ │ │ +adaptcallback.hh File Reference │ │ │ │ │ +interfaces and wrappers needed for the callback adaptation provided by │ │ │ │ │ +AlbertaGrid and dune-ALUGrid _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_:_:_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 │ │ │ │ │ +class   _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_<_ _G_r_i_d_,_ _I_m_p_l_ _> │ │ │ │ │ +  Interface class for the _G_r_i_d's adapt method where the parameter is a │ │ │ │ │ + _A_d_a_p_t_D_a_t_a_H_a_n_d_l_e_I_n_t_e_r_f_a_c_e. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_A_d_a_p_t_D_a_t_a_H_a_n_d_l_e_<_ _G_r_i_d_,_ _I_m_p_l_ _> │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_C_o_m_b_i_n_e_d_A_d_a_p_t_P_r_o_l_o_n_g_R_e_s_t_r_i_c_t_<_ _A_,_ _B_ _> │ │ │ │ │ +  class for combining 2 index sets together for adaptation process │ │ │ │ │ _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. │ │ │ │ │ +interfaces and wrappers needed for the callback adaptation provided by │ │ │ │ │ +AlbertaGrid and dune-ALUGrid │ │ │ │ │ Author │ │ │ │ │ - Robert Kloefkorn │ │ │ │ │ + Martin Nolte │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00308_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: sizecache.hh Source File │ │ │ │ +dune-grid: adaptcallback.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,385 +74,180 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
sizecache.hh
│ │ │ │ +
adaptcallback.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_ADAPTCALLBACK_HH
│ │ │ │ +
6#define DUNE_GRID_COMMON_ADAPTCALLBACK_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>
│ │ │ │ +
14namespace Dune
│ │ │ │ +
15{
│ │ │ │ +
16
│ │ │ │ +
17 // Internal Forward Declarations
│ │ │ │ +
18 // -----------------------------
│ │ │ │ +
19
│ │ │ │ +
20 template< class Grid, class Impl >
│ │ │ │ +
21 class AdaptDataHandle;
│ │ │ │ +
22
│ │ │ │ +
23
│ │ │ │ +
24
│ │ │ │ +
25 // AdaptDataHandleInterface
│ │ │ │ +
26 // ------------------------
│ │ │ │ +
27
│ │ │ │ +
31 template< class Grid, class Impl >
│ │ │ │
│ │ │ │ - │ │ │ │ + │ │ │ │
33 {
│ │ │ │ - │ │ │ │ -
36 constexpr static int dim = GridImp::dimension;
│ │ │ │ + │ │ │ │ +
35
│ │ │ │ +
36 friend class AdaptDataHandle< Grid, Impl >;
│ │ │ │
37
│ │ │ │ -
39 constexpr static int nCodim = GridImp::dimension + 1;
│ │ │ │ +
38 public:
│ │ │ │ +
39 typedef typename Grid::template Codim< 0 >::Entity Entity;
│ │ │ │
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];
│ │ │ │ +
41 private:
│ │ │ │ + │ │ │ │ +
43 {}
│ │ │ │ +
44
│ │ │ │ +
45 AdaptDataHandleInterface ( const This & );
│ │ │ │ +
46 This &operator= ( const This & );
│ │ │ │ +
47
│ │ │ │ +
48 public:
│ │ │ │ +
│ │ │ │ +
54 void preCoarsening ( const Entity &father )
│ │ │ │ +
55 {
│ │ │ │ +
56 asImp().preCoarsening( father );
│ │ │ │ +
57 }
│ │ │ │ +
│ │ │ │
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
│ │ │ │ +
│ │ │ │ +
64 void postRefinement ( const Entity &father )
│ │ │ │
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 };
│ │ │ │ +
66 asImp().postRefinement( father );
│ │ │ │ +
67 }
│ │ │ │ +
│ │ │ │ +
68
│ │ │ │ +
│ │ │ │ +
69 void restrictLocal( const Entity &father, const Entity& son, bool initialize )
│ │ │ │ +
70 {
│ │ │ │ +
71 asImp().restrictLocal( father, son, initialize );
│ │ │ │ +
72 }
│ │ │ │ +
│ │ │ │ +
73
│ │ │ │ +
│ │ │ │ +
74 void prolongLocal( const Entity &father, const Entity& son, bool initialize )
│ │ │ │ +
75 {
│ │ │ │ +
76 asImp().prolongLocal( father, son, initialize );
│ │ │ │ +
77 }
│ │ │ │ +
│ │ │ │ +
78
│ │ │ │ +
79 protected:
│ │ │ │ +
80 const Impl &asImp () const { return static_cast< const Impl & >( *this ); }
│ │ │ │ +
81 Impl &asImp () { return static_cast< Impl & >( *this ); }
│ │ │ │ +
82 };
│ │ │ │ +
│ │ │ │ +
83
│ │ │ │ +
84
│ │ │ │ +
85
│ │ │ │ +
86 // AdaptDataHandle
│ │ │ │ +
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 {};
│ │ │ │ +
89 template< class Grid, class Impl >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
91 : public AdaptDataHandleInterface< Grid, Impl >
│ │ │ │ +
92 {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
95
│ │ │ │ +
96 public:
│ │ │ │ +
97 typedef typename Base::Entity Entity;
│ │ │ │ +
98
│ │ │ │ +
99 protected:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
101 {}
│ │ │ │ +
│ │ │ │ +
102
│ │ │ │ +
103 private:
│ │ │ │ +
104 AdaptDataHandle ( const This & );
│ │ │ │ +
105 This &operator= ( const This & );
│ │ │ │ +
106
│ │ │ │ +
107 void preCoarsening ( const Entity &father );
│ │ │ │ +
108 void postRefinement ( const Entity &father );
│ │ │ │ +
109 };
│ │ │ │ +
│ │ │ │ +
110
│ │ │ │ +
111
│ │ │ │ +
112 // CombinedAdaptProlongRestrict
│ │ │ │ +
113 // ----------------------------
│ │ │ │ +
114
│ │ │ │ +
116 template <class A, class B >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
118 {
│ │ │ │ +
120 A& _a;
│ │ │ │ +
121 B& _b;
│ │ │ │ +
122 public:
│ │ │ │ +
│ │ │ │ +
124 CombinedAdaptProlongRestrict ( A& a, B& b ) : _a ( a ) , _b ( b )
│ │ │ │ +
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 ); } );
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ +
128 template <class Entity>
│ │ │ │ +
│ │ │ │ +
129 void restrictLocal ( const Entity &father, const Entity &son, bool initialize )
│ │ │ │ +
130 {
│ │ │ │ +
131 _a.restrictLocal(father,son,initialize);
│ │ │ │ +
132 _b.restrictLocal(father,son,initialize);
│ │ │ │ +
133 }
│ │ │ │ +
│ │ │ │ +
134
│ │ │ │ +
136 template <class Entity>
│ │ │ │ +
│ │ │ │ +
137 void prolongLocal ( const Entity &father, const Entity &son, bool initialize )
│ │ │ │ +
138 {
│ │ │ │ +
139 _a.prolongLocal(father,son,initialize);
│ │ │ │ +
140 _b.prolongLocal(father,son,initialize);
│ │ │ │ +
141 }
│ │ │ │ +
│ │ │ │ +
142 };
│ │ │ │ +
│ │ │ │ +
143
│ │ │ │ +
144} // end namespace Dune
│ │ │ │ +
145
│ │ │ │ +
146#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.
│ │ │ │ +
Definition adaptcallback.hh:92
│ │ │ │ +
Base::Entity Entity
Definition adaptcallback.hh:97
│ │ │ │ +
AdaptDataHandle()
Definition adaptcallback.hh:100
│ │ │ │ +
Interface class for the Grid's adapt method where the parameter is a AdaptDataHandleInterface.
Definition adaptcallback.hh:33
│ │ │ │ +
void prolongLocal(const Entity &father, const Entity &son, bool initialize)
Definition adaptcallback.hh:74
│ │ │ │ +
void postRefinement(const Entity &father)
call back for activity to take place on newly created elements below the father element.
Definition adaptcallback.hh:64
│ │ │ │ +
Grid::template Codim< 0 >::Entity Entity
Definition adaptcallback.hh:39
│ │ │ │ +
Impl & asImp()
Definition adaptcallback.hh:81
│ │ │ │ +
const Impl & asImp() const
Definition adaptcallback.hh:80
│ │ │ │ +
void restrictLocal(const Entity &father, const Entity &son, bool initialize)
Definition adaptcallback.hh:69
│ │ │ │ +
void preCoarsening(const Entity &father)
call back for activity to take place on father and all descendants before the descendants are removed
Definition adaptcallback.hh:54
│ │ │ │ +
class for combining 2 index sets together for adaptation process
Definition adaptcallback.hh:118
│ │ │ │ +
CombinedAdaptProlongRestrict(A &a, B &b)
constructor storing the two references
Definition adaptcallback.hh:124
│ │ │ │ +
void restrictLocal(const Entity &father, const Entity &son, bool initialize)
restrict data to father
Definition adaptcallback.hh:129
│ │ │ │ +
void prolongLocal(const Entity &father, const Entity &son, bool initialize)
prolong data to children
Definition adaptcallback.hh:137
│ │ │ │ +
Wrapper class for entities.
Definition common/entity.hh:66
│ │ │ │ +
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,414 +1,202 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _c_o_m_m_o_n │ │ │ │ │ -sizecache.hh │ │ │ │ │ +adaptcallback.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 © 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_ADAPTCALLBACK_HH │ │ │ │ │ +6#define DUNE_GRID_COMMON_ADAPTCALLBACK_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 │ │ │ │ │ +14namespace _D_u_n_e │ │ │ │ │ +15{ │ │ │ │ │ +16 │ │ │ │ │ +17 // Internal Forward Declarations │ │ │ │ │ +18 // ----------------------------- │ │ │ │ │ +19 │ │ │ │ │ +20 template< class Grid, class Impl > │ │ │ │ │ +21 class AdaptDataHandle; │ │ │ │ │ +22 │ │ │ │ │ +23 │ │ │ │ │ +24 │ │ │ │ │ +25 // AdaptDataHandleInterface │ │ │ │ │ +26 // ------------------------ │ │ │ │ │ +27 │ │ │ │ │ +31 template< class Grid, class Impl > │ │ │ │ │ +_3_2 class _A_d_a_p_t_D_a_t_a_H_a_n_d_l_e_I_n_t_e_r_f_a_c_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; │ │ │ │ │ +34 typedef _A_d_a_p_t_D_a_t_a_H_a_n_d_l_e_I_n_t_e_r_f_a_c_e_<_ _G_r_i_d_,_ _I_m_p_l_ _> _T_h_i_s; │ │ │ │ │ +35 │ │ │ │ │ +36 friend class _A_d_a_p_t_D_a_t_a_H_a_n_d_l_e< _G_r_i_d, Impl >; │ │ │ │ │ 37 │ │ │ │ │ -39 constexpr static int nCodim = GridImp::dimension + 1; │ │ │ │ │ +38 public: │ │ │ │ │ +_3_9 typedef typename _G_r_i_d_:_:_t_e_m_p_l_a_t_e Codim< 0 >::Entity _E_n_t_i_t_y; │ │ │ │ │ 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]; │ │ │ │ │ +41 private: │ │ │ │ │ +42 _A_d_a_p_t_D_a_t_a_H_a_n_d_l_e_I_n_t_e_r_f_a_c_e () │ │ │ │ │ +43 {} │ │ │ │ │ +44 │ │ │ │ │ +45 _A_d_a_p_t_D_a_t_a_H_a_n_d_l_e_I_n_t_e_r_f_a_c_e ( const This & ); │ │ │ │ │ +46 This &operator= ( const This & ); │ │ │ │ │ +47 │ │ │ │ │ +48 public: │ │ │ │ │ +_5_4 void _p_r_e_C_o_a_r_s_e_n_i_n_g ( const _E_n_t_i_t_y &father ) │ │ │ │ │ +55 { │ │ │ │ │ +56 _a_s_I_m_p().preCoarsening( father ); │ │ │ │ │ +57 } │ │ │ │ │ 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 │ │ │ │ │ +_6_4 void _p_o_s_t_R_e_f_i_n_e_m_e_n_t ( const _E_n_t_i_t_y &father ) │ │ │ │ │ 65 { │ │ │ │ │ -66 template < class SzCacheType > │ │ │ │ │ -67 static void apply(const SzCacheType & sc, int level, int cd) │ │ │ │ │ -68 { │ │ │ │ │ -69 if( cd == codim ) │ │ │ │ │ +66 _a_s_I_m_p().postRefinement( father ); │ │ │ │ │ +67 } │ │ │ │ │ +68 │ │ │ │ │ +_6_9 void _r_e_s_t_r_i_c_t_L_o_c_a_l( const _E_n_t_i_t_y &father, const _E_n_t_i_t_y& son, bool initialize │ │ │ │ │ +) │ │ │ │ │ 70 { │ │ │ │ │ -71 sc.template countLevelEntities (level); │ │ │ │ │ +71 _a_s_I_m_p().restrictLocal( father, son, initialize ); │ │ │ │ │ 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 }; │ │ │ │ │ +73 │ │ │ │ │ +_7_4 void _p_r_o_l_o_n_g_L_o_c_a_l( const _E_n_t_i_t_y &father, const _E_n_t_i_t_y& son, bool initialize │ │ │ │ │ +) │ │ │ │ │ +75 { │ │ │ │ │ +76 _a_s_I_m_p().prolongLocal( father, son, initialize ); │ │ │ │ │ +77 } │ │ │ │ │ +78 │ │ │ │ │ +79 protected: │ │ │ │ │ +_8_0 const Impl &_a_s_I_m_p () const { return static_cast< const Impl & >( *this ); } │ │ │ │ │ +_8_1 Impl &_a_s_I_m_p () { return static_cast< Impl & >( *this ); } │ │ │ │ │ +82 }; │ │ │ │ │ +83 │ │ │ │ │ +84 │ │ │ │ │ +85 │ │ │ │ │ +86 // AdaptDataHandle │ │ │ │ │ +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 {}; │ │ │ │ │ +89 template< class Grid, class Impl > │ │ │ │ │ +_9_0 class _A_d_a_p_t_D_a_t_a_H_a_n_d_l_e │ │ │ │ │ +91 : public _A_d_a_p_t_D_a_t_a_H_a_n_d_l_e_I_n_t_e_r_f_a_c_e< Grid, Impl > │ │ │ │ │ +92 { │ │ │ │ │ +93 typedef _A_d_a_p_t_D_a_t_a_H_a_n_d_l_e_<_ _G_r_i_d_,_ _I_m_p_l_ _> _T_h_i_s; │ │ │ │ │ +94 typedef _A_d_a_p_t_D_a_t_a_H_a_n_d_l_e_I_n_t_e_r_f_a_c_e_<_ _G_r_i_d_,_ _I_m_p_l_ _> _B_a_s_e; │ │ │ │ │ +95 │ │ │ │ │ +96 public: │ │ │ │ │ +_9_7 typedef typename _B_a_s_e_:_:_E_n_t_i_t_y _E_n_t_i_t_y; │ │ │ │ │ +98 │ │ │ │ │ +99 protected: │ │ │ │ │ +_1_0_0 _A_d_a_p_t_D_a_t_a_H_a_n_d_l_e () │ │ │ │ │ +101 {} │ │ │ │ │ +102 │ │ │ │ │ +103 private: │ │ │ │ │ +104 _A_d_a_p_t_D_a_t_a_H_a_n_d_l_e ( const This & ); │ │ │ │ │ +105 This &operator= ( const This & ); │ │ │ │ │ +106 │ │ │ │ │ +107 void preCoarsening ( const _E_n_t_i_t_y &father ); │ │ │ │ │ +108 void postRefinement ( const _E_n_t_i_t_y &father ); │ │ │ │ │ +109 }; │ │ │ │ │ +110 │ │ │ │ │ +111 │ │ │ │ │ +112 // CombinedAdaptProlongRestrict │ │ │ │ │ +113 // ---------------------------- │ │ │ │ │ +114 │ │ │ │ │ +116 template │ │ │ │ │ +_1_1_7 class _C_o_m_b_i_n_e_d_A_d_a_p_t_P_r_o_l_o_n_g_R_e_s_t_r_i_c_t │ │ │ │ │ +118 { │ │ │ │ │ +120 A& _a; │ │ │ │ │ +121 B& _b; │ │ │ │ │ +122 public: │ │ │ │ │ +_1_2_4 _C_o_m_b_i_n_e_d_A_d_a_p_t_P_r_o_l_o_n_g_R_e_s_t_r_i_c_t ( A& a, B& b ) : _a ( a ) , _b ( b ) │ │ │ │ │ +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 ); } ); │ │ │ │ │ -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 │ │ │ │ │ +_1_2_9 void _r_e_s_t_r_i_c_t_L_o_c_a_l ( const _E_n_t_i_t_y &father, const _E_n_t_i_t_y &son, bool │ │ │ │ │ +initialize ) │ │ │ │ │ +130 { │ │ │ │ │ +131 _a.restrictLocal(father,son,initialize); │ │ │ │ │ +132 _b.restrictLocal(father,son,initialize); │ │ │ │ │ +133 } │ │ │ │ │ +134 │ │ │ │ │ +136 template │ │ │ │ │ +_1_3_7 void _p_r_o_l_o_n_g_L_o_c_a_l ( const _E_n_t_i_t_y &father, const _E_n_t_i_t_y &son, bool │ │ │ │ │ +initialize ) │ │ │ │ │ +138 { │ │ │ │ │ +139 _a.prolongLocal(father,son,initialize); │ │ │ │ │ +140 _b.prolongLocal(father,son,initialize); │ │ │ │ │ +141 } │ │ │ │ │ +142 }; │ │ │ │ │ +143 │ │ │ │ │ +144} // end namespace Dune │ │ │ │ │ +145 │ │ │ │ │ +146#endif │ │ │ │ │ _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_T_y_p_e │ │ │ │ │ -U_CHAR ElementType │ │ │ │ │ -DDeeffiinniittiioonn misc.hh:63 │ │ │ │ │ -_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_:_:_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 │ │ │ │ │ -_D_u_n_e_:_:_S_i_z_e_C_a_c_h_e_:_:_s_i_z_e │ │ │ │ │ -int size(int level, GeometryType type) const │ │ │ │ │ -Return number of entities per level and geometry type in this process. │ │ │ │ │ -DDeeffiinniittiioonn sizecache.hh:191 │ │ │ │ │ -_D_u_n_e_:_:_S_i_z_e_C_a_c_h_e_:_:_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 sizecache.hh:174 │ │ │ │ │ -_D_u_n_e_:_:_S_i_z_e_C_a_c_h_e_:_:_s_i_z_e │ │ │ │ │ -int size(int codim) const │ │ │ │ │ -Return number of leaf entities of a given codim in this process. │ │ │ │ │ -DDeeffiinniittiioonn sizecache.hh:205 │ │ │ │ │ -_D_u_n_e_:_:_S_i_z_e_C_a_c_h_e_:_:_S_i_z_e_C_a_c_h_e │ │ │ │ │ -SizeCache(const GridType &grid) │ │ │ │ │ -constructor taking grid reference │ │ │ │ │ -DDeeffiinniittiioonn sizecache.hh:142 │ │ │ │ │ -_D_u_n_e_:_:_S_i_z_e_C_a_c_h_e_:_:_s_i_z_e │ │ │ │ │ -int size(const GeometryType type) const │ │ │ │ │ -Return number of leaf entities per geometry type in this process. │ │ │ │ │ -DDeeffiinniittiioonn sizecache.hh:217 │ │ │ │ │ -_D_u_n_e_:_:_S_i_z_e_C_a_c_h_e_:_:_r_e_s_e_t │ │ │ │ │ -void reset() │ │ │ │ │ -reset all cached sizes │ │ │ │ │ -DDeeffiinniittiioonn sizecache.hh:148 │ │ │ │ │ -_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_:_:_A_d_a_p_t_D_a_t_a_H_a_n_d_l_e │ │ │ │ │ +DDeeffiinniittiioonn adaptcallback.hh:92 │ │ │ │ │ +_D_u_n_e_:_:_A_d_a_p_t_D_a_t_a_H_a_n_d_l_e_:_:_E_n_t_i_t_y │ │ │ │ │ +Base::Entity Entity │ │ │ │ │ +DDeeffiinniittiioonn adaptcallback.hh:97 │ │ │ │ │ +_D_u_n_e_:_:_A_d_a_p_t_D_a_t_a_H_a_n_d_l_e_:_:_A_d_a_p_t_D_a_t_a_H_a_n_d_l_e │ │ │ │ │ +AdaptDataHandle() │ │ │ │ │ +DDeeffiinniittiioonn adaptcallback.hh:100 │ │ │ │ │ +_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_:_:_A_d_a_p_t_D_a_t_a_H_a_n_d_l_e_I_n_t_e_r_f_a_c_e_:_:_p_r_o_l_o_n_g_L_o_c_a_l │ │ │ │ │ +void prolongLocal(const Entity &father, const Entity &son, bool initialize) │ │ │ │ │ +DDeeffiinniittiioonn adaptcallback.hh:74 │ │ │ │ │ +_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_:_:_p_o_s_t_R_e_f_i_n_e_m_e_n_t │ │ │ │ │ +void postRefinement(const Entity &father) │ │ │ │ │ +call back for activity to take place on newly created elements below the father │ │ │ │ │ +element. │ │ │ │ │ +DDeeffiinniittiioonn adaptcallback.hh:64 │ │ │ │ │ +_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_:_:_E_n_t_i_t_y │ │ │ │ │ +Grid::template Codim< 0 >::Entity Entity │ │ │ │ │ +DDeeffiinniittiioonn adaptcallback.hh:39 │ │ │ │ │ +_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_:_:_a_s_I_m_p │ │ │ │ │ +Impl & asImp() │ │ │ │ │ +DDeeffiinniittiioonn adaptcallback.hh:81 │ │ │ │ │ +_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_:_:_a_s_I_m_p │ │ │ │ │ +const Impl & asImp() const │ │ │ │ │ +DDeeffiinniittiioonn adaptcallback.hh:80 │ │ │ │ │ +_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_:_:_r_e_s_t_r_i_c_t_L_o_c_a_l │ │ │ │ │ +void restrictLocal(const Entity &father, const Entity &son, bool initialize) │ │ │ │ │ +DDeeffiinniittiioonn adaptcallback.hh:69 │ │ │ │ │ +_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_:_:_p_r_e_C_o_a_r_s_e_n_i_n_g │ │ │ │ │ +void preCoarsening(const Entity &father) │ │ │ │ │ +call back for activity to take place on father and all descendants before the │ │ │ │ │ +descendants are removed │ │ │ │ │ +DDeeffiinniittiioonn adaptcallback.hh:54 │ │ │ │ │ +_D_u_n_e_:_:_C_o_m_b_i_n_e_d_A_d_a_p_t_P_r_o_l_o_n_g_R_e_s_t_r_i_c_t │ │ │ │ │ +class for combining 2 index sets together for adaptation process │ │ │ │ │ +DDeeffiinniittiioonn adaptcallback.hh:118 │ │ │ │ │ +_D_u_n_e_:_:_C_o_m_b_i_n_e_d_A_d_a_p_t_P_r_o_l_o_n_g_R_e_s_t_r_i_c_t_:_:_C_o_m_b_i_n_e_d_A_d_a_p_t_P_r_o_l_o_n_g_R_e_s_t_r_i_c_t │ │ │ │ │ +CombinedAdaptProlongRestrict(A &a, B &b) │ │ │ │ │ +constructor storing the two references │ │ │ │ │ +DDeeffiinniittiioonn adaptcallback.hh:124 │ │ │ │ │ +_D_u_n_e_:_:_C_o_m_b_i_n_e_d_A_d_a_p_t_P_r_o_l_o_n_g_R_e_s_t_r_i_c_t_:_:_r_e_s_t_r_i_c_t_L_o_c_a_l │ │ │ │ │ +void restrictLocal(const Entity &father, const Entity &son, bool initialize) │ │ │ │ │ +restrict data to father │ │ │ │ │ +DDeeffiinniittiioonn adaptcallback.hh:129 │ │ │ │ │ +_D_u_n_e_:_:_C_o_m_b_i_n_e_d_A_d_a_p_t_P_r_o_l_o_n_g_R_e_s_t_r_i_c_t_:_:_p_r_o_l_o_n_g_L_o_c_a_l │ │ │ │ │ +void prolongLocal(const Entity &father, const Entity &son, bool initialize) │ │ │ │ │ +prolong data to children │ │ │ │ │ +DDeeffiinniittiioonn adaptcallback.hh:137 │ │ │ │ │ +_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_:_:_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/a00344.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: exceptions.hh File Reference │ │ │ │ +dune-grid: mapper.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,33 +72,40 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
exceptions.hh File Reference
│ │ │ │ +
mapper.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/common/exceptions.hh>
│ │ │ │ + │ │ │ │ +

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

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

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::GridError
 Base class for exceptions in Dune grid modules. More...
class  Dune::Mapper< G, MapperImp, IndexType >
 Mapper interface. 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,20 +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 │ │ │ │ │ -exceptions.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ +mapper.hh File Reference │ │ │ │ │ +Provides classes with basic mappers which are used to attach data to a grid. │ │ │ │ │ +_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_:_:_G_r_i_d_E_r_r_o_r │ │ │ │ │ -  Base class for exceptions in _D_u_n_e grid modules. _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 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/a00344_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: exceptions.hh Source File │ │ │ │ +dune-grid: mapper.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,43 +74,114 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
exceptions.hh
│ │ │ │ +
mapper.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │ +
5#ifndef DUNE_GRID_COMMON_MAPPER_HH
│ │ │ │ +
6#define DUNE_GRID_COMMON_MAPPER_HH
│ │ │ │
7
│ │ │ │ -
8#include <dune/common/exceptions.hh>
│ │ │ │ +
8#include <utility>
│ │ │ │
9
│ │ │ │ -
10namespace Dune
│ │ │ │ -
11{
│ │ │ │ -
12
│ │ │ │ -
13 // GridError
│ │ │ │ -
14 // ---------
│ │ │ │ -
15
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
19 : public Exception
│ │ │ │ -
20 {};
│ │ │ │ -
│ │ │ │ -
21
│ │ │ │ -
22}
│ │ │ │ -
23
│ │ │ │ -
24#endif // #ifndef DUNE_GRID_COMMON_EXCEPTIONS_HH
│ │ │ │ +
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 private:
│ │ │ │ +
199 MapperImp& asImp () {return static_cast<MapperImp &> (*this);}
│ │ │ │ +
201 const MapperImp& asImp () const {return static_cast<const MapperImp &>(*this);}
│ │ │ │ +
202 };
│ │ │ │ +
│ │ │ │ +
203
│ │ │ │ +
206#undef CHECK_INTERFACE_IMPLEMENTATION
│ │ │ │ +
207#undef CHECK_AND_CALL_INTERFACE_IMPLEMENTATION
│ │ │ │ +
208
│ │ │ │ +
209}
│ │ │ │ +
210#endif
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Base class for exceptions in Dune grid modules.
Definition exceptions.hh:20
│ │ │ │ +
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
│ │ │ │ +
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,40 +1,129 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _c_o_m_m_o_n │ │ │ │ │ -exceptions.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 © 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 │ │ │ │ │ +5#ifndef DUNE_GRID_COMMON_MAPPER_HH │ │ │ │ │ +6#define DUNE_GRID_COMMON_MAPPER_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ +8#include │ │ │ │ │ 9 │ │ │ │ │ -10namespace _D_u_n_e │ │ │ │ │ -11{ │ │ │ │ │ -12 │ │ │ │ │ -13 // GridError │ │ │ │ │ -14 // --------- │ │ │ │ │ -15 │ │ │ │ │ -_1_8 class _G_r_i_d_E_r_r_o_r │ │ │ │ │ -19 : public Exception │ │ │ │ │ -20 {}; │ │ │ │ │ -21 │ │ │ │ │ -22} │ │ │ │ │ -23 │ │ │ │ │ -24#endif // #ifndef DUNE_GRID_COMMON_EXCEPTIONS_HH │ │ │ │ │ +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 private: │ │ │ │ │ +199 MapperImp& asImp () {return static_cast (*this);} │ │ │ │ │ +201 const MapperImp& asImp () const {return static_cast │ │ │ │ │ +(*this);} │ │ │ │ │ +202 }; │ │ │ │ │ +203 │ │ │ │ │ +206#undef CHECK_INTERFACE_IMPLEMENTATION │ │ │ │ │ +207#undef CHECK_AND_CALL_INTERFACE_IMPLEMENTATION │ │ │ │ │ +208 │ │ │ │ │ +209} │ │ │ │ │ +210#endif │ │ │ │ │ _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_:_:_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_:_:_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 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00566.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.

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

│ │ │ │ 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/a00566_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 © 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 typename ReferenceElements< ctype, dimension >::ReferenceElement 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 typename ReferenceElements< ctype, dimension >::ReferenceElement 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 typename ReferenceElements< ctype, dimension >::ReferenceElement 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 typename ReferenceElements< ctype, dimension >::ReferenceElement 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 typename ReferenceElements< ctype, dimension >::ReferenceElement 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 typename ReferenceElements< ctype, dimension >::ReferenceElement 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
│ │ │ │ +
ReferenceElements< ctype, dimension >::ReferenceElement RefElement
Definition iterator.hh:53
│ │ │ │ +
static bool apply(const RefElement &refElement, const Element &element, int subEntity)
Definition iterator.hh:55
│ │ │ │ +
static bool apply(const RefElement &refElement, const Element &element, int subEntity)
Definition iterator.hh:82
│ │ │ │ +
ReferenceElements< ctype, dimension >::ReferenceElement RefElement
Definition iterator.hh:80
│ │ │ │ +
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
│ │ │ │ +
ReferenceElements< ctype, dimension >::ReferenceElement 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
│ │ │ │ +
ReferenceElements< ctype, dimension >::ReferenceElement 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
│ │ │ │ +
ReferenceElements< ctype, dimension >::ReferenceElement RefElement
Definition iterator.hh:148
│ │ │ │ +
std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element
Definition iterator.hh:147
│ │ │ │ +
ReferenceElements< ctype, dimension >::ReferenceElement 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,735 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 © 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 typename ReferenceElements< ctype, dimension >::ReferenceElement │ │ │ │ │ +_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 typename ReferenceElements< ctype, dimension >::ReferenceElement │ │ │ │ │ +_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 typename ReferenceElements< ctype, dimension >::ReferenceElement │ │ │ │ │ +_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 typename ReferenceElements< ctype, dimension >::ReferenceElement │ │ │ │ │ +_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 typename ReferenceElements< ctype, dimension >::ReferenceElement │ │ │ │ │ +_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 typename ReferenceElements< ctype, dimension >::ReferenceElement │ │ │ │ │ +_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_ _>_:_: │ │ │ │ │ +_R_e_f_E_l_e_m_e_n_t │ │ │ │ │ +ReferenceElements< ctype, dimension >::ReferenceElement 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___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_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 │ │ │ │ │ +_>_:_:_R_e_f_E_l_e_m_e_n_t │ │ │ │ │ +ReferenceElements< ctype, dimension >::ReferenceElement 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 │ │ │ │ │ +_>_:_:_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 │ │ │ │ │ +ReferenceElements< ctype, dimension >::ReferenceElement 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 │ │ │ │ │ +ReferenceElements< ctype, dimension >::ReferenceElement 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 │ │ │ │ │ +ReferenceElements< ctype, dimension >::ReferenceElement 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 │ │ │ │ │ +ReferenceElements< ctype, dimension >::ReferenceElement 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/a00569.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: coordfunctioncaller.hh File Reference │ │ │ │ +dune-grid: hostcorners.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,23 +70,29 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ +Classes | │ │ │ │ Namespaces
│ │ │ │ -
coordfunctioncaller.hh File Reference
│ │ │ │ +
hostcorners.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/grid/geometrygrid/hostcorners.hh>
│ │ │ │ -#include <dune/grid/geometrygrid/coordfunction.hh>
│ │ │ │ +
#include <dune/geometry/type.hh>
│ │ │ │ +#include <dune/grid/common/entity.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Namespaces

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

│ │ │ │ +Classes

class  Dune::GeoGrid::HostCorners< HostEntity >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,19 +1,22 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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> │ │ │ │ │ +_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> │ │ │ │ │ _G_o_ _t_o_ _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_ _> │ │ │ │ │ +  │ │ │ │ │ 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/a00569_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: coordfunctioncaller.hh Source File │ │ │ │ +dune-grid: hostcorners.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,123 +74,90 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
coordfunctioncaller.hh
│ │ │ │ +
hostcorners.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_GEOGRID_HOSTCORNERS_HH
│ │ │ │ +
6#define DUNE_GEOGRID_HOSTCORNERS_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ - │ │ │ │ -
10
│ │ │ │ -
11namespace Dune
│ │ │ │ -
12{
│ │ │ │ -
13
│ │ │ │ +
8#include <dune/geometry/type.hh>
│ │ │ │ +
9
│ │ │ │ + │ │ │ │ +
11
│ │ │ │ +
12namespace Dune
│ │ │ │ +
13{
│ │ │ │
14 namespace GeoGrid
│ │ │ │
15 {
│ │ │ │
16
│ │ │ │ -
17 // CoordFunctionCaller
│ │ │ │ -
18 // -------------------
│ │ │ │ +
17 // HostCorners
│ │ │ │ +
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 }
│ │ │ │ +
20 template< class HostEntity >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
22 {
│ │ │ │ +
23 typedef typename HostEntity::Geometry HostGeometry;
│ │ │ │ +
24
│ │ │ │ +
25 public:
│ │ │ │ +
26 typedef typename HostGeometry::GlobalCoordinate Coordinate;
│ │ │ │ +
27
│ │ │ │ +
│ │ │ │ +
28 explicit HostCorners ( const HostEntity &hostEntity )
│ │ │ │ +
29 : hostGeometry_( hostEntity.geometry() )
│ │ │ │ +
30 {}
│ │ │ │ +
│ │ │ │ +
31
│ │ │ │ +
│ │ │ │ +
32 GeometryType type () const
│ │ │ │ +
33 {
│ │ │ │ +
34 return hostGeometry_.type();
│ │ │ │ +
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 };
│ │ │ │ +
│ │ │ │ +
50
│ │ │ │ +
51 } // namespace GeoGrid
│ │ │ │ +
52
│ │ │ │ +
53} // namespace Dune
│ │ │ │
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
│ │ │ │ - │ │ │ │ - │ │ │ │ +
55#endif // #ifndef DUNE_GEOGRID_HOSTCORNERS_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
│ │ │ │ +
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
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,132 +1,88 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ +hostcorners.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 © 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_GEOGRID_HOSTCORNERS_HH │ │ │ │ │ +6#define DUNE_GEOGRID_HOSTCORNERS_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> │ │ │ │ │ -10 │ │ │ │ │ -11namespace _D_u_n_e │ │ │ │ │ -12{ │ │ │ │ │ -13 │ │ │ │ │ +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 // CoordFunctionCaller │ │ │ │ │ -18 // ------------------- │ │ │ │ │ +17 // HostCorners │ │ │ │ │ +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 } │ │ │ │ │ +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; │ │ │ │ │ +24 │ │ │ │ │ +25 public: │ │ │ │ │ +_2_6 typedef typename HostGeometry::GlobalCoordinate _C_o_o_r_d_i_n_a_t_e; │ │ │ │ │ +27 │ │ │ │ │ +_2_8 explicit _H_o_s_t_C_o_r_n_e_r_s ( const HostEntity &hostEntity ) │ │ │ │ │ +29 : hostGeometry_( hostEntity.geometry() ) │ │ │ │ │ +30 {} │ │ │ │ │ +31 │ │ │ │ │ +_3_2 GeometryType _t_y_p_e () const │ │ │ │ │ +33 { │ │ │ │ │ +34 return hostGeometry_.type(); │ │ │ │ │ +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 }; │ │ │ │ │ +50 │ │ │ │ │ +51 } // namespace GeoGrid │ │ │ │ │ +52 │ │ │ │ │ +53} // namespace Dune │ │ │ │ │ 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 │ │ │ │ │ +55#endif // #ifndef DUNE_GEOGRID_HOSTCORNERS_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_:_:_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 │ │ │ │ │ +_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/a00572.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: iterator.hh File Reference │ │ │ │ +dune-grid: cornerstorage.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,46 +72,31 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
iterator.hh File Reference
│ │ │ │ +
cornerstorage.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>
│ │ │ │ +
#include <array>
│ │ │ │ +#include <dune/grid/geometrygrid/coordfunctioncaller.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::GeoGrid
 namespace containing the implementations of GeometryGrid
│ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

struct  Dune::GeoGrid::PartitionIteratorFilter< codim, Interior_Partition, Grid >
class  Dune::GeoGrid::CoordVector< mydim, Grid, false >
 
struct  Dune::GeoGrid::PartitionIteratorFilter< codim, InteriorBorder_Partition, Grid >
class  Dune::GeoGrid::CoordVector< mydim, Grid, true >
 
struct  Dune::GeoGrid::PartitionIteratorFilter< codim, Overlap_Partition, Grid >
class  Dune::GeoGrid::IntersectionCoordVector< 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 >
class  Dune::GeoGrid::CornerStorage< mydim, cdim, Grid >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,45 +2,26 @@ │ │ │ │ │ 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> │ │ │ │ │ +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 │ │ │ │ │ -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_:_:_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_ _> │ │ │ │ │   │ │ │ │ │ -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_:_:_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_ _> │ │ │ │ │   │ │ │ │ │ -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 │ │ │ │ │ - _> │ │ │ │ │ +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_ _> │ │ │ │ │   │ │ │ │ │ -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_:_:_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. │ │ │ │ │   │ │ │ │ │ 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/a00572_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: iterator.hh Source File │ │ │ │ +dune-grid: cornerstorage.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,592 +74,277 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
iterator.hh
│ │ │ │ +
cornerstorage.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │ +
5#ifndef DUNE_GEOGRID_CORNERSTORAGE_HH
│ │ │ │ +
6#define DUNE_GEOGRID_CORNERSTORAGE_HH
│ │ │ │
7
│ │ │ │ -
8#include <cassert>
│ │ │ │ +
8#include <array>
│ │ │ │
9
│ │ │ │ -
10#include <type_traits>
│ │ │ │ -
11#include <utility>
│ │ │ │ -
12
│ │ │ │ -
13#include <dune/geometry/referenceelements.hh>
│ │ │ │ + │ │ │ │ +
11
│ │ │ │ +
12namespace Dune
│ │ │ │ +
13{
│ │ │ │
14
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
18
│ │ │ │ -
19namespace Dune
│ │ │ │ -
20{
│ │ │ │ -
21
│ │ │ │ -
22 namespace GeoGrid
│ │ │ │ -
23 {
│ │ │ │ +
15 namespace GeoGrid
│ │ │ │ +
16 {
│ │ │ │ +
17
│ │ │ │ +
18 // CoordVector
│ │ │ │ +
19 // -----------
│ │ │ │ +
20
│ │ │ │ +
21 template< int mydim, class Grid, bool fake >
│ │ │ │ + │ │ │ │ +
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;
│ │ │ │ +
25 template< int mydim, class Grid >
│ │ │ │ +
│ │ │ │ +
26 class CoordVector< mydim, Grid, false >
│ │ │ │ +
27 {
│ │ │ │ +
28 typedef typename std::remove_const< Grid >::type::Traits Traits;
│ │ │ │ +
29
│ │ │ │ +
30 typedef typename Traits::ctype ctype;
│ │ │ │
31
│ │ │ │ -
32 template< class Grid >
│ │ │ │ - │ │ │ │ -
34
│ │ │ │ -
35
│ │ │ │ +
32 static const int dimension = Traits::dimension;
│ │ │ │ +
33 static const int mydimension = mydim;
│ │ │ │ +
34 static const int codimension = dimension - mydimension;
│ │ │ │ +
35 static const int dimensionworld = Traits::dimensionworld;
│ │ │ │
36
│ │ │ │ -
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 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 typename ReferenceElements< ctype, dimension >::ReferenceElement 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;
│ │ │ │ -
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 typename ReferenceElements< ctype, dimension >::ReferenceElement RefElement;
│ │ │ │ -
81
│ │ │ │ -
│ │ │ │ -
82 static bool apply ( const RefElement &refElement,
│ │ │ │ -
83 const Element &element, int subEntity )
│ │ │ │ -
84 {
│ │ │ │ -
85 return true;
│ │ │ │ -
86 }
│ │ │ │ -
│ │ │ │ -
87 };
│ │ │ │ -
│ │ │ │ +
37 typedef FieldVector< ctype, dimensionworld > Coordinate;
│ │ │ │ +
38
│ │ │ │ +
39 typedef typename Traits::HostGrid HostGrid;
│ │ │ │ +
40 typedef typename Traits::CoordFunction CoordFunction;
│ │ │ │ +
41
│ │ │ │ +
42 typedef typename HostGrid::template Codim< codimension >::Entity HostEntity;
│ │ │ │ +
43
│ │ │ │ +
44 typedef GeoGrid :: CoordFunctionCaller< HostEntity, typename CoordFunction::Interface >
│ │ │ │ +
45 CoordFunctionCaller;
│ │ │ │ +
46
│ │ │ │ +
47 public:
│ │ │ │ +
│ │ │ │ +
48 CoordVector ( const HostEntity &hostEntity,
│ │ │ │ +
49 const CoordFunction &coordFunction )
│ │ │ │ +
50 : coordFunctionCaller_( hostEntity, coordFunction )
│ │ │ │ +
51 {}
│ │ │ │ +
│ │ │ │ +
52
│ │ │ │ +
53 template< std::size_t size >
│ │ │ │ +
│ │ │ │ +
54 void calculate ( std::array< Coordinate, size > (&corners) ) const
│ │ │ │ +
55 {
│ │ │ │ +
56 const std::size_t numCorners = coordFunctionCaller_.size();
│ │ │ │ +
57 assert( size >= numCorners );
│ │ │ │ +
58 for( std::size_t i = 0; i < numCorners; ++i )
│ │ │ │ +
59 coordFunctionCaller_.evaluate( i, corners[ i ] );
│ │ │ │ +
60 }
│ │ │ │ +
│ │ │ │ +
61
│ │ │ │ +
62 private:
│ │ │ │ +
63 const CoordFunctionCaller coordFunctionCaller_;
│ │ │ │ +
64 };
│ │ │ │ +
│ │ │ │ +
65
│ │ │ │ +
66
│ │ │ │ +
67 template< int mydim, class Grid >
│ │ │ │ +
│ │ │ │ +
68 class CoordVector< mydim, Grid, true >
│ │ │ │ +
69 {
│ │ │ │ +
70 typedef typename std::remove_const< Grid > :: type :: Traits Traits;
│ │ │ │ +
71
│ │ │ │ +
72 typedef typename Traits::ctype ctype;
│ │ │ │ +
73
│ │ │ │ +
74 static const int dimension = Traits::dimension;
│ │ │ │ +
75 static const int mydimension = mydim;
│ │ │ │ +
76 static const int codimension = dimension - mydimension;
│ │ │ │ +
77 static const int dimensionworld = Traits::dimensionworld;
│ │ │ │ +
78
│ │ │ │ +
79 typedef FieldVector< ctype, dimensionworld > Coordinate;
│ │ │ │ +
80
│ │ │ │ +
81 typedef typename Traits::HostGrid HostGrid;
│ │ │ │ +
82 typedef typename Traits::CoordFunction CoordFunction;
│ │ │ │ +
83
│ │ │ │ +
84 typedef typename HostGrid::template Codim< 0 >::Entity HostElement;
│ │ │ │ +
85
│ │ │ │ + │ │ │ │ + │ │ │ │
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;
│ │ │ │ +
89 public:
│ │ │ │ +
│ │ │ │ +
90 CoordVector ( const HostElement &hostElement,
│ │ │ │ +
91 const unsigned int subEntity,
│ │ │ │ +
92 const CoordFunction &coordFunction )
│ │ │ │ +
93 : coordFunctionCaller_( hostElement, coordFunction ),
│ │ │ │ +
94 subEntity_( subEntity )
│ │ │ │ +
95 {}
│ │ │ │ +
│ │ │ │
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 typename ReferenceElements< ctype, dimension >::ReferenceElement 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 typename ReferenceElements< ctype, dimension >::ReferenceElement 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 typename ReferenceElements< ctype, dimension >::ReferenceElement RefElement;
│ │ │ │ -
149
│ │ │ │ -
│ │ │ │ -
150 static bool apply ( const RefElement &refElement,
│ │ │ │ -
151 const Element &element, int subEntity )
│ │ │ │ -
152 {
│ │ │ │ -
153 return true;
│ │ │ │ +
97 template< std::size_t size >
│ │ │ │ +
│ │ │ │ +
98 void calculate ( std::array< Coordinate, size > (&corners) ) const
│ │ │ │ +
99 {
│ │ │ │ +
100 const GeometryType type = coordFunctionCaller_.type();
│ │ │ │ +
101 auto refElement = referenceElement< ctype, dimension >( type );
│ │ │ │ +
102 const std::size_t numCorners = refElement.size( subEntity_, codimension, dimension );
│ │ │ │ +
103 assert( size >= numCorners );
│ │ │ │ +
104 for( std::size_t i = 0; i < numCorners; ++i )
│ │ │ │ +
105 {
│ │ │ │ +
106 const std::size_t j = refElement.subEntity( subEntity_, codimension, i, dimension );
│ │ │ │ +
107 coordFunctionCaller_.evaluate( j, corners[ i ] );
│ │ │ │ +
108 }
│ │ │ │ +
109 }
│ │ │ │ +
│ │ │ │ +
110
│ │ │ │ +
111 private:
│ │ │ │ +
112 const CoordFunctionCaller coordFunctionCaller_;
│ │ │ │ +
113 const unsigned int subEntity_;
│ │ │ │ +
114 };
│ │ │ │ +
│ │ │ │ +
115
│ │ │ │ +
116
│ │ │ │ +
117
│ │ │ │ +
118 // IntersectionCoordVector
│ │ │ │ +
119 // -----------------------
│ │ │ │ +
120
│ │ │ │ +
121 template< class Grid >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
123 {
│ │ │ │ +
124 typedef typename std::remove_const< Grid >::type::Traits Traits;
│ │ │ │ +
125
│ │ │ │ +
126 typedef typename Traits::ctype ctype;
│ │ │ │ +
127
│ │ │ │ +
128 static const int dimension = Traits::dimension;
│ │ │ │ +
129 static const int codimension = 1;
│ │ │ │ +
130 static const int mydimension = dimension-codimension;
│ │ │ │ +
131 static const int dimensionworld = Traits::dimensionworld;
│ │ │ │ +
132
│ │ │ │ +
133 typedef FieldVector< ctype, dimensionworld > Coordinate;
│ │ │ │ +
134
│ │ │ │ +
135 typedef typename Traits::HostGrid HostGrid;
│ │ │ │ +
136
│ │ │ │ +
137 typedef typename Traits::template Codim< 0 >::GeometryImpl ElementGeometryImpl;
│ │ │ │ +
138 typedef typename Traits::template Codim< codimension >::LocalGeometry HostLocalGeometry;
│ │ │ │ +
139
│ │ │ │ +
140 public:
│ │ │ │ +
│ │ │ │ +
141 IntersectionCoordVector ( const ElementGeometryImpl &elementGeometry,
│ │ │ │ +
142 const HostLocalGeometry &hostLocalGeometry )
│ │ │ │ +
143 : elementGeometry_( elementGeometry ),
│ │ │ │ +
144 hostLocalGeometry_( hostLocalGeometry )
│ │ │ │ +
145 {}
│ │ │ │ +
│ │ │ │ +
146
│ │ │ │ +
147 template< std::size_t size >
│ │ │ │ +
│ │ │ │ +
148 void calculate ( std::array< Coordinate, size > (&corners) ) const
│ │ │ │ +
149 {
│ │ │ │ +
150 const std::size_t numCorners = hostLocalGeometry_.corners();
│ │ │ │ +
151 assert( size >= numCorners );
│ │ │ │ +
152 for( std::size_t i = 0; i < numCorners; ++i )
│ │ │ │ +
153 corners[ i ] = elementGeometry_.global( hostLocalGeometry_.corner( i ) );
│ │ │ │
154 }
│ │ │ │
│ │ │ │ -
155 };
│ │ │ │ +
155
│ │ │ │ +
156 template< unsigned int numCorners >
│ │ │ │ +
│ │ │ │ +
157 void calculate ( Coordinate (&corners)[ numCorners ] ) const
│ │ │ │ +
158 {
│ │ │ │ +
159 assert( numCorners == hostLocalGeometry_.corners() );
│ │ │ │ +
160 }
│ │ │ │ +
│ │ │ │ +
161
│ │ │ │ +
162 private:
│ │ │ │ +
163 const ElementGeometryImpl &elementGeometry_;
│ │ │ │ +
164 HostLocalGeometry hostLocalGeometry_;
│ │ │ │ +
165 };
│ │ │ │
│ │ │ │ -
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 typename ReferenceElements< ctype, dimension >::ReferenceElement RefElement;
│ │ │ │ +
166
│ │ │ │ +
167
│ │ │ │
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
│ │ │ │ +
169 // CornerStorage
│ │ │ │ +
170 // -------------
│ │ │ │ +
171
│ │ │ │ +
172 template< int mydim, int cdim, class Grid >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
174 {
│ │ │ │ +
175 typedef typename std::remove_const< Grid >::type::Traits Traits;
│ │ │ │ +
176
│ │ │ │ +
177 typedef typename Traits::ctype ctype;
│ │ │ │ +
178 typedef FieldVector< ctype, cdim > Coordinate;
│ │ │ │ +
179
│ │ │ │ +
180 typedef std::array< Coordinate, (1 << mydim) > Coords;
│ │ │ │ +
181
│ │ │ │ +
182 public:
│ │ │ │ +
183 typedef typename Coords::const_iterator const_iterator;
│ │ │ │
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;
│ │ │ │ +
185 template< bool fake >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
187 {
│ │ │ │ +
188 coords.calculate( coords_ );
│ │ │ │ +
189 }
│ │ │ │ +
│ │ │ │ +
190
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
192 {
│ │ │ │ +
193 coords.calculate( coords_ );
│ │ │ │ +
194 }
│ │ │ │ +
│ │ │ │ +
195
│ │ │ │ +
│ │ │ │ +
196 const Coordinate &operator[] ( unsigned int i ) const
│ │ │ │ +
197 {
│ │ │ │ +
198 return coords_[ i ];
│ │ │ │ +
199 }
│ │ │ │ +
│ │ │ │
200
│ │ │ │ -
201 static const bool fake = false;
│ │ │ │ -
202
│ │ │ │ -
203 private:
│ │ │ │ - │ │ │ │ -
205
│ │ │ │ -
206 typedef typename HostGridView::template Codim< codim >::template Partition< pitype >::Iterator HostEntityIterator;
│ │ │ │ +
201 const_iterator begin () const { return coords_.begin(); }
│ │ │ │ +
202 const_iterator end () const { return coords_.end(); }
│ │ │ │ +
203
│ │ │ │ +
204 private:
│ │ │ │ +
205 Coords coords_;
│ │ │ │ +
206 };
│ │ │ │ +
│ │ │ │
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.
│ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ -
ReferenceElements< ctype, dimension >::ReferenceElement RefElement
Definition iterator.hh:53
│ │ │ │ -
static bool apply(const RefElement &refElement, const Element &element, int subEntity)
Definition iterator.hh:55
│ │ │ │ -
static bool apply(const RefElement &refElement, const Element &element, int subEntity)
Definition iterator.hh:82
│ │ │ │ -
ReferenceElements< ctype, dimension >::ReferenceElement RefElement
Definition iterator.hh:80
│ │ │ │ -
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
│ │ │ │ -
ReferenceElements< ctype, dimension >::ReferenceElement 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
│ │ │ │ -
ReferenceElements< ctype, dimension >::ReferenceElement 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
│ │ │ │ -
ReferenceElements< ctype, dimension >::ReferenceElement RefElement
Definition iterator.hh:148
│ │ │ │ -
std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element
Definition iterator.hh:147
│ │ │ │ -
ReferenceElements< ctype, dimension >::ReferenceElement 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
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
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
│ │ │ │ +
void calculate(std::array< Coordinate, size >(&corners)) const
Definition cornerstorage.hh:98
│ │ │ │ +
Definition cornerstorage.hh:123
│ │ │ │ +
IntersectionCoordVector(const ElementGeometryImpl &elementGeometry, const HostLocalGeometry &hostLocalGeometry)
Definition cornerstorage.hh:141
│ │ │ │ +
void calculate(Coordinate(&corners)[numCorners]) const
Definition cornerstorage.hh:157
│ │ │ │ +
void calculate(std::array< Coordinate, size >(&corners)) const
Definition cornerstorage.hh:148
│ │ │ │ +
Definition cornerstorage.hh:174
│ │ │ │ +
Coords::const_iterator const_iterator
Definition cornerstorage.hh:183
│ │ │ │ +
const_iterator begin() const
Definition cornerstorage.hh:201
│ │ │ │ +
CornerStorage(const IntersectionCoordVector< Grid > &coords)
Definition cornerstorage.hh:191
│ │ │ │ +
const_iterator end() const
Definition cornerstorage.hh:202
│ │ │ │ +
const Coordinate & operator[](unsigned int i) const
Definition cornerstorage.hh:196
│ │ │ │ +
CornerStorage(const CoordVector< mydim, Grid, fake > &coords)
Definition cornerstorage.hh:186
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,735 +1,286 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ +cornerstorage.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 © 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 │ │ │ │ │ +5#ifndef DUNE_GEOGRID_CORNERSTORAGE_HH │ │ │ │ │ +6#define DUNE_GEOGRID_CORNERSTORAGE_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ +8#include │ │ │ │ │ 9 │ │ │ │ │ -10#include │ │ │ │ │ -11#include │ │ │ │ │ -12 │ │ │ │ │ -13#include │ │ │ │ │ +10#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> │ │ │ │ │ +11 │ │ │ │ │ +12namespace _D_u_n_e │ │ │ │ │ +13{ │ │ │ │ │ 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 { │ │ │ │ │ +15 namespace GeoGrid │ │ │ │ │ +16 { │ │ │ │ │ +17 │ │ │ │ │ +18 // CoordVector │ │ │ │ │ +19 // ----------- │ │ │ │ │ +20 │ │ │ │ │ +21 template< int mydim, class Grid, bool fake > │ │ │ │ │ +_2_2 class _C_o_o_r_d_V_e_c_t_o_r; │ │ │ │ │ +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; │ │ │ │ │ +25 template< int mydim, class Grid > │ │ │ │ │ +_2_6 class _C_o_o_r_d_V_e_c_t_o_r< mydim, _G_r_i_d, false > │ │ │ │ │ +27 { │ │ │ │ │ +28 typedef typename std::remove_const< Grid >::type::Traits Traits; │ │ │ │ │ +29 │ │ │ │ │ +30 typedef typename Traits::ctype ctype; │ │ │ │ │ 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 │ │ │ │ │ +32 static const int dimension = Traits::dimension; │ │ │ │ │ +33 static const int mydimension = mydim; │ │ │ │ │ +34 static const int codimension = dimension - mydimension; │ │ │ │ │ +35 static const int dimensionworld = Traits::dimensionworld; │ │ │ │ │ 36 │ │ │ │ │ -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 │ │ │ │ │ -_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 typename ReferenceElements< ctype, dimension >::ReferenceElement │ │ │ │ │ -_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; │ │ │ │ │ -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 typename ReferenceElements< ctype, dimension >::ReferenceElement │ │ │ │ │ -_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 }; │ │ │ │ │ +37 typedef FieldVector< ctype, dimensionworld > Coordinate; │ │ │ │ │ +38 │ │ │ │ │ +39 typedef typename Traits::HostGrid HostGrid; │ │ │ │ │ +40 typedef typename Traits::CoordFunction CoordFunction; │ │ │ │ │ +41 │ │ │ │ │ +42 typedef typename HostGrid::template Codim< codimension >::Entity HostEntity; │ │ │ │ │ +43 │ │ │ │ │ +44 typedef GeoGrid :: CoordFunctionCaller< HostEntity, typename CoordFunction:: │ │ │ │ │ +Interface > │ │ │ │ │ +45 CoordFunctionCaller; │ │ │ │ │ +46 │ │ │ │ │ +47 public: │ │ │ │ │ +_4_8 _C_o_o_r_d_V_e_c_t_o_r ( const HostEntity &hostEntity, │ │ │ │ │ +49 const CoordFunction &coordFunction ) │ │ │ │ │ +50 : coordFunctionCaller_( hostEntity, coordFunction ) │ │ │ │ │ +51 {} │ │ │ │ │ +52 │ │ │ │ │ +53 template< std::size_t size > │ │ │ │ │ +_5_4 void _c_a_l_c_u_l_a_t_e ( std::array< Coordinate, size > (&corners) ) const │ │ │ │ │ +55 { │ │ │ │ │ +56 const std::size_t numCorners = coordFunctionCaller_.size(); │ │ │ │ │ +57 assert( size >= numCorners ); │ │ │ │ │ +58 for( std::size_t i = 0; i < numCorners; ++i ) │ │ │ │ │ +59 coordFunctionCaller_.evaluate( i, corners[ i ] ); │ │ │ │ │ +60 } │ │ │ │ │ +61 │ │ │ │ │ +62 private: │ │ │ │ │ +63 const _C_o_o_r_d_F_u_n_c_t_i_o_n_C_a_l_l_e_r coordFunctionCaller_; │ │ │ │ │ +64 }; │ │ │ │ │ +65 │ │ │ │ │ +66 │ │ │ │ │ +67 template< int mydim, class Grid > │ │ │ │ │ +_6_8 class _C_o_o_r_d_V_e_c_t_o_r< mydim, _G_r_i_d, true > │ │ │ │ │ +69 { │ │ │ │ │ +70 typedef typename std::remove_const< Grid > :: type :: Traits Traits; │ │ │ │ │ +71 │ │ │ │ │ +72 typedef typename Traits::ctype ctype; │ │ │ │ │ +73 │ │ │ │ │ +74 static const int dimension = Traits::dimension; │ │ │ │ │ +75 static const int mydimension = mydim; │ │ │ │ │ +76 static const int codimension = dimension - mydimension; │ │ │ │ │ +77 static const int dimensionworld = Traits::dimensionworld; │ │ │ │ │ +78 │ │ │ │ │ +79 typedef FieldVector< ctype, dimensionworld > Coordinate; │ │ │ │ │ +80 │ │ │ │ │ +81 typedef typename Traits::HostGrid HostGrid; │ │ │ │ │ +82 typedef typename Traits::CoordFunction CoordFunction; │ │ │ │ │ +83 │ │ │ │ │ +84 typedef typename HostGrid::template Codim< 0 >::Entity HostElement; │ │ │ │ │ +85 │ │ │ │ │ +86 typedef _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_<_ _H_o_s_t_E_l_e_m_e_n_t_,_ _t_y_p_e_n_a_m_e_ _C_o_o_r_d_F_u_n_c_t_i_o_n_:_: │ │ │ │ │ +_I_n_t_e_r_f_a_c_e_ _> │ │ │ │ │ +87 _C_o_o_r_d_F_u_n_c_t_i_o_n_C_a_l_l_e_r; │ │ │ │ │ 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; │ │ │ │ │ +89 public: │ │ │ │ │ +_9_0 _C_o_o_r_d_V_e_c_t_o_r ( const HostElement &hostElement, │ │ │ │ │ +91 const unsigned int subEntity, │ │ │ │ │ +92 const CoordFunction &coordFunction ) │ │ │ │ │ +93 : coordFunctionCaller_( hostElement, coordFunction ), │ │ │ │ │ +94 subEntity_( subEntity ) │ │ │ │ │ +95 {} │ │ │ │ │ 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 typename ReferenceElements< ctype, dimension >::ReferenceElement │ │ │ │ │ -_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 typename ReferenceElements< ctype, dimension >::ReferenceElement │ │ │ │ │ -_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 typename ReferenceElements< ctype, dimension >::ReferenceElement │ │ │ │ │ -_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; │ │ │ │ │ +97 template< std::size_t size > │ │ │ │ │ +_9_8 void _c_a_l_c_u_l_a_t_e ( std::array< Coordinate, size > (&corners) ) const │ │ │ │ │ +99 { │ │ │ │ │ +100 const GeometryType type = coordFunctionCaller_.type(); │ │ │ │ │ +101 auto refElement = referenceElement< ctype, dimension >( type ); │ │ │ │ │ +102 const std::size_t numCorners = refElement.size( subEntity_, codimension, │ │ │ │ │ +dimension ); │ │ │ │ │ +103 assert( size >= numCorners ); │ │ │ │ │ +104 for( std::size_t i = 0; i < numCorners; ++i ) │ │ │ │ │ +105 { │ │ │ │ │ +106 const std::size_t j = refElement.subEntity( subEntity_, codimension, i, │ │ │ │ │ +dimension ); │ │ │ │ │ +107 coordFunctionCaller_.evaluate( j, corners[ i ] ); │ │ │ │ │ +108 } │ │ │ │ │ +109 } │ │ │ │ │ +110 │ │ │ │ │ +111 private: │ │ │ │ │ +112 const _C_o_o_r_d_F_u_n_c_t_i_o_n_C_a_l_l_e_r coordFunctionCaller_; │ │ │ │ │ +113 const unsigned int subEntity_; │ │ │ │ │ +114 }; │ │ │ │ │ +115 │ │ │ │ │ +116 │ │ │ │ │ +117 │ │ │ │ │ +118 // IntersectionCoordVector │ │ │ │ │ +119 // ----------------------- │ │ │ │ │ +120 │ │ │ │ │ +121 template< class Grid > │ │ │ │ │ +_1_2_2 class _I_n_t_e_r_s_e_c_t_i_o_n_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ │ +123 { │ │ │ │ │ +124 typedef typename std::remove_const< Grid >::type::Traits Traits; │ │ │ │ │ +125 │ │ │ │ │ +126 typedef typename Traits::ctype ctype; │ │ │ │ │ +127 │ │ │ │ │ +128 static const int dimension = Traits::dimension; │ │ │ │ │ +129 static const int codimension = 1; │ │ │ │ │ +130 static const int mydimension = dimension-codimension; │ │ │ │ │ +131 static const int dimensionworld = Traits::dimensionworld; │ │ │ │ │ +132 │ │ │ │ │ +133 typedef FieldVector< ctype, dimensionworld > Coordinate; │ │ │ │ │ +134 │ │ │ │ │ +135 typedef typename Traits::HostGrid HostGrid; │ │ │ │ │ +136 │ │ │ │ │ +137 typedef typename Traits::template Codim< 0 >::GeometryImpl │ │ │ │ │ +ElementGeometryImpl; │ │ │ │ │ +138 typedef typename Traits::template Codim< codimension >::LocalGeometry │ │ │ │ │ +HostLocalGeometry; │ │ │ │ │ +139 │ │ │ │ │ +140 public: │ │ │ │ │ +_1_4_1 _I_n_t_e_r_s_e_c_t_i_o_n_C_o_o_r_d_V_e_c_t_o_r ( const ElementGeometryImpl &elementGeometry, │ │ │ │ │ +142 const HostLocalGeometry &hostLocalGeometry ) │ │ │ │ │ +143 : elementGeometry_( elementGeometry ), │ │ │ │ │ +144 hostLocalGeometry_( hostLocalGeometry ) │ │ │ │ │ +145 {} │ │ │ │ │ +146 │ │ │ │ │ +147 template< std::size_t size > │ │ │ │ │ +_1_4_8 void _c_a_l_c_u_l_a_t_e ( std::array< Coordinate, size > (&corners) ) const │ │ │ │ │ +149 { │ │ │ │ │ +150 const std::size_t numCorners = hostLocalGeometry_.corners(); │ │ │ │ │ +151 assert( size >= numCorners ); │ │ │ │ │ +152 for( std::size_t i = 0; i < numCorners; ++i ) │ │ │ │ │ +153 corners[ i ] = elementGeometry_.global( hostLocalGeometry_.corner( i ) ); │ │ │ │ │ 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 typename ReferenceElements< ctype, dimension >::ReferenceElement │ │ │ │ │ -_R_e_f_E_l_e_m_e_n_t; │ │ │ │ │ +155 │ │ │ │ │ +156 template< unsigned int numCorners > │ │ │ │ │ +_1_5_7 void _c_a_l_c_u_l_a_t_e ( Coordinate (&corners)[ numCorners ] ) const │ │ │ │ │ +158 { │ │ │ │ │ +159 assert( numCorners == hostLocalGeometry_.corners() ); │ │ │ │ │ +160 } │ │ │ │ │ +161 │ │ │ │ │ +162 private: │ │ │ │ │ +163 const ElementGeometryImpl &elementGeometry_; │ │ │ │ │ +164 HostLocalGeometry hostLocalGeometry_; │ │ │ │ │ +165 }; │ │ │ │ │ +166 │ │ │ │ │ +167 │ │ │ │ │ 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 ) │ │ │ │ │ +169 // CornerStorage │ │ │ │ │ +170 // ------------- │ │ │ │ │ +171 │ │ │ │ │ +172 template< int mydim, int cdim, class Grid > │ │ │ │ │ +_1_7_3 class _C_o_r_n_e_r_S_t_o_r_a_g_e │ │ │ │ │ 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 │ │ │ │ │ +175 typedef typename std::remove_const< Grid >::type::Traits Traits; │ │ │ │ │ +176 │ │ │ │ │ +177 typedef typename Traits::ctype ctype; │ │ │ │ │ +178 typedef FieldVector< ctype, cdim > Coordinate; │ │ │ │ │ +179 │ │ │ │ │ +180 typedef std::array< Coordinate, (1 << mydim) > Coords; │ │ │ │ │ +181 │ │ │ │ │ +182 public: │ │ │ │ │ +_1_8_3 typedef typename Coords::const_iterator _c_o_n_s_t___i_t_e_r_a_t_o_r; │ │ │ │ │ 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; │ │ │ │ │ +185 template< bool fake > │ │ │ │ │ +_1_8_6 explicit _C_o_r_n_e_r_S_t_o_r_a_g_e ( const _C_o_o_r_d_V_e_c_t_o_r_<_ _m_y_d_i_m_,_ _G_r_i_d_,_ _f_a_k_e_ _> &coords ) │ │ │ │ │ +187 { │ │ │ │ │ +188 coords.calculate( coords_ ); │ │ │ │ │ +189 } │ │ │ │ │ +190 │ │ │ │ │ +_1_9_1 explicit _C_o_r_n_e_r_S_t_o_r_a_g_e ( const _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_ _> &coords ) │ │ │ │ │ +192 { │ │ │ │ │ +193 coords._c_a_l_c_u_l_a_t_e( coords_ ); │ │ │ │ │ +194 } │ │ │ │ │ +195 │ │ │ │ │ +_1_9_6 const Coordinate &_o_p_e_r_a_t_o_r_[_]_ ( unsigned int i ) const │ │ │ │ │ +197 { │ │ │ │ │ +198 return coords_[ i ]; │ │ │ │ │ +199 } │ │ │ │ │ 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; │ │ │ │ │ +_2_0_1 _c_o_n_s_t___i_t_e_r_a_t_o_r _b_e_g_i_n () const { return coords_.begin(); } │ │ │ │ │ +_2_0_2 _c_o_n_s_t___i_t_e_r_a_t_o_r _e_n_d () const { return coords_.end(); } │ │ │ │ │ +203 │ │ │ │ │ +204 private: │ │ │ │ │ +205 Coords coords_; │ │ │ │ │ +206 }; │ │ │ │ │ 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. │ │ │ │ │ +208 } // namespace GeoGrid │ │ │ │ │ +209 │ │ │ │ │ +210} // namespace Dune │ │ │ │ │ +211 │ │ │ │ │ +212#endif // #ifndef DUNE_GEOGRID_CORNERSTORAGE_HH │ │ │ │ │ +_c_o_o_r_d_f_u_n_c_t_i_o_n_c_a_l_l_e_r_._h_h │ │ │ │ │ _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_ _>_:_: │ │ │ │ │ -_R_e_f_E_l_e_m_e_n_t │ │ │ │ │ -ReferenceElements< ctype, dimension >::ReferenceElement 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___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_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 │ │ │ │ │ -_>_:_:_R_e_f_E_l_e_m_e_n_t │ │ │ │ │ -ReferenceElements< ctype, dimension >::ReferenceElement 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 │ │ │ │ │ -_>_:_:_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 │ │ │ │ │ -ReferenceElements< ctype, dimension >::ReferenceElement 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 │ │ │ │ │ -ReferenceElements< ctype, dimension >::ReferenceElement 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 │ │ │ │ │ -ReferenceElements< ctype, dimension >::ReferenceElement 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 │ │ │ │ │ -ReferenceElements< ctype, dimension >::ReferenceElement 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_:_:_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_:_:_G_e_o_G_r_i_d_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ │ +DDeeffiinniittiioonn cornerstorage.hh:22 │ │ │ │ │ +_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_ _>_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ │ +CoordVector(const HostEntity &hostEntity, const CoordFunction &coordFunction) │ │ │ │ │ +DDeeffiinniittiioonn cornerstorage.hh:48 │ │ │ │ │ +_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_ _>_:_:_c_a_l_c_u_l_a_t_e │ │ │ │ │ +void calculate(std::array< Coordinate, size >(&corners)) const │ │ │ │ │ +DDeeffiinniittiioonn cornerstorage.hh:54 │ │ │ │ │ +_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_ _>_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ │ +CoordVector(const HostElement &hostElement, const unsigned int subEntity, const │ │ │ │ │ +CoordFunction &coordFunction) │ │ │ │ │ +DDeeffiinniittiioonn cornerstorage.hh:90 │ │ │ │ │ +_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_ _>_:_:_c_a_l_c_u_l_a_t_e │ │ │ │ │ +void calculate(std::array< Coordinate, size >(&corners)) const │ │ │ │ │ +DDeeffiinniittiioonn cornerstorage.hh:98 │ │ │ │ │ +_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 │ │ │ │ │ +DDeeffiinniittiioonn cornerstorage.hh:123 │ │ │ │ │ +_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_:_:_I_n_t_e_r_s_e_c_t_i_o_n_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ │ +IntersectionCoordVector(const ElementGeometryImpl &elementGeometry, const │ │ │ │ │ +HostLocalGeometry &hostLocalGeometry) │ │ │ │ │ +DDeeffiinniittiioonn cornerstorage.hh:141 │ │ │ │ │ +_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_:_:_c_a_l_c_u_l_a_t_e │ │ │ │ │ +void calculate(Coordinate(&corners)[numCorners]) const │ │ │ │ │ +DDeeffiinniittiioonn cornerstorage.hh:157 │ │ │ │ │ +_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_:_:_c_a_l_c_u_l_a_t_e │ │ │ │ │ +void calculate(std::array< Coordinate, size >(&corners)) const │ │ │ │ │ +DDeeffiinniittiioonn cornerstorage.hh:148 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_C_o_r_n_e_r_S_t_o_r_a_g_e │ │ │ │ │ +DDeeffiinniittiioonn cornerstorage.hh:174 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_C_o_r_n_e_r_S_t_o_r_a_g_e_:_:_c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ │ +Coords::const_iterator const_iterator │ │ │ │ │ +DDeeffiinniittiioonn cornerstorage.hh:183 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_C_o_r_n_e_r_S_t_o_r_a_g_e_:_:_b_e_g_i_n │ │ │ │ │ +const_iterator begin() const │ │ │ │ │ +DDeeffiinniittiioonn cornerstorage.hh:201 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_C_o_r_n_e_r_S_t_o_r_a_g_e_:_:_C_o_r_n_e_r_S_t_o_r_a_g_e │ │ │ │ │ +CornerStorage(const IntersectionCoordVector< Grid > &coords) │ │ │ │ │ +DDeeffiinniittiioonn cornerstorage.hh:191 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_C_o_r_n_e_r_S_t_o_r_a_g_e_:_:_e_n_d │ │ │ │ │ +const_iterator end() const │ │ │ │ │ +DDeeffiinniittiioonn cornerstorage.hh:202 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_C_o_r_n_e_r_S_t_o_r_a_g_e_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ +const Coordinate & operator[](unsigned int i) const │ │ │ │ │ +DDeeffiinniittiioonn cornerstorage.hh:196 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_C_o_r_n_e_r_S_t_o_r_a_g_e_:_:_C_o_r_n_e_r_S_t_o_r_a_g_e │ │ │ │ │ +CornerStorage(const CoordVector< mydim, Grid, fake > &coords) │ │ │ │ │ +DDeeffiinniittiioonn cornerstorage.hh:186 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00584.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/a00584_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 © 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.10 │ │ │ │ │ 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 © 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/a00587.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: cornerstorage.hh File Reference │ │ │ │ +dune-grid: idset.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,31 +72,24 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
cornerstorage.hh File Reference
│ │ │ │ +
idset.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <array>
│ │ │ │ -#include <dune/grid/geometrygrid/coordfunctioncaller.hh>
│ │ │ │ +
#include <dune/grid/common/indexidset.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::GeoGrid::CoordVector< mydim, Grid, false >
 
class  Dune::GeoGrid::CoordVector< mydim, Grid, true >
 
class  Dune::GeoGrid::IntersectionCoordVector< Grid >
 
class  Dune::GeoGrid::CornerStorage< mydim, cdim, Grid >
class  Dune::GeoGrid::IdSet< Grid, HostIdSet >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,26 +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 │ │ │ │ │ -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> │ │ │ │ │ +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_:_:_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_:_:_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_:_:_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_ _> │ │ │ │ │ +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/a00587_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: cornerstorage.hh Source File │ │ │ │ +dune-grid: idset.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,277 +74,132 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
cornerstorage.hh
│ │ │ │ +
idset.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │ +
5#ifndef DUNE_GEOGRID_IDSET_HH
│ │ │ │ +
6#define DUNE_GEOGRID_IDSET_HH
│ │ │ │
7
│ │ │ │ -
8#include <array>
│ │ │ │ + │ │ │ │
9
│ │ │ │ - │ │ │ │ -
11
│ │ │ │ -
12namespace Dune
│ │ │ │ -
13{
│ │ │ │ -
14
│ │ │ │ -
15 namespace GeoGrid
│ │ │ │ -
16 {
│ │ │ │ -
17
│ │ │ │ -
18 // CoordVector
│ │ │ │ -
19 // -----------
│ │ │ │ -
20
│ │ │ │ -
21 template< int mydim, class Grid, bool fake >
│ │ │ │ - │ │ │ │ -
23
│ │ │ │ -
24
│ │ │ │ -
25 template< int mydim, class Grid >
│ │ │ │ -
│ │ │ │ -
26 class CoordVector< mydim, Grid, false >
│ │ │ │ -
27 {
│ │ │ │ -
28 typedef typename std::remove_const< Grid >::type::Traits Traits;
│ │ │ │ -
29
│ │ │ │ -
30 typedef typename Traits::ctype ctype;
│ │ │ │ -
31
│ │ │ │ -
32 static const int dimension = Traits::dimension;
│ │ │ │ -
33 static const int mydimension = mydim;
│ │ │ │ -
34 static const int codimension = dimension - mydimension;
│ │ │ │ -
35 static const int dimensionworld = Traits::dimensionworld;
│ │ │ │ +
10namespace Dune
│ │ │ │ +
11{
│ │ │ │ +
12
│ │ │ │ +
13 namespace GeoGrid
│ │ │ │ +
14 {
│ │ │ │ +
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 typedef FieldVector< ctype, dimensionworld > Coordinate;
│ │ │ │ -
38
│ │ │ │ -
39 typedef typename Traits::HostGrid HostGrid;
│ │ │ │ -
40 typedef typename Traits::CoordFunction CoordFunction;
│ │ │ │ -
41
│ │ │ │ -
42 typedef typename HostGrid::template Codim< codimension >::Entity HostEntity;
│ │ │ │ -
43
│ │ │ │ -
44 typedef GeoGrid :: CoordFunctionCaller< HostEntity, typename CoordFunction::Interface >
│ │ │ │ -
45 CoordFunctionCaller;
│ │ │ │ -
46
│ │ │ │ -
47 public:
│ │ │ │ -
│ │ │ │ -
48 CoordVector ( const HostEntity &hostEntity,
│ │ │ │ -
49 const CoordFunction &coordFunction )
│ │ │ │ -
50 : coordFunctionCaller_( hostEntity, coordFunction )
│ │ │ │ -
51 {}
│ │ │ │ -
│ │ │ │ -
52
│ │ │ │ -
53 template< std::size_t size >
│ │ │ │ -
│ │ │ │ -
54 void calculate ( std::array< Coordinate, size > (&corners) ) const
│ │ │ │ -
55 {
│ │ │ │ -
56 const std::size_t numCorners = coordFunctionCaller_.size();
│ │ │ │ -
57 assert( size >= numCorners );
│ │ │ │ -
58 for( std::size_t i = 0; i < numCorners; ++i )
│ │ │ │ -
59 coordFunctionCaller_.evaluate( i, corners[ i ] );
│ │ │ │ -
60 }
│ │ │ │ -
│ │ │ │ -
61
│ │ │ │ -
62 private:
│ │ │ │ -
63 const CoordFunctionCaller coordFunctionCaller_;
│ │ │ │ -
64 };
│ │ │ │ -
│ │ │ │ -
65
│ │ │ │ -
66
│ │ │ │ -
67 template< int mydim, class Grid >
│ │ │ │ -
│ │ │ │ -
68 class CoordVector< mydim, Grid, true >
│ │ │ │ -
69 {
│ │ │ │ -
70 typedef typename std::remove_const< Grid > :: type :: Traits Traits;
│ │ │ │ -
71
│ │ │ │ -
72 typedef typename Traits::ctype ctype;
│ │ │ │ -
73
│ │ │ │ -
74 static const int dimension = Traits::dimension;
│ │ │ │ -
75 static const int mydimension = mydim;
│ │ │ │ -
76 static const int codimension = dimension - mydimension;
│ │ │ │ -
77 static const int dimensionworld = Traits::dimensionworld;
│ │ │ │ -
78
│ │ │ │ -
79 typedef FieldVector< ctype, dimensionworld > Coordinate;
│ │ │ │ -
80
│ │ │ │ -
81 typedef typename Traits::HostGrid HostGrid;
│ │ │ │ -
82 typedef typename Traits::CoordFunction CoordFunction;
│ │ │ │ +
│ │ │ │ +
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 typedef typename HostGrid::template Codim< 0 >::Entity HostElement;
│ │ │ │ -
85
│ │ │ │ - │ │ │ │ - │ │ │ │ -
88
│ │ │ │ -
89 public:
│ │ │ │ -
│ │ │ │ -
90 CoordVector ( const HostElement &hostElement,
│ │ │ │ -
91 const unsigned int subEntity,
│ │ │ │ -
92 const CoordFunction &coordFunction )
│ │ │ │ -
93 : coordFunctionCaller_( hostElement, coordFunction ),
│ │ │ │ -
94 subEntity_( subEntity )
│ │ │ │ -
95 {}
│ │ │ │ -
│ │ │ │ -
96
│ │ │ │ -
97 template< std::size_t size >
│ │ │ │ -
│ │ │ │ -
98 void calculate ( std::array< Coordinate, size > (&corners) ) const
│ │ │ │ -
99 {
│ │ │ │ -
100 const GeometryType type = coordFunctionCaller_.type();
│ │ │ │ -
101 auto refElement = referenceElement< ctype, dimension >( type );
│ │ │ │ -
102 const std::size_t numCorners = refElement.size( subEntity_, codimension, dimension );
│ │ │ │ -
103 assert( size >= numCorners );
│ │ │ │ -
104 for( std::size_t i = 0; i < numCorners; ++i )
│ │ │ │ -
105 {
│ │ │ │ -
106 const std::size_t j = refElement.subEntity( subEntity_, codimension, i, dimension );
│ │ │ │ -
107 coordFunctionCaller_.evaluate( j, corners[ i ] );
│ │ │ │ -
108 }
│ │ │ │ -
109 }
│ │ │ │ -
│ │ │ │ -
110
│ │ │ │ -
111 private:
│ │ │ │ -
112 const CoordFunctionCaller coordFunctionCaller_;
│ │ │ │ -
113 const unsigned int subEntity_;
│ │ │ │ -
114 };
│ │ │ │ -
│ │ │ │ -
115
│ │ │ │ -
116
│ │ │ │ -
117
│ │ │ │ -
118 // IntersectionCoordVector
│ │ │ │ -
119 // -----------------------
│ │ │ │ -
120
│ │ │ │ -
121 template< class Grid >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
123 {
│ │ │ │ -
124 typedef typename std::remove_const< Grid >::type::Traits Traits;
│ │ │ │ -
125
│ │ │ │ -
126 typedef typename Traits::ctype ctype;
│ │ │ │ -
127
│ │ │ │ -
128 static const int dimension = Traits::dimension;
│ │ │ │ -
129 static const int codimension = 1;
│ │ │ │ -
130 static const int mydimension = dimension-codimension;
│ │ │ │ -
131 static const int dimensionworld = Traits::dimensionworld;
│ │ │ │ -
132
│ │ │ │ -
133 typedef FieldVector< ctype, dimensionworld > Coordinate;
│ │ │ │ -
134
│ │ │ │ -
135 typedef typename Traits::HostGrid HostGrid;
│ │ │ │ -
136
│ │ │ │ -
137 typedef typename Traits::template Codim< 0 >::GeometryImpl ElementGeometryImpl;
│ │ │ │ -
138 typedef typename Traits::template Codim< codimension >::LocalGeometry HostLocalGeometry;
│ │ │ │ -
139
│ │ │ │ -
140 public:
│ │ │ │ -
│ │ │ │ -
141 IntersectionCoordVector ( const ElementGeometryImpl &elementGeometry,
│ │ │ │ -
142 const HostLocalGeometry &hostLocalGeometry )
│ │ │ │ -
143 : elementGeometry_( elementGeometry ),
│ │ │ │ -
144 hostLocalGeometry_( hostLocalGeometry )
│ │ │ │ -
145 {}
│ │ │ │ -
│ │ │ │ -
146
│ │ │ │ -
147 template< std::size_t size >
│ │ │ │ -
│ │ │ │ -
148 void calculate ( std::array< Coordinate, size > (&corners) ) const
│ │ │ │ -
149 {
│ │ │ │ -
150 const std::size_t numCorners = hostLocalGeometry_.corners();
│ │ │ │ -
151 assert( size >= numCorners );
│ │ │ │ -
152 for( std::size_t i = 0; i < numCorners; ++i )
│ │ │ │ -
153 corners[ i ] = elementGeometry_.global( hostLocalGeometry_.corner( i ) );
│ │ │ │ -
154 }
│ │ │ │ -
│ │ │ │ -
155
│ │ │ │ -
156 template< unsigned int numCorners >
│ │ │ │ -
│ │ │ │ -
157 void calculate ( Coordinate (&corners)[ numCorners ] ) const
│ │ │ │ -
158 {
│ │ │ │ -
159 assert( numCorners == hostLocalGeometry_.corners() );
│ │ │ │ -
160 }
│ │ │ │ -
│ │ │ │ -
161
│ │ │ │ -
162 private:
│ │ │ │ -
163 const ElementGeometryImpl &elementGeometry_;
│ │ │ │ -
164 HostLocalGeometry hostLocalGeometry_;
│ │ │ │ -
165 };
│ │ │ │ -
│ │ │ │ -
166
│ │ │ │ -
167
│ │ │ │ -
168
│ │ │ │ -
169 // CornerStorage
│ │ │ │ -
170 // -------------
│ │ │ │ -
171
│ │ │ │ -
172 template< int mydim, int cdim, class Grid >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
174 {
│ │ │ │ -
175 typedef typename std::remove_const< Grid >::type::Traits Traits;
│ │ │ │ -
176
│ │ │ │ -
177 typedef typename Traits::ctype ctype;
│ │ │ │ -
178 typedef FieldVector< ctype, cdim > Coordinate;
│ │ │ │ -
179
│ │ │ │ -
180 typedef std::array< Coordinate, (1 << mydim) > Coords;
│ │ │ │ -
181
│ │ │ │ -
182 public:
│ │ │ │ -
183 typedef typename Coords::const_iterator const_iterator;
│ │ │ │ -
184
│ │ │ │ -
185 template< bool fake >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
187 {
│ │ │ │ -
188 coords.calculate( coords_ );
│ │ │ │ -
189 }
│ │ │ │ -
│ │ │ │ -
190
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
192 {
│ │ │ │ -
193 coords.calculate( coords_ );
│ │ │ │ -
194 }
│ │ │ │ -
│ │ │ │ -
195
│ │ │ │ -
│ │ │ │ -
196 const Coordinate &operator[] ( unsigned int i ) const
│ │ │ │ -
197 {
│ │ │ │ -
198 return coords_[ i ];
│ │ │ │ -
199 }
│ │ │ │ -
│ │ │ │ -
200
│ │ │ │ -
201 const_iterator begin () const { return coords_.begin(); }
│ │ │ │ -
202 const_iterator end () const { return coords_.end(); }
│ │ │ │ -
203
│ │ │ │ -
204 private:
│ │ │ │ -
205 Coords coords_;
│ │ │ │ -
206 };
│ │ │ │ -
│ │ │ │ -
207
│ │ │ │ -
208 } // namespace GeoGrid
│ │ │ │ -
209
│ │ │ │ -
210} // namespace Dune
│ │ │ │ -
211
│ │ │ │ -
212#endif // #ifndef DUNE_GEOGRID_CORNERSTORAGE_HH
│ │ │ │ - │ │ │ │ +
84#endif // #ifndef DUNE_GEOGRID_IDSET_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
│ │ │ │ -
void calculate(std::array< Coordinate, size >(&corners)) const
Definition cornerstorage.hh:98
│ │ │ │ -
Definition cornerstorage.hh:123
│ │ │ │ -
IntersectionCoordVector(const ElementGeometryImpl &elementGeometry, const HostLocalGeometry &hostLocalGeometry)
Definition cornerstorage.hh:141
│ │ │ │ -
void calculate(Coordinate(&corners)[numCorners]) const
Definition cornerstorage.hh:157
│ │ │ │ -
void calculate(std::array< Coordinate, size >(&corners)) const
Definition cornerstorage.hh:148
│ │ │ │ -
Definition cornerstorage.hh:174
│ │ │ │ -
Coords::const_iterator const_iterator
Definition cornerstorage.hh:183
│ │ │ │ -
const_iterator begin() const
Definition cornerstorage.hh:201
│ │ │ │ -
CornerStorage(const IntersectionCoordVector< Grid > &coords)
Definition cornerstorage.hh:191
│ │ │ │ -
const_iterator end() const
Definition cornerstorage.hh:202
│ │ │ │ -
const Coordinate & operator[](unsigned int i) const
Definition cornerstorage.hh:196
│ │ │ │ -
CornerStorage(const CoordVector< mydim, Grid, fake > &coords)
Definition cornerstorage.hh:186
│ │ │ │ +
Id Set Interface.
Definition common/indexidset.hh:447
│ │ │ │ +
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 common/indexidset.hh:481
│ │ │ │ +
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
│ │ │ │ +
Provides base classes for index and id sets.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,286 +1,146 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _g_e_o_m_e_t_r_y_g_r_i_d │ │ │ │ │ -cornerstorage.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 © 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 │ │ │ │ │ +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 <_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> │ │ │ │ │ -11 │ │ │ │ │ -12namespace _D_u_n_e │ │ │ │ │ -13{ │ │ │ │ │ -14 │ │ │ │ │ -15 namespace GeoGrid │ │ │ │ │ -16 { │ │ │ │ │ -17 │ │ │ │ │ -18 // CoordVector │ │ │ │ │ -19 // ----------- │ │ │ │ │ -20 │ │ │ │ │ -21 template< int mydim, class Grid, bool fake > │ │ │ │ │ -_2_2 class _C_o_o_r_d_V_e_c_t_o_r; │ │ │ │ │ -23 │ │ │ │ │ -24 │ │ │ │ │ -25 template< int mydim, class Grid > │ │ │ │ │ -_2_6 class _C_o_o_r_d_V_e_c_t_o_r< mydim, _G_r_i_d, false > │ │ │ │ │ -27 { │ │ │ │ │ -28 typedef typename std::remove_const< Grid >::type::Traits Traits; │ │ │ │ │ -29 │ │ │ │ │ -30 typedef typename Traits::ctype ctype; │ │ │ │ │ -31 │ │ │ │ │ -32 static const int dimension = Traits::dimension; │ │ │ │ │ -33 static const int mydimension = mydim; │ │ │ │ │ -34 static const int codimension = dimension - mydimension; │ │ │ │ │ -35 static const int dimensionworld = Traits::dimensionworld; │ │ │ │ │ +10namespace _D_u_n_e │ │ │ │ │ +11{ │ │ │ │ │ +12 │ │ │ │ │ +13 namespace GeoGrid │ │ │ │ │ +14 { │ │ │ │ │ +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 │ │ │ │ │ -37 typedef FieldVector< ctype, dimensionworld > Coordinate; │ │ │ │ │ -38 │ │ │ │ │ -39 typedef typename Traits::HostGrid HostGrid; │ │ │ │ │ -40 typedef typename Traits::CoordFunction CoordFunction; │ │ │ │ │ -41 │ │ │ │ │ -42 typedef typename HostGrid::template Codim< codimension >::Entity HostEntity; │ │ │ │ │ -43 │ │ │ │ │ -44 typedef GeoGrid :: CoordFunctionCaller< HostEntity, typename CoordFunction:: │ │ │ │ │ -Interface > │ │ │ │ │ -45 CoordFunctionCaller; │ │ │ │ │ -46 │ │ │ │ │ -47 public: │ │ │ │ │ -_4_8 _C_o_o_r_d_V_e_c_t_o_r ( const HostEntity &hostEntity, │ │ │ │ │ -49 const CoordFunction &coordFunction ) │ │ │ │ │ -50 : coordFunctionCaller_( hostEntity, coordFunction ) │ │ │ │ │ -51 {} │ │ │ │ │ -52 │ │ │ │ │ -53 template< std::size_t size > │ │ │ │ │ -_5_4 void _c_a_l_c_u_l_a_t_e ( std::array< Coordinate, size > (&corners) ) const │ │ │ │ │ -55 { │ │ │ │ │ -56 const std::size_t numCorners = coordFunctionCaller_.size(); │ │ │ │ │ -57 assert( size >= numCorners ); │ │ │ │ │ -58 for( std::size_t i = 0; i < numCorners; ++i ) │ │ │ │ │ -59 coordFunctionCaller_.evaluate( i, corners[ i ] ); │ │ │ │ │ -60 } │ │ │ │ │ -61 │ │ │ │ │ -62 private: │ │ │ │ │ -63 const _C_o_o_r_d_F_u_n_c_t_i_o_n_C_a_l_l_e_r coordFunctionCaller_; │ │ │ │ │ -64 }; │ │ │ │ │ -65 │ │ │ │ │ -66 │ │ │ │ │ -67 template< int mydim, class Grid > │ │ │ │ │ -_6_8 class _C_o_o_r_d_V_e_c_t_o_r< mydim, _G_r_i_d, true > │ │ │ │ │ -69 { │ │ │ │ │ -70 typedef typename std::remove_const< Grid > :: type :: Traits Traits; │ │ │ │ │ -71 │ │ │ │ │ -72 typedef typename Traits::ctype ctype; │ │ │ │ │ -73 │ │ │ │ │ -74 static const int dimension = Traits::dimension; │ │ │ │ │ -75 static const int mydimension = mydim; │ │ │ │ │ -76 static const int codimension = dimension - mydimension; │ │ │ │ │ -77 static const int dimensionworld = Traits::dimensionworld; │ │ │ │ │ -78 │ │ │ │ │ -79 typedef FieldVector< ctype, dimensionworld > Coordinate; │ │ │ │ │ -80 │ │ │ │ │ -81 typedef typename Traits::HostGrid HostGrid; │ │ │ │ │ -82 typedef typename Traits::CoordFunction CoordFunction; │ │ │ │ │ +_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 typedef typename HostGrid::template Codim< 0 >::Entity HostElement; │ │ │ │ │ -85 │ │ │ │ │ -86 typedef _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_<_ _H_o_s_t_E_l_e_m_e_n_t_,_ _t_y_p_e_n_a_m_e_ _C_o_o_r_d_F_u_n_c_t_i_o_n_:_: │ │ │ │ │ -_I_n_t_e_r_f_a_c_e_ _> │ │ │ │ │ -87 _C_o_o_r_d_F_u_n_c_t_i_o_n_C_a_l_l_e_r; │ │ │ │ │ -88 │ │ │ │ │ -89 public: │ │ │ │ │ -_9_0 _C_o_o_r_d_V_e_c_t_o_r ( const HostElement &hostElement, │ │ │ │ │ -91 const unsigned int subEntity, │ │ │ │ │ -92 const CoordFunction &coordFunction ) │ │ │ │ │ -93 : coordFunctionCaller_( hostElement, coordFunction ), │ │ │ │ │ -94 subEntity_( subEntity ) │ │ │ │ │ -95 {} │ │ │ │ │ -96 │ │ │ │ │ -97 template< std::size_t size > │ │ │ │ │ -_9_8 void _c_a_l_c_u_l_a_t_e ( std::array< Coordinate, size > (&corners) ) const │ │ │ │ │ -99 { │ │ │ │ │ -100 const GeometryType type = coordFunctionCaller_.type(); │ │ │ │ │ -101 auto refElement = referenceElement< ctype, dimension >( type ); │ │ │ │ │ -102 const std::size_t numCorners = refElement.size( subEntity_, codimension, │ │ │ │ │ -dimension ); │ │ │ │ │ -103 assert( size >= numCorners ); │ │ │ │ │ -104 for( std::size_t i = 0; i < numCorners; ++i ) │ │ │ │ │ -105 { │ │ │ │ │ -106 const std::size_t j = refElement.subEntity( subEntity_, codimension, i, │ │ │ │ │ -dimension ); │ │ │ │ │ -107 coordFunctionCaller_.evaluate( j, corners[ i ] ); │ │ │ │ │ -108 } │ │ │ │ │ -109 } │ │ │ │ │ -110 │ │ │ │ │ -111 private: │ │ │ │ │ -112 const _C_o_o_r_d_F_u_n_c_t_i_o_n_C_a_l_l_e_r coordFunctionCaller_; │ │ │ │ │ -113 const unsigned int subEntity_; │ │ │ │ │ -114 }; │ │ │ │ │ -115 │ │ │ │ │ -116 │ │ │ │ │ -117 │ │ │ │ │ -118 // IntersectionCoordVector │ │ │ │ │ -119 // ----------------------- │ │ │ │ │ -120 │ │ │ │ │ -121 template< class Grid > │ │ │ │ │ -_1_2_2 class _I_n_t_e_r_s_e_c_t_i_o_n_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ │ -123 { │ │ │ │ │ -124 typedef typename std::remove_const< Grid >::type::Traits Traits; │ │ │ │ │ -125 │ │ │ │ │ -126 typedef typename Traits::ctype ctype; │ │ │ │ │ -127 │ │ │ │ │ -128 static const int dimension = Traits::dimension; │ │ │ │ │ -129 static const int codimension = 1; │ │ │ │ │ -130 static const int mydimension = dimension-codimension; │ │ │ │ │ -131 static const int dimensionworld = Traits::dimensionworld; │ │ │ │ │ -132 │ │ │ │ │ -133 typedef FieldVector< ctype, dimensionworld > Coordinate; │ │ │ │ │ -134 │ │ │ │ │ -135 typedef typename Traits::HostGrid HostGrid; │ │ │ │ │ -136 │ │ │ │ │ -137 typedef typename Traits::template Codim< 0 >::GeometryImpl │ │ │ │ │ -ElementGeometryImpl; │ │ │ │ │ -138 typedef typename Traits::template Codim< codimension >::LocalGeometry │ │ │ │ │ -HostLocalGeometry; │ │ │ │ │ -139 │ │ │ │ │ -140 public: │ │ │ │ │ -_1_4_1 _I_n_t_e_r_s_e_c_t_i_o_n_C_o_o_r_d_V_e_c_t_o_r ( const ElementGeometryImpl &elementGeometry, │ │ │ │ │ -142 const HostLocalGeometry &hostLocalGeometry ) │ │ │ │ │ -143 : elementGeometry_( elementGeometry ), │ │ │ │ │ -144 hostLocalGeometry_( hostLocalGeometry ) │ │ │ │ │ -145 {} │ │ │ │ │ -146 │ │ │ │ │ -147 template< std::size_t size > │ │ │ │ │ -_1_4_8 void _c_a_l_c_u_l_a_t_e ( std::array< Coordinate, size > (&corners) ) const │ │ │ │ │ -149 { │ │ │ │ │ -150 const std::size_t numCorners = hostLocalGeometry_.corners(); │ │ │ │ │ -151 assert( size >= numCorners ); │ │ │ │ │ -152 for( std::size_t i = 0; i < numCorners; ++i ) │ │ │ │ │ -153 corners[ i ] = elementGeometry_.global( hostLocalGeometry_.corner( i ) ); │ │ │ │ │ -154 } │ │ │ │ │ -155 │ │ │ │ │ -156 template< unsigned int numCorners > │ │ │ │ │ -_1_5_7 void _c_a_l_c_u_l_a_t_e ( Coordinate (&corners)[ numCorners ] ) const │ │ │ │ │ -158 { │ │ │ │ │ -159 assert( numCorners == hostLocalGeometry_.corners() ); │ │ │ │ │ -160 } │ │ │ │ │ -161 │ │ │ │ │ -162 private: │ │ │ │ │ -163 const ElementGeometryImpl &elementGeometry_; │ │ │ │ │ -164 HostLocalGeometry hostLocalGeometry_; │ │ │ │ │ -165 }; │ │ │ │ │ -166 │ │ │ │ │ -167 │ │ │ │ │ -168 │ │ │ │ │ -169 // CornerStorage │ │ │ │ │ -170 // ------------- │ │ │ │ │ -171 │ │ │ │ │ -172 template< int mydim, int cdim, class Grid > │ │ │ │ │ -_1_7_3 class _C_o_r_n_e_r_S_t_o_r_a_g_e │ │ │ │ │ -174 { │ │ │ │ │ -175 typedef typename std::remove_const< Grid >::type::Traits Traits; │ │ │ │ │ -176 │ │ │ │ │ -177 typedef typename Traits::ctype ctype; │ │ │ │ │ -178 typedef FieldVector< ctype, cdim > Coordinate; │ │ │ │ │ -179 │ │ │ │ │ -180 typedef std::array< Coordinate, (1 << mydim) > Coords; │ │ │ │ │ -181 │ │ │ │ │ -182 public: │ │ │ │ │ -_1_8_3 typedef typename Coords::const_iterator _c_o_n_s_t___i_t_e_r_a_t_o_r; │ │ │ │ │ -184 │ │ │ │ │ -185 template< bool fake > │ │ │ │ │ -_1_8_6 explicit _C_o_r_n_e_r_S_t_o_r_a_g_e ( const _C_o_o_r_d_V_e_c_t_o_r_<_ _m_y_d_i_m_,_ _G_r_i_d_,_ _f_a_k_e_ _> &coords ) │ │ │ │ │ -187 { │ │ │ │ │ -188 coords.calculate( coords_ ); │ │ │ │ │ -189 } │ │ │ │ │ -190 │ │ │ │ │ -_1_9_1 explicit _C_o_r_n_e_r_S_t_o_r_a_g_e ( const _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_ _> &coords ) │ │ │ │ │ -192 { │ │ │ │ │ -193 coords._c_a_l_c_u_l_a_t_e( coords_ ); │ │ │ │ │ -194 } │ │ │ │ │ -195 │ │ │ │ │ -_1_9_6 const Coordinate &_o_p_e_r_a_t_o_r_[_]_ ( unsigned int i ) const │ │ │ │ │ -197 { │ │ │ │ │ -198 return coords_[ i ]; │ │ │ │ │ -199 } │ │ │ │ │ -200 │ │ │ │ │ -_2_0_1 _c_o_n_s_t___i_t_e_r_a_t_o_r _b_e_g_i_n () const { return coords_.begin(); } │ │ │ │ │ -_2_0_2 _c_o_n_s_t___i_t_e_r_a_t_o_r _e_n_d () const { return coords_.end(); } │ │ │ │ │ -203 │ │ │ │ │ -204 private: │ │ │ │ │ -205 Coords coords_; │ │ │ │ │ -206 }; │ │ │ │ │ -207 │ │ │ │ │ -208 } // namespace GeoGrid │ │ │ │ │ -209 │ │ │ │ │ -210} // namespace Dune │ │ │ │ │ -211 │ │ │ │ │ -212#endif // #ifndef DUNE_GEOGRID_CORNERSTORAGE_HH │ │ │ │ │ -_c_o_o_r_d_f_u_n_c_t_i_o_n_c_a_l_l_e_r_._h_h │ │ │ │ │ +84#endif // #ifndef DUNE_GEOGRID_IDSET_HH │ │ │ │ │ _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_:_:_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_:_:_G_e_o_G_r_i_d_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ │ -DDeeffiinniittiioonn cornerstorage.hh:22 │ │ │ │ │ -_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_ _>_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ │ -CoordVector(const HostEntity &hostEntity, const CoordFunction &coordFunction) │ │ │ │ │ -DDeeffiinniittiioonn cornerstorage.hh:48 │ │ │ │ │ -_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_ _>_:_:_c_a_l_c_u_l_a_t_e │ │ │ │ │ -void calculate(std::array< Coordinate, size >(&corners)) const │ │ │ │ │ -DDeeffiinniittiioonn cornerstorage.hh:54 │ │ │ │ │ -_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_ _>_:_:_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ │ -CoordVector(const HostElement &hostElement, const unsigned int subEntity, const │ │ │ │ │ -CoordFunction &coordFunction) │ │ │ │ │ -DDeeffiinniittiioonn cornerstorage.hh:90 │ │ │ │ │ -_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_ _>_:_:_c_a_l_c_u_l_a_t_e │ │ │ │ │ -void calculate(std::array< Coordinate, size >(&corners)) const │ │ │ │ │ -DDeeffiinniittiioonn cornerstorage.hh:98 │ │ │ │ │ -_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 │ │ │ │ │ -DDeeffiinniittiioonn cornerstorage.hh:123 │ │ │ │ │ -_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_:_:_I_n_t_e_r_s_e_c_t_i_o_n_C_o_o_r_d_V_e_c_t_o_r │ │ │ │ │ -IntersectionCoordVector(const ElementGeometryImpl &elementGeometry, const │ │ │ │ │ -HostLocalGeometry &hostLocalGeometry) │ │ │ │ │ -DDeeffiinniittiioonn cornerstorage.hh:141 │ │ │ │ │ -_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_:_:_c_a_l_c_u_l_a_t_e │ │ │ │ │ -void calculate(Coordinate(&corners)[numCorners]) const │ │ │ │ │ -DDeeffiinniittiioonn cornerstorage.hh:157 │ │ │ │ │ -_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_:_:_c_a_l_c_u_l_a_t_e │ │ │ │ │ -void calculate(std::array< Coordinate, size >(&corners)) const │ │ │ │ │ -DDeeffiinniittiioonn cornerstorage.hh:148 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_C_o_r_n_e_r_S_t_o_r_a_g_e │ │ │ │ │ -DDeeffiinniittiioonn cornerstorage.hh:174 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_C_o_r_n_e_r_S_t_o_r_a_g_e_:_:_c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ │ -Coords::const_iterator const_iterator │ │ │ │ │ -DDeeffiinniittiioonn cornerstorage.hh:183 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_C_o_r_n_e_r_S_t_o_r_a_g_e_:_:_b_e_g_i_n │ │ │ │ │ -const_iterator begin() const │ │ │ │ │ -DDeeffiinniittiioonn cornerstorage.hh:201 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_C_o_r_n_e_r_S_t_o_r_a_g_e_:_:_C_o_r_n_e_r_S_t_o_r_a_g_e │ │ │ │ │ -CornerStorage(const IntersectionCoordVector< Grid > &coords) │ │ │ │ │ -DDeeffiinniittiioonn cornerstorage.hh:191 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_C_o_r_n_e_r_S_t_o_r_a_g_e_:_:_e_n_d │ │ │ │ │ -const_iterator end() const │ │ │ │ │ -DDeeffiinniittiioonn cornerstorage.hh:202 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_C_o_r_n_e_r_S_t_o_r_a_g_e_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ -const Coordinate & operator[](unsigned int i) const │ │ │ │ │ -DDeeffiinniittiioonn cornerstorage.hh:196 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_C_o_r_n_e_r_S_t_o_r_a_g_e_:_:_C_o_r_n_e_r_S_t_o_r_a_g_e │ │ │ │ │ -CornerStorage(const CoordVector< mydim, Grid, fake > &coords) │ │ │ │ │ -DDeeffiinniittiioonn cornerstorage.hh:186 │ │ │ │ │ +_D_u_n_e_:_:_I_d_S_e_t │ │ │ │ │ +Id Set Interface. │ │ │ │ │ +DDeeffiinniittiioonn common/indexidset.hh:447 │ │ │ │ │ +_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 common/indexidset.hh:481 │ │ │ │ │ +_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 │ │ │ │ │ +_i_n_d_e_x_i_d_s_e_t_._h_h │ │ │ │ │ +Provides base classes for index and id sets. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00599.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: idset.hh File Reference │ │ │ │ +dune-grid: cachedcoordfunction.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,24 +72,32 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
idset.hh File Reference
│ │ │ │ +
cachedcoordfunction.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/grid/common/indexidset.hh>
│ │ │ │ +
#include <cassert>
│ │ │ │ +#include <memory>
│ │ │ │ +#include <dune/common/typetraits.hh>
│ │ │ │ +#include <dune/grid/common/gridenums.hh>
│ │ │ │ +#include <dune/grid/geometrygrid/capabilities.hh>
│ │ │ │ +#include <dune/grid/geometrygrid/coordfunctioncaller.hh>
│ │ │ │ +#include <dune/grid/utility/persistentcontainer.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Namespaces

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

│ │ │ │ Classes

class  Dune::GeoGrid::IdSet< Grid, HostIdSet >
class  Dune::GeoGrid::CoordCache< HostGrid, Coordinate >
 
class  Dune::CachedCoordFunction< HostGrid, CoordFunction >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,19 +2,27 @@ │ │ │ │ │ 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> │ │ │ │ │ +cachedcoordfunction.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_/_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_/_c_o_o_r_d_f_u_n_c_t_i_o_n_c_a_l_l_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_._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_:_:_I_d_S_e_t_<_ _G_r_i_d_,_ _H_o_s_t_I_d_S_e_t_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_C_o_o_r_d_C_a_c_h_e_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_i_n_a_t_e_ _> │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_C_a_c_h_e_d_C_o_o_r_d_F_u_n_c_t_i_o_n_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_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 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00599_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: idset.hh Source File │ │ │ │ +dune-grid: cachedcoordfunction.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,132 +74,270 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
idset.hh
│ │ │ │ +
cachedcoordfunction.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_CACHEDCOORDFUNCTION_HH
│ │ │ │ +
6#define DUNE_GEOGRID_CACHEDCOORDFUNCTION_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ -
9
│ │ │ │ -
10namespace Dune
│ │ │ │ -
11{
│ │ │ │ +
8#include <cassert>
│ │ │ │ +
9#include <memory>
│ │ │ │ +
10
│ │ │ │ +
11#include <dune/common/typetraits.hh>
│ │ │ │
12
│ │ │ │ -
13 namespace GeoGrid
│ │ │ │ -
14 {
│ │ │ │ -
15
│ │ │ │ -
16 // IdSet
│ │ │ │ -
17 // -----
│ │ │ │ + │ │ │ │ +
14
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
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;
│ │ │ │ +
19namespace Dune
│ │ │ │ +
20{
│ │ │ │ +
21
│ │ │ │ +
22 // Internal Forward Declarations
│ │ │ │ +
23 // -----------------------------
│ │ │ │ +
24
│ │ │ │ +
25 template< class HostGrid, class CoordFunction >
│ │ │ │ +
26 class CachedCoordFunction;
│ │ │ │
27
│ │ │ │ -
28 public:
│ │ │ │ -
29 typedef typename HostIdSet::IdType IdType;
│ │ │ │ -
30
│ │ │ │ -
31 using Base::subId;
│ │ │ │ +
28
│ │ │ │ +
29
│ │ │ │ +
30 // GeoGrid::CoordCache
│ │ │ │ +
31 // -------------------
│ │ │ │
32
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
34 : hostIdSet_( 0 )
│ │ │ │ -
35 {}
│ │ │ │ -
│ │ │ │ -
36
│ │ │ │ -
│ │ │ │ -
37 explicit IdSet ( const HostIdSet &hostIdSet )
│ │ │ │ -
38 : hostIdSet_( &hostIdSet )
│ │ │ │ -
39 {}
│ │ │ │ -
│ │ │ │ +
33 namespace GeoGrid
│ │ │ │ +
34 {
│ │ │ │ +
35
│ │ │ │ +
36 template< class HostGrid, class Coordinate >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
38 {
│ │ │ │ + │ │ │ │
40
│ │ │ │ -
│ │ │ │ -
41 IdSet ( const This &other )
│ │ │ │ -
42 : hostIdSet_( other.hostIdSet_ )
│ │ │ │ -
43 {}
│ │ │ │ -
│ │ │ │ +
41 static const unsigned int dimension = HostGrid::dimension;
│ │ │ │ +
42
│ │ │ │ +
43 typedef typename HostGrid::template Codim< dimension >::Entity Vertex;
│ │ │ │
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 }
│ │ │ │ + │ │ │ │ +
46
│ │ │ │ +
47 public:
│ │ │ │ +
│ │ │ │ +
48 explicit CoordCache ( const HostGrid &hostGrid )
│ │ │ │ +
49 : data_( hostGrid, dimension )
│ │ │ │ +
50 {}
│ │ │ │ +
│ │ │ │ +
51
│ │ │ │ +
52 template< class Entity >
│ │ │ │ +
│ │ │ │ +
53 const Coordinate &operator() ( const Entity &entity, unsigned int corner ) const
│ │ │ │ +
54 {
│ │ │ │ +
55 return data_( entity, corner );
│ │ │ │ +
56 }
│ │ │ │
│ │ │ │ -
56
│ │ │ │ -
57 template< class Entity >
│ │ │ │ +
57
│ │ │ │
│ │ │ │ -
58 IdType id ( const Entity &entity ) const
│ │ │ │ +
58 const Coordinate &operator() ( const Vertex &vertex, unsigned int corner ) 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 }
│ │ │ │ +
60 assert( corner == 0 );
│ │ │ │ +
61 return data_[ vertex ];
│ │ │ │ +
62 }
│ │ │ │ +
│ │ │ │ +
63
│ │ │ │ +
64 template< class Entity >
│ │ │ │ +
│ │ │ │ +
65 Coordinate &operator() ( const Entity &entity, unsigned int corner )
│ │ │ │ +
66 {
│ │ │ │ +
67 return data_( entity,corner) ;
│ │ │ │ +
68 }
│ │ │ │
│ │ │ │ -
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 };
│ │ │ │ +
│ │ │ │ +
70 Coordinate &operator() ( const Vertex &vertex, unsigned int corner )
│ │ │ │ +
71 {
│ │ │ │ +
72 assert( corner == 0 );
│ │ │ │ +
73 return data_[ vertex ];
│ │ │ │ +
74 }
│ │ │ │ +
│ │ │ │ +
75
│ │ │ │ +
│ │ │ │ +
76 void adapt ()
│ │ │ │ +
77 {
│ │ │ │ +
78 data_.resize();
│ │ │ │ +
79 data_.shrinkToFit();
│ │ │ │ +
80 }
│ │ │ │
│ │ │ │ -
79
│ │ │ │ -
80 } // namespace GeoGrid
│ │ │ │
81
│ │ │ │ -
82} // namespace Dune
│ │ │ │ -
83
│ │ │ │ -
84#endif // #ifndef DUNE_GEOGRID_IDSET_HH
│ │ │ │ +
82 private:
│ │ │ │ +
83 CoordCache ( const This & );
│ │ │ │ +
84 This &operator= ( const This & );
│ │ │ │ +
85
│ │ │ │ +
86 DataCache data_;
│ │ │ │ +
87 };
│ │ │ │ +
│ │ │ │ +
88
│ │ │ │ +
89 } // namespace GeoGrid
│ │ │ │ +
90
│ │ │ │ +
91
│ │ │ │ +
92
│ │ │ │ +
93 // CachedCoordFunction
│ │ │ │ +
94 // -------------------
│ │ │ │ +
95
│ │ │ │ +
96 template< class HostGrid, class CoordFunction >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
98 : public DiscreteCoordFunction< typename CoordFunction::ctype, CoordFunction::dimRange, CachedCoordFunction< HostGrid, CoordFunction > >
│ │ │ │ +
99 {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
102
│ │ │ │ +
103 public:
│ │ │ │ +
104 typedef typename Base::ctype ctype;
│ │ │ │ +
105
│ │ │ │ + │ │ │ │ +
107
│ │ │ │ +
108 private:
│ │ │ │ + │ │ │ │ +
110
│ │ │ │ +
111 public:
│ │ │ │ +
112 explicit
│ │ │ │ +
│ │ │ │ +
113 CachedCoordFunction ( const HostGrid &hostGrid,
│ │ │ │ +
114 const CoordFunction &coordFunction = CoordFunction() )
│ │ │ │ +
115 : hostGrid_( hostGrid ),
│ │ │ │ +
116 coordFunction_( coordFunction ),
│ │ │ │ +
117 cache_( hostGrid )
│ │ │ │ +
118 {
│ │ │ │ +
119 buildCache();
│ │ │ │ +
120 }
│ │ │ │ +
│ │ │ │ +
121
│ │ │ │ +
│ │ │ │ +
122 void adapt ()
│ │ │ │ +
123 {
│ │ │ │ +
124 cache_.adapt();
│ │ │ │ +
125 buildCache();
│ │ │ │ +
126 }
│ │ │ │ +
│ │ │ │ +
127
│ │ │ │ +
128 void buildCache ();
│ │ │ │ +
129
│ │ │ │ +
130 template< class HostEntity >
│ │ │ │ +
131 void insertEntity ( const HostEntity &hostEntity );
│ │ │ │ +
132
│ │ │ │ +
133 template< class HostEntity >
│ │ │ │ +
│ │ │ │ +
134 void evaluate ( const HostEntity &hostEntity, unsigned int corner, RangeVector &y ) const
│ │ │ │ +
135 {
│ │ │ │ +
136 y = cache_( hostEntity, corner );
│ │ │ │ +
137#ifndef NDEBUG
│ │ │ │ + │ │ │ │ +
139 CoordFunctionCaller;
│ │ │ │ +
140
│ │ │ │ +
141 RangeVector z;
│ │ │ │ +
142 CoordFunctionCaller coordFunctionCaller( hostEntity, coordFunction_ );
│ │ │ │ +
143 coordFunctionCaller.evaluate( corner, z );
│ │ │ │ +
144 assert( ((y - z).two_norm() < 1e-6) );
│ │ │ │ +
145#endif
│ │ │ │ +
146 }
│ │ │ │ +
│ │ │ │ +
147
│ │ │ │ +
148 private:
│ │ │ │ +
149 const HostGrid &hostGrid_;
│ │ │ │ +
150 const CoordFunction &coordFunction_;
│ │ │ │ +
151 Cache cache_;
│ │ │ │ +
152 };
│ │ │ │ +
│ │ │ │ +
153
│ │ │ │ +
154
│ │ │ │ +
155
│ │ │ │ +
156 // Implementation of CachedCoordFunction
│ │ │ │ +
157 // -------------------------------------
│ │ │ │ +
158
│ │ │ │ +
159 template< class HostGrid, class CoordFunction >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
161 {
│ │ │ │ +
162 typedef typename HostGrid::template Codim< 0 >::Entity Element;
│ │ │ │ +
163 typedef typename HostGrid::LevelGridView MacroView;
│ │ │ │ +
164 typedef typename HostGrid::HierarchicIterator HierarchicIterator;
│ │ │ │ +
165
│ │ │ │ +
166 typedef typename MacroView::template Codim< 0 >::template Partition< All_Partition >::Iterator MacroIterator;
│ │ │ │ +
167
│ │ │ │ +
168 const MacroView macroView = hostGrid_.levelGridView( 0 );
│ │ │ │ +
169 const int maxLevel = hostGrid_.maxLevel();
│ │ │ │ +
170
│ │ │ │ +
171 const MacroIterator mend = macroView.template end< 0, All_Partition >();
│ │ │ │ +
172 for( MacroIterator mit = macroView.template begin< 0, All_Partition >(); mit != mend; ++mit )
│ │ │ │ +
173 {
│ │ │ │ +
174 const Element &macroElement = *mit;
│ │ │ │ +
175 insertEntity( macroElement );
│ │ │ │ +
176
│ │ │ │ +
177 const HierarchicIterator hend = macroElement.hend( maxLevel );
│ │ │ │ +
178 for( HierarchicIterator hit = macroElement.hbegin( maxLevel ); hit != hend; ++hit )
│ │ │ │ +
179 insertEntity( *hit );
│ │ │ │ +
180 }
│ │ │ │ +
181 }
│ │ │ │ +
│ │ │ │ +
182
│ │ │ │ +
183
│ │ │ │ +
184 template< class HostGrid, class CoordFunction >
│ │ │ │ +
185 template< class HostEntity >
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
187 ::insertEntity ( const HostEntity &hostEntity )
│ │ │ │ +
188 {
│ │ │ │ + │ │ │ │ +
190 CoordFunctionCaller;
│ │ │ │ +
191
│ │ │ │ +
192 CoordFunctionCaller coordFunctionCaller( hostEntity, coordFunction_ );
│ │ │ │ +
193 auto refElement = referenceElement< ctype, HostEntity::dimension >( hostEntity.type() );
│ │ │ │ +
194
│ │ │ │ +
195 const unsigned int numCorners = refElement.size( HostEntity::dimension );
│ │ │ │ +
196 for( unsigned int i = 0; i < numCorners; ++i )
│ │ │ │ +
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
│ │ │ │ -
Id Set Interface.
Definition common/indexidset.hh:447
│ │ │ │ -
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 common/indexidset.hh:481
│ │ │ │ -
A Traits struct that collects all associated types of one implementation.
Definition common/grid.hh:411
│ │ │ │ +
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
│ │ │ │ +
void buildCache()
Definition cachedcoordfunction.hh:160
│ │ │ │ +
void insertEntity(const HostEntity &hostEntity)
Definition cachedcoordfunction.hh:187
│ │ │ │ +
Definition cachedcoordfunction.hh:38
│ │ │ │ +
void adapt()
Definition cachedcoordfunction.hh:76
│ │ │ │ +
CoordCache(const HostGrid &hostGrid)
Definition cachedcoordfunction.hh:48
│ │ │ │ +
const Coordinate & operator()(const Entity &entity, unsigned int corner) const
Definition cachedcoordfunction.hh:53
│ │ │ │ +
Derive an implementation of a discrete coordinate function from this class.
Definition coordfunction.hh:248
│ │ │ │ +
Base::RangeVector RangeVector
Definition coordfunction.hh:253
│ │ │ │ +
ct ctype
field type of the coordinate vector
Definition coordfunction.hh:185
│ │ │ │ +
Definition coordfunctioncaller.hh:21
│ │ │ │
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
│ │ │ │ -
Provides base classes for index and id sets.
│ │ │ │ + │ │ │ │ +
void resize(const Value &value=Value())
Definition persistentcontainermap.hh:87
│ │ │ │ +
void shrinkToFit()
Definition persistentcontainermap.hh:93
│ │ │ │ + │ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,146 +1,290 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ +cachedcoordfunction.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 © 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_CACHEDCOORDFUNCTION_HH │ │ │ │ │ +6#define DUNE_GEOGRID_CACHEDCOORDFUNCTION_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{ │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10 │ │ │ │ │ +11#include │ │ │ │ │ 12 │ │ │ │ │ -13 namespace GeoGrid │ │ │ │ │ -14 { │ │ │ │ │ -15 │ │ │ │ │ -16 // IdSet │ │ │ │ │ -17 // ----- │ │ │ │ │ +13#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> │ │ │ │ │ +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_/_c_o_o_r_d_f_u_n_c_t_i_o_n_c_a_l_l_e_r_._h_h> │ │ │ │ │ +17#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> │ │ │ │ │ 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; │ │ │ │ │ +19namespace _D_u_n_e │ │ │ │ │ +20{ │ │ │ │ │ +21 │ │ │ │ │ +22 // Internal Forward Declarations │ │ │ │ │ +23 // ----------------------------- │ │ │ │ │ +24 │ │ │ │ │ +25 template< class HostGrid, class CoordFunction > │ │ │ │ │ +26 class CachedCoordFunction; │ │ │ │ │ 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; │ │ │ │ │ +28 │ │ │ │ │ +29 │ │ │ │ │ +30 // GeoGrid::CoordCache │ │ │ │ │ +31 // ------------------- │ │ │ │ │ 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 {} │ │ │ │ │ +33 namespace GeoGrid │ │ │ │ │ +34 { │ │ │ │ │ +35 │ │ │ │ │ +36 template< class HostGrid, class Coordinate > │ │ │ │ │ +_3_7 class _C_o_o_r_d_C_a_c_h_e │ │ │ │ │ +38 { │ │ │ │ │ +39 typedef _C_o_o_r_d_C_a_c_h_e_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_i_n_a_t_e_ _> _T_h_i_s; │ │ │ │ │ 40 │ │ │ │ │ -_4_1 _I_d_S_e_t ( const _T_h_i_s &other ) │ │ │ │ │ -42 : hostIdSet_( other.hostIdSet_ ) │ │ │ │ │ -43 {} │ │ │ │ │ +41 static const unsigned int dimension = HostGrid::dimension; │ │ │ │ │ +42 │ │ │ │ │ +43 typedef typename HostGrid::template Codim< dimension >::Entity Vertex; │ │ │ │ │ 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 ) │ │ │ │ │ +45 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_,_ _C_o_o_r_d_i_n_a_t_e_ _> _D_a_t_a_C_a_c_h_e; │ │ │ │ │ +46 │ │ │ │ │ +47 public: │ │ │ │ │ +_4_8 explicit _C_o_o_r_d_C_a_c_h_e ( const HostGrid &hostGrid ) │ │ │ │ │ +49 : data_( hostGrid, dimension ) │ │ │ │ │ +50 {} │ │ │ │ │ +51 │ │ │ │ │ +52 template< class Entity > │ │ │ │ │ +_5_3 const Coordinate &_o_p_e_r_a_t_o_r_(_)_ ( const _E_n_t_i_t_y &entity, unsigned int corner ) │ │ │ │ │ +const │ │ │ │ │ +54 { │ │ │ │ │ +55 return data_( entity, corner ); │ │ │ │ │ +56 } │ │ │ │ │ +57 │ │ │ │ │ +_5_8 const Coordinate &_o_p_e_r_a_t_o_r_(_)_ ( const Vertex &vertex, unsigned int corner ) │ │ │ │ │ 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_ ); } │ │ │ │ │ +60 assert( corner == 0 ); │ │ │ │ │ +61 return data_[ vertex ]; │ │ │ │ │ +62 } │ │ │ │ │ +63 │ │ │ │ │ +64 template< class Entity > │ │ │ │ │ +_6_5 Coordinate &_o_p_e_r_a_t_o_r_(_)_ ( const _E_n_t_i_t_y &entity, unsigned int corner ) │ │ │ │ │ +66 { │ │ │ │ │ +67 return data_( entity,corner) ; │ │ │ │ │ +68 } │ │ │ │ │ 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 │ │ │ │ │ +_7_0 Coordinate &_o_p_e_r_a_t_o_r_(_)_ ( const Vertex &vertex, unsigned int corner ) │ │ │ │ │ +71 { │ │ │ │ │ +72 assert( corner == 0 ); │ │ │ │ │ +73 return data_[ vertex ]; │ │ │ │ │ +74 } │ │ │ │ │ +75 │ │ │ │ │ +_7_6 void _a_d_a_p_t () │ │ │ │ │ +77 { │ │ │ │ │ +78 data_._r_e_s_i_z_e(); │ │ │ │ │ +79 data_._s_h_r_i_n_k_T_o_F_i_t(); │ │ │ │ │ +80 } │ │ │ │ │ 81 │ │ │ │ │ -82} // namespace Dune │ │ │ │ │ -83 │ │ │ │ │ -84#endif // #ifndef DUNE_GEOGRID_IDSET_HH │ │ │ │ │ +82 private: │ │ │ │ │ +83 _C_o_o_r_d_C_a_c_h_e ( const This & ); │ │ │ │ │ +84 This &operator= ( const This & ); │ │ │ │ │ +85 │ │ │ │ │ +86 DataCache data_; │ │ │ │ │ +87 }; │ │ │ │ │ +88 │ │ │ │ │ +89 } // namespace GeoGrid │ │ │ │ │ +90 │ │ │ │ │ +91 │ │ │ │ │ +92 │ │ │ │ │ +93 // CachedCoordFunction │ │ │ │ │ +94 // ------------------- │ │ │ │ │ +95 │ │ │ │ │ +96 template< class HostGrid, class CoordFunction > │ │ │ │ │ +_9_7 class _C_a_c_h_e_d_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ +98 : public _D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n< typename CoordFunction::ctype, │ │ │ │ │ +CoordFunction::dimRange, CachedCoordFunction< HostGrid, CoordFunction > > │ │ │ │ │ +99 { │ │ │ │ │ +100 typedef _C_a_c_h_e_d_C_o_o_r_d_F_u_n_c_t_i_o_n_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_ _> _T_h_i_s; │ │ │ │ │ +101 typedef _D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_<_ _t_y_p_e_n_a_m_e_ _C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_c_t_y_p_e_, │ │ │ │ │ +_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_d_i_m_R_a_n_g_e_,_ _T_h_i_s_ _> _B_a_s_e; │ │ │ │ │ +102 │ │ │ │ │ +103 public: │ │ │ │ │ +_1_0_4 typedef typename _B_a_s_e_:_:_c_t_y_p_e _c_t_y_p_e; │ │ │ │ │ +105 │ │ │ │ │ +_1_0_6 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; │ │ │ │ │ +107 │ │ │ │ │ +108 private: │ │ │ │ │ +109 typedef _G_e_o_G_r_i_d_:_:_C_o_o_r_d_C_a_c_h_e_<_ _H_o_s_t_G_r_i_d_,_ _R_a_n_g_e_V_e_c_t_o_r_ _> _C_a_c_h_e; │ │ │ │ │ +110 │ │ │ │ │ +111 public: │ │ │ │ │ +112 explicit │ │ │ │ │ +_1_1_3 _C_a_c_h_e_d_C_o_o_r_d_F_u_n_c_t_i_o_n ( const HostGrid &hostGrid, │ │ │ │ │ +114 const CoordFunction &coordFunction = CoordFunction() ) │ │ │ │ │ +115 : hostGrid_( hostGrid ), │ │ │ │ │ +116 coordFunction_( coordFunction ), │ │ │ │ │ +117 cache_( hostGrid ) │ │ │ │ │ +118 { │ │ │ │ │ +119 _b_u_i_l_d_C_a_c_h_e(); │ │ │ │ │ +120 } │ │ │ │ │ +121 │ │ │ │ │ +_1_2_2 void _a_d_a_p_t () │ │ │ │ │ +123 { │ │ │ │ │ +124 cache_._a_d_a_p_t(); │ │ │ │ │ +125 _b_u_i_l_d_C_a_c_h_e(); │ │ │ │ │ +126 } │ │ │ │ │ +127 │ │ │ │ │ +128 void _b_u_i_l_d_C_a_c_h_e (); │ │ │ │ │ +129 │ │ │ │ │ +130 template< class HostEntity > │ │ │ │ │ +131 void _i_n_s_e_r_t_E_n_t_i_t_y ( const HostEntity &hostEntity ); │ │ │ │ │ +132 │ │ │ │ │ +133 template< class HostEntity > │ │ │ │ │ +_1_3_4 void _e_v_a_l_u_a_t_e ( const HostEntity &hostEntity, unsigned int corner, │ │ │ │ │ +_R_a_n_g_e_V_e_c_t_o_r &y ) const │ │ │ │ │ +135 { │ │ │ │ │ +136 y = cache_( hostEntity, corner ); │ │ │ │ │ +137#ifndef NDEBUG │ │ │ │ │ +138 typedef _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_<_ _H_o_s_t_E_n_t_i_t_y_,_ _t_y_p_e_n_a_m_e_ _C_o_o_r_d_F_u_n_c_t_i_o_n_:_: │ │ │ │ │ +_I_n_t_e_r_f_a_c_e_ _> │ │ │ │ │ +139 CoordFunctionCaller; │ │ │ │ │ +140 │ │ │ │ │ +141 _R_a_n_g_e_V_e_c_t_o_r z; │ │ │ │ │ +142 CoordFunctionCaller coordFunctionCaller( hostEntity, coordFunction_ ); │ │ │ │ │ +143 coordFunctionCaller.evaluate( corner, z ); │ │ │ │ │ +144 assert( ((y - z).two_norm() < 1e-6) ); │ │ │ │ │ +145#endif │ │ │ │ │ +146 } │ │ │ │ │ +147 │ │ │ │ │ +148 private: │ │ │ │ │ +149 const HostGrid &hostGrid_; │ │ │ │ │ +150 const CoordFunction &coordFunction_; │ │ │ │ │ +151 Cache cache_; │ │ │ │ │ +152 }; │ │ │ │ │ +153 │ │ │ │ │ +154 │ │ │ │ │ +155 │ │ │ │ │ +156 // Implementation of CachedCoordFunction │ │ │ │ │ +157 // ------------------------------------- │ │ │ │ │ +158 │ │ │ │ │ +159 template< class HostGrid, class CoordFunction > │ │ │ │ │ +_1_6_0 inline void _C_a_c_h_e_d_C_o_o_r_d_F_u_n_c_t_i_o_n_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_ _>_:_:_b_u_i_l_d_C_a_c_h_e () │ │ │ │ │ +161 { │ │ │ │ │ +162 typedef typename HostGrid::template Codim< 0 >::Entity Element; │ │ │ │ │ +163 typedef typename HostGrid::LevelGridView MacroView; │ │ │ │ │ +164 typedef typename HostGrid::HierarchicIterator HierarchicIterator; │ │ │ │ │ +165 │ │ │ │ │ +166 typedef typename MacroView::template Codim< 0 >::template Partition< │ │ │ │ │ +All_Partition >::Iterator MacroIterator; │ │ │ │ │ +167 │ │ │ │ │ +168 const MacroView macroView = hostGrid_.levelGridView( 0 ); │ │ │ │ │ +169 const int maxLevel = hostGrid_.maxLevel(); │ │ │ │ │ +170 │ │ │ │ │ +171 const MacroIterator mend = macroView.template end< 0, All_Partition >(); │ │ │ │ │ +172 for( MacroIterator mit = macroView.template begin< 0, All_Partition >(); │ │ │ │ │ +mit != mend; ++mit ) │ │ │ │ │ +173 { │ │ │ │ │ +174 const Element ¯oElement = *mit; │ │ │ │ │ +175 insertEntity( macroElement ); │ │ │ │ │ +176 │ │ │ │ │ +177 const HierarchicIterator hend = macroElement.hend( maxLevel ); │ │ │ │ │ +178 for( HierarchicIterator hit = macroElement.hbegin( maxLevel ); hit != hend; │ │ │ │ │ +++hit ) │ │ │ │ │ +179 insertEntity( *hit ); │ │ │ │ │ +180 } │ │ │ │ │ +181 } │ │ │ │ │ +182 │ │ │ │ │ +183 │ │ │ │ │ +184 template< class HostGrid, class CoordFunction > │ │ │ │ │ +185 template< class HostEntity > │ │ │ │ │ +186 inline void _C_a_c_h_e_d_C_o_o_r_d_F_u_n_c_t_i_o_n_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_ _> │ │ │ │ │ +_1_8_7_ _:_:_i_n_s_e_r_t_E_n_t_i_t_y ( const HostEntity &hostEntity ) │ │ │ │ │ +188 { │ │ │ │ │ +189 typedef _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_<_ _H_o_s_t_E_n_t_i_t_y_,_ _t_y_p_e_n_a_m_e_ _C_o_o_r_d_F_u_n_c_t_i_o_n_:_: │ │ │ │ │ +_I_n_t_e_r_f_a_c_e_ _> │ │ │ │ │ +190 CoordFunctionCaller; │ │ │ │ │ +191 │ │ │ │ │ +192 CoordFunctionCaller coordFunctionCaller( hostEntity, coordFunction_ ); │ │ │ │ │ +193 auto refElement = referenceElement< ctype, HostEntity::dimension > │ │ │ │ │ +( hostEntity.type() ); │ │ │ │ │ +194 │ │ │ │ │ +195 const unsigned int numCorners = refElement.size( HostEntity::dimension ); │ │ │ │ │ +196 for( unsigned int i = 0; i < numCorners; ++i ) │ │ │ │ │ +197 coordFunctionCaller.evaluate( i, cache_( hostEntity, i ) ); │ │ │ │ │ +198 } │ │ │ │ │ +199 │ │ │ │ │ +200} // namespace Dune │ │ │ │ │ +201 │ │ │ │ │ +202#endif // #ifndef DUNE_GEOGRID_CACHEDCOORDFUNCTION_HH │ │ │ │ │ +_g_r_i_d_e_n_u_m_s_._h_h │ │ │ │ │ +_c_o_o_r_d_f_u_n_c_t_i_o_n_c_a_l_l_e_r_._h_h │ │ │ │ │ _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 common/indexidset.hh:447 │ │ │ │ │ -_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 common/indexidset.hh:481 │ │ │ │ │ -_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_:_:_C_a_c_h_e_d_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ +DDeeffiinniittiioonn cachedcoordfunction.hh:99 │ │ │ │ │ +_D_u_n_e_:_:_C_a_c_h_e_d_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_a_d_a_p_t │ │ │ │ │ +void adapt() │ │ │ │ │ +DDeeffiinniittiioonn cachedcoordfunction.hh:122 │ │ │ │ │ +_D_u_n_e_:_:_C_a_c_h_e_d_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_C_a_c_h_e_d_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ +CachedCoordFunction(const HostGrid &hostGrid, const CoordFunction │ │ │ │ │ +&coordFunction=CoordFunction()) │ │ │ │ │ +DDeeffiinniittiioonn cachedcoordfunction.hh:113 │ │ │ │ │ +_D_u_n_e_:_:_C_a_c_h_e_d_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ +void evaluate(const HostEntity &hostEntity, unsigned int corner, RangeVector │ │ │ │ │ +&y) const │ │ │ │ │ +DDeeffiinniittiioonn cachedcoordfunction.hh:134 │ │ │ │ │ +_D_u_n_e_:_:_C_a_c_h_e_d_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_c_t_y_p_e │ │ │ │ │ +Base::ctype ctype │ │ │ │ │ +DDeeffiinniittiioonn cachedcoordfunction.hh:104 │ │ │ │ │ +_D_u_n_e_:_:_C_a_c_h_e_d_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 cachedcoordfunction.hh:106 │ │ │ │ │ +_D_u_n_e_:_:_C_a_c_h_e_d_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_b_u_i_l_d_C_a_c_h_e │ │ │ │ │ +void buildCache() │ │ │ │ │ +DDeeffiinniittiioonn cachedcoordfunction.hh:160 │ │ │ │ │ +_D_u_n_e_:_:_C_a_c_h_e_d_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_i_n_s_e_r_t_E_n_t_i_t_y │ │ │ │ │ +void insertEntity(const HostEntity &hostEntity) │ │ │ │ │ +DDeeffiinniittiioonn cachedcoordfunction.hh:187 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_C_o_o_r_d_C_a_c_h_e │ │ │ │ │ +DDeeffiinniittiioonn cachedcoordfunction.hh:38 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_C_o_o_r_d_C_a_c_h_e_:_:_a_d_a_p_t │ │ │ │ │ +void adapt() │ │ │ │ │ +DDeeffiinniittiioonn cachedcoordfunction.hh:76 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_C_o_o_r_d_C_a_c_h_e_:_:_C_o_o_r_d_C_a_c_h_e │ │ │ │ │ +CoordCache(const HostGrid &hostGrid) │ │ │ │ │ +DDeeffiinniittiioonn cachedcoordfunction.hh:48 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_C_o_o_r_d_C_a_c_h_e_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ │ +const Coordinate & operator()(const Entity &entity, unsigned int corner) const │ │ │ │ │ +DDeeffiinniittiioonn cachedcoordfunction.hh:53 │ │ │ │ │ +_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_:_:_R_a_n_g_e_V_e_c_t_o_r │ │ │ │ │ +Base::RangeVector RangeVector │ │ │ │ │ +DDeeffiinniittiioonn coordfunction.hh:253 │ │ │ │ │ +_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_:_:_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_:_:_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 │ │ │ │ │ -_i_n_d_e_x_i_d_s_e_t_._h_h │ │ │ │ │ -Provides base classes for index and id sets. │ │ │ │ │ +_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_,_ _C_o_o_r_d_i_n_a_t_e_ _> │ │ │ │ │ +_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_:_:_s_h_r_i_n_k_T_o_F_i_t │ │ │ │ │ +void shrinkToFit() │ │ │ │ │ +DDeeffiinniittiioonn persistentcontainermap.hh:93 │ │ │ │ │ +_c_a_p_a_b_i_l_i_t_i_e_s_._h_h │ │ │ │ │ +_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/a00623.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: indexsets.cc File Reference │ │ │ │ +dune-grid: agrid.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,27 +70,96 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -Namespaces
│ │ │ │ -
indexsets.cc File Reference
│ │ │ │ +Classes | │ │ │ │ +Namespaces | │ │ │ │ +Macros
│ │ │ │ +
agrid.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/grid/albertagrid/indexsets.hh>
│ │ │ │ -#include <dune/grid/albertagrid/agrid.hh>
│ │ │ │ -

│ │ │ │ Namespaces

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

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::AlbertaGrid< dim, dimworld >
 [ provides Dune::Grid ] More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ │ Namespaces

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

│ │ │ │ +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,17 +1,66 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ -indexsets.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_d_e_x_s_e_t_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_a_g_r_i_d_._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_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. │ │ │ │ │   │ │ │ │ │ +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/a00626.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: meshpointer.cc File Reference │ │ │ │ +dune-grid: macroelement.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,20 +70,28 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ +Classes | │ │ │ │ Namespaces
│ │ │ │ -
meshpointer.cc File Reference
│ │ │ │ +
macroelement.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/grid/albertagrid/meshpointer.hh>
│ │ │ │ -
│ │ │ │ +
#include <dune/grid/albertagrid/misc.hh>
│ │ │ │ +
│ │ │ │ +

Go to the source code of this file.

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

│ │ │ │ +Classes

struct  Dune::Alberta::MacroElement< dim >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,17 +1,21 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 <_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 │ │ │ │ │ +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 │ │ │ │ │ +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 │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00629.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: albertareader.hh File Reference │ │ │ │ +dune-grid: meshpointer.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,35 +72,47 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
albertareader.hh File Reference
│ │ │ │ +
meshpointer.hh 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>
│ │ │ │ + │ │ │ │ +

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.

│ │ │ │

│ │ │ │ Namespaces

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

│ │ │ │ Classes

class  Dune::AlbertaReader< Grid >
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 {} │ │ │ │ │ @@ -2,22 +2,33 @@ │ │ │ │ │ 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> │ │ │ │ │ +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_R_e_a_d_e_r_<_ _G_r_i_d_ _> │ │ │ │ │ +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/a00629_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: albertareader.hh Source File │ │ │ │ +dune-grid: meshpointer.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,134 +74,623 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
albertareader.hh
│ │ │ │ +
meshpointer.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_ALBERTA_MESHPOINTER_HH
│ │ │ │ +
6#define DUNE_ALBERTA_MESHPOINTER_HH
│ │ │ │
7
│ │ │ │ -
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 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.");
│ │ │ │ -
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 );
│ │ │ │ +
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 // -----------
│ │ │ │ +
37
│ │ │ │ +
38 template< int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
40 {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
43 typedef typename ElementInfo::FillFlags FillFlags;
│ │ │ │ +
44
│ │ │ │ +
45 class BoundaryProvider;
│ │ │ │ +
46
│ │ │ │ +
47 template< int dimWorld >
│ │ │ │ +
48 struct Library;
│ │ │ │ +
49
│ │ │ │ +
50 public:
│ │ │ │ +
51 class MacroIterator;
│ │ │ │
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
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
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
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
77 {
│ │ │ │ +
78 return MacroIterator( *this, true );
│ │ │ │ +
79 }
│ │ │ │ +
│ │ │ │ +
80
│ │ │ │ +
│ │ │ │ +
81 int numMacroElements () const;
│ │ │ │ +
82 int size ( int codim ) const;
│ │ │ │
83
│ │ │ │ -
84#endif
│ │ │ │ -
provides a wrapper for ALBERTA's macro_data structure
│ │ │ │ +
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
│ │ │ │ +
│ │ │ │ +
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 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;
│ │ │ │ +
125
│ │ │ │ +
│ │ │ │ +
126 bool coarsen ( typename FillFlags::Flags fillFlags = FillFlags::nothing );
│ │ │ │ +
127
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ +
215
│ │ │ │ +
│ │ │ │ +
216 This &operator++ ()
│ │ │ │ +
217 {
│ │ │ │ +
218 increment();
│ │ │ │ +
219 return *this;
│ │ │ │ +
220 }
│ │ │ │ +
│ │ │ │ +
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 };
│ │ │ │ +
│ │ │ │ +
250
│ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ +
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 ::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 >
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ │ + │ │ │ │ +
provides a wrapper for ALBERTA's el_info structure
│ │ │ │ +
provides a wrapper for ALBERTA's macro_data 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
│ │ │ │ -
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
│ │ │ │ +
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
│ │ │ │ -
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:518
│ │ │ │ - │ │ │ │ -
virtual void insertElement(const GeometryType &type, const std::vector< unsigned int > &vertices)
Insert an element into the coarse grid.
Definition common/gridfactory.hh:307
│ │ │ │ -
virtual void insertVertex(const FieldVector< ctype, dimworld > &pos)
Insert a vertex into the coarse grid.
Definition common/gridfactory.hh:296
│ │ │ │ -
Provide a generic factory class for unstructured grids.
│ │ │ │ -
Different resources needed by all grid implementations.
│ │ │ │ +
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,176 +1,643 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ +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 © 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_ALBERTA_MESHPOINTER_HH │ │ │ │ │ +6#define DUNE_ALBERTA_MESHPOINTER_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> │ │ │ │ │ -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."); │ │ │ │ │ -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 ); │ │ │ │ │ +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 // ----------- │ │ │ │ │ +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; │ │ │ │ │ +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 │ │ │ │ │ -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 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 │ │ │ │ │ +_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 │ │ │ │ │ +_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#endif │ │ │ │ │ +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 ); │ │ │ │ │ +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; │ │ │ │ │ +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 ); │ │ │ │ │ +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 │ │ │ │ │ +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 { │ │ │ │ │ +_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_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 │ │ │ │ │ +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 │ │ │ │ │ +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 } │ │ │ │ │ +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; │ │ │ │ │ +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 } │ │ │ │ │ +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 │ │ │ │ │ +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 │ │ │ │ │ +_A_L_B_E_R_T_A │ │ │ │ │ +#define ALBERTA │ │ │ │ │ +DDeeffiinniittiioonn albertaheader.hh:29 │ │ │ │ │ +_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_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_:_:_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_:_:_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_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 │ │ │ │ │ +_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_:_:_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:518 │ │ │ │ │ -_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:307 │ │ │ │ │ -_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:296 │ │ │ │ │ -_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_:_:_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/a00632.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dofadmin.hh File Reference │ │ │ │ +dune-grid: hierarchiciterator.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,38 +72,32 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
dofadmin.hh File Reference
│ │ │ │ +
hierarchiciterator.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <utility>
│ │ │ │ -#include <dune/common/hybridutilities.hh>
│ │ │ │ -#include <dune/grid/albertagrid/misc.hh>
│ │ │ │ -#include <dune/grid/albertagrid/elementinfo.hh>
│ │ │ │ +
#include <dune/grid/albertagrid/elementinfo.hh>
│ │ │ │ +#include <dune/grid/common/entityiterator.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::Alberta::DofAccess< dim, codim >
 
class  Dune::Alberta::HierarchyDofNumbering< dim >
class  Dune::AlbertaGridHierarchicIterator< GridImp >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::Alberta
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,26 +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 │ │ │ │ │ -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> │ │ │ │ │ +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_:_:_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_ _> │ │ │ │ │ +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. │ │ │ │ │   │ │ │ │ │ -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/a00632_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dofadmin.hh Source File │ │ │ │ +dune-grid: hierarchiciterator.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,387 +74,210 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
dofadmin.hh
│ │ │ │ +
hierarchiciterator.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_HIERARCHICITERATOR_HH
│ │ │ │ +
6#define DUNE_ALBERTA_HIERARCHICITERATOR_HH
│ │ │ │
7
│ │ │ │ -
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
│ │ │ │ -
34 template< int dim, int codim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
36 {
│ │ │ │ -
37 static const int codimtype = CodimType< dim, codim >::value;
│ │ │ │ + │ │ │ │ + │ │ │ │ +
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
│ │ │ │ + │ │ │ │ + │ │ │ │
38
│ │ │ │ -
39 public:
│ │ │ │ - │ │ │ │ -
41
│ │ │ │ -
42 static const int dimension = dim;
│ │ │ │ -
43 static const int codimension = codim;
│ │ │ │ -
44
│ │ │ │ - │ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ +
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
│ │ │ │ -
│ │ │ │ -
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
│ │ │ │ -
│ │ │ │ -
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 };
│ │ │ │ +
59 void increment();
│ │ │ │ +
60
│ │ │ │ +
│ │ │ │ +
62 bool equals ( const This &other ) const
│ │ │ │ +
63 {
│ │ │ │ +
64 return entity_.impl().equals( other.entity_.impl() );
│ │ │ │ +
65 }
│ │ │ │ +
│ │ │ │ +
66
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
69 {
│ │ │ │ +
70 return entity_;
│ │ │ │ +
71 }
│ │ │ │ +
│ │ │ │ +
72
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
87
│ │ │ │ -
88 // HierarchyDofNumbering
│ │ │ │ -
89 // ---------------------
│ │ │ │ +
86 private:
│ │ │ │ +
87 void increment ( ElementInfo elementInfo );
│ │ │ │ +
88
│ │ │ │ +
89 mutable Entity entity_;
│ │ │ │
90
│ │ │ │ -
91 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
93 {
│ │ │ │ - │ │ │ │ -
95
│ │ │ │ -
96 public:
│ │ │ │ -
97 static const int dimension = dim;
│ │ │ │ +
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
│ │ │ │ - │ │ │ │ - │ │ │ │ -
101
│ │ │ │ -
102 private:
│ │ │ │ -
103 static const int nNodeTypes = N_NODE_TYPES;
│ │ │ │ -
104
│ │ │ │ -
105 template< int codim >
│ │ │ │ -
106 struct CreateDofSpace;
│ │ │ │ +
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< 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 & );
│ │ │ │ +
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 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 }
│ │ │ │ +
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 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 }
│ │ │ │ -
│ │ │ │ -
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
│ │ │ │ -
195
│ │ │ │ -
196
│ │ │ │ -
197 template< int dim >
│ │ │ │ -
198 inline void
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
200 {
│ │ │ │ -
201 release();
│ │ │ │ -
202
│ │ │ │ -
203 if( !mesh )
│ │ │ │ -
204 return;
│ │ │ │ -
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
│ │ │ │ -
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 // ------------------------------------
│ │ │ │ -
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
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
provides a wrapper for ALBERTA's el_info structure
│ │ │ │ -
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ │ +
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
│ │ │ │
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
│ │ │ │ -
Definition misc.hh:148
│ │ │ │ -
Definition misc.hh:192
│ │ │ │ +
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:1122
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,403 +1,224 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ +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 © 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_HIERARCHICITERATOR_HH │ │ │ │ │ +6#define DUNE_ALBERTA_HIERARCHICITERATOR_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{ │ │ │ │ │ -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; │ │ │ │ │ +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; │ │ │ │ │ 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 │ │ │ │ │ -_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 } │ │ │ │ │ +_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 │ │ │ │ │ -_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 │ │ │ │ │ -_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 }; │ │ │ │ │ +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 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 } │ │ │ │ │ +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 │ │ │ │ │ +82 { │ │ │ │ │ +83 return entity_.impl().grid(); │ │ │ │ │ +84 } │ │ │ │ │ 85 │ │ │ │ │ -86 │ │ │ │ │ -87 │ │ │ │ │ -88 // HierarchyDofNumbering │ │ │ │ │ -89 // --------------------- │ │ │ │ │ +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 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; │ │ │ │ │ +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 │ │ │ │ │ -_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; │ │ │ │ │ +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< 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 & ); │ │ │ │ │ +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 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 ); │ │ │ │ │ +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 │ │ │ │ │ -_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 │ │ │ │ │ +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 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 return mesh_; │ │ │ │ │ -161 } │ │ │ │ │ -162 │ │ │ │ │ -_1_6_3 int _s_i_z_e ( int codim ) const │ │ │ │ │ -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 │ │ │ │ │ -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 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 │ │ │ │ │ -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 // ------------------------------------ │ │ │ │ │ -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 │ │ │ │ │ +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 │ │ │ │ │ _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 │ │ │ │ │ _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 │ │ │ │ │ -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 │ │ │ │ │ +_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 │ │ │ │ │ +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:1122 │ │ │ │ │ +_e_n_t_i_t_y_i_t_e_r_a_t_o_r_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ 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: transformation.hh File Reference │ │ │ │ +dune-grid: dofadmin.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,32 +72,38 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
transformation.hh File Reference
│ │ │ │ +
dofadmin.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/grid/albertagrid/misc.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::AlbertaTransformation
class  Dune::Alberta::DofAccess< dim, codim >
 
class  Dune::Alberta::HierarchyDofNumbering< dim >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::Alberta
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,20 +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 │ │ │ │ │ -transformation.hh File Reference │ │ │ │ │ -#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_:_:_A_l_b_e_r_t_a_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ │ +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. │ │ │ │ │   │ │ │ │ │ +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/a00635_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: transformation.hh Source File │ │ │ │ +dune-grid: dofadmin.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,119 +74,387 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
transformation.hh
│ │ │ │ +
dofadmin.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │ +
5#ifndef DUNE_ALBERTA_DOFADMIN_HH
│ │ │ │ +
6#define DUNE_ALBERTA_DOFADMIN_HH
│ │ │ │
7
│ │ │ │ -
8#include <dune/common/fvector.hh>
│ │ │ │ +
8#include <utility>
│ │ │ │
9
│ │ │ │ - │ │ │ │ +
10#include <dune/common/hybridutilities.hh>
│ │ │ │
11
│ │ │ │ -
12#if HAVE_ALBERTA
│ │ │ │ -
13
│ │ │ │ -
14namespace Dune
│ │ │ │ -
15{
│ │ │ │ + │ │ │ │ + │ │ │ │ +
14
│ │ │ │ +
15#if HAVE_ALBERTA
│ │ │ │
16
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
18 {
│ │ │ │ - │ │ │ │ -
20
│ │ │ │ -
21 public:
│ │ │ │ - │ │ │ │ -
23
│ │ │ │ -
24 static const int dimension = Alberta::dimWorld;
│ │ │ │ +
17namespace Dune
│ │ │ │ +
18{
│ │ │ │ +
19
│ │ │ │ +
20 namespace Alberta
│ │ │ │ +
21 {
│ │ │ │ +
22
│ │ │ │ +
23 // External Forward Declarations
│ │ │ │ +
24 // -----------------------------
│ │ │ │
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 {}
│ │ │ │ -
│ │ │ │ +
26 template< int dim >
│ │ │ │ +
27 class MeshPointer;
│ │ │ │ +
28
│ │ │ │ +
29
│ │ │ │ +
30
│ │ │ │ +
31 // DofAccess
│ │ │ │ +
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
│ │ │ │ +
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 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
│ │ │ │ +
│ │ │ │ +
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#endif // #ifndef DUNE_ALBERTA_TRANSFORMATION_HH
│ │ │ │ - │ │ │ │ +
│ │ │ │ +
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
│ │ │ │ +
│ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ +
195
│ │ │ │ +
196
│ │ │ │ +
197 template< int dim >
│ │ │ │ +
198 inline void
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
200 {
│ │ │ │ +
201 release();
│ │ │ │ +
202
│ │ │ │ +
203 if( !mesh )
│ │ │ │ +
204 return;
│ │ │ │ +
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
│ │ │ │ +
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 // ------------------------------------
│ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ +
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,133 +1,403 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ +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 © 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 │ │ │ │ │ +5#ifndef DUNE_ALBERTA_DOFADMIN_HH │ │ │ │ │ +6#define DUNE_ALBERTA_DOFADMIN_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ +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> │ │ │ │ │ +10#include │ │ │ │ │ 11 │ │ │ │ │ -12#if HAVE_ALBERTA │ │ │ │ │ -13 │ │ │ │ │ -14namespace _D_u_n_e │ │ │ │ │ -15{ │ │ │ │ │ +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 │ │ │ │ │ -_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; │ │ │ │ │ +17namespace _D_u_n_e │ │ │ │ │ +18{ │ │ │ │ │ +19 │ │ │ │ │ +20 namespace Alberta │ │ │ │ │ +21 { │ │ │ │ │ +22 │ │ │ │ │ +23 // External Forward Declarations │ │ │ │ │ +24 // ----------------------------- │ │ │ │ │ 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 {} │ │ │ │ │ +26 template< int dim > │ │ │ │ │ +27 class MeshPointer; │ │ │ │ │ +28 │ │ │ │ │ +29 │ │ │ │ │ +30 │ │ │ │ │ +31 // DofAccess │ │ │ │ │ +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 │ │ │ │ │ +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 │ │ │ │ │ +_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 │ │ │ │ │ +_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 │ │ │ │ │ -76#endif // #ifndef DUNE_ALBERTA_TRANSFORMATION_HH │ │ │ │ │ +_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 │ │ │ │ │ +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 return mesh_; │ │ │ │ │ +161 } │ │ │ │ │ +162 │ │ │ │ │ +_1_6_3 int _s_i_z_e ( int codim ) const │ │ │ │ │ +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 │ │ │ │ │ +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 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 │ │ │ │ │ +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 // ------------------------------------ │ │ │ │ │ +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 │ │ │ │ │ +_A_L_B_E_R_T_A │ │ │ │ │ +#define ALBERTA │ │ │ │ │ +DDeeffiinniittiioonn albertaheader.hh:29 │ │ │ │ │ _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 │ │ │ │ │ _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 │ │ │ │ │ +_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 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 │ │ │ │ │ +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/a00641.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dofvector.hh File Reference │ │ │ │ +dune-grid: albertaheader.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,60 +70,122 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ -Namespaces | │ │ │ │ -Functions
│ │ │ │ -
dofvector.hh File Reference
│ │ │ │ +Macros
│ │ │ │ +
albertaheader.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>
│ │ │ │ +
#include <alberta/alberta.h>
│ │ │ │
│ │ │ │

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)
 

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

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,43 +1,39 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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> │ │ │ │ │ +_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_. │ │ │ │ │ -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_ _> │ │ │ │ │ +MMaaccrrooss │ │ │ │ │ +#define  _D_I_M___O_F___W_O_R_L_D   ALBERTA_DIM │ │ │ │ │   │ │ │ │ │ -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_ _> │ │ │ │ │ +#define  _A_L_B_E_R_T_A   :: │ │ │ │ │   │ │ │ │ │ -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_ _> │ │ │ │ │ +#define  _A_L_B_E_R_T_A___D_E_B_U_G   0 │ │ │ │ │   │ │ │ │ │ -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) │ │ │ │ │ +#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/a00641_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dofvector.hh Source File │ │ │ │ +dune-grid: albertaheader.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,532 +74,94 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
dofvector.hh
│ │ │ │ +
albertaheader.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │ +
5#ifndef DUNE_ALBERTAHEADER_HH
│ │ │ │ +
6#define DUNE_ALBERTAHEADER_HH
│ │ │ │
7
│ │ │ │ -
8#include <cstdlib>
│ │ │ │ -
9#include <limits>
│ │ │ │ -
10
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
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 // DofVectorProvider
│ │ │ │ -
32 // -----------------
│ │ │ │ -
33
│ │ │ │ -
34 template< class Dof >
│ │ │ │ - │ │ │ │ -
36
│ │ │ │ -
37 template<>
│ │ │ │ -
│ │ │ │ -
38 struct DofVectorProvider< int >
│ │ │ │ -
39 {
│ │ │ │ -
40 typedef ALBERTA DOF_INT_VEC DofVector;
│ │ │ │ +
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
│ │ │ │ +
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 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 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
│ │ │ │ -
provides a wrapper for ALBERTA's refinement patches and the corners for geometryInFather
│ │ │ │ - │ │ │ │ -
provides a wrapper for ALBERTA's el_info structure
│ │ │ │ -
#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
│ │ │ │ +
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
│ │ │ │ +
76
│ │ │ │ +
77#endif // #ifndef DUNE_ALBERTAHEADER_HH
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,563 +1,89 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ +albertaheader.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 © 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 │ │ │ │ │ +5#ifndef DUNE_ALBERTAHEADER_HH │ │ │ │ │ +6#define DUNE_ALBERTAHEADER_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{ │ │ │ │ │ -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; │ │ │ │ │ +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 │ │ │ │ │ +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 │ │ │ │ │ -_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 }; │ │ │ │ │ -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 │ │ │ │ │ -_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 │ │ │ │ │ -_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 │ │ │ │ │ -_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 │ │ │ │ │ -_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 │ │ │ │ │ +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 │ │ │ │ │ +76 │ │ │ │ │ +77#endif // #ifndef DUNE_ALBERTAHEADER_HH │ │ │ │ │ =============================================================================== │ │ │ │ │ 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: macrodata.cc File Reference │ │ │ │ +dune-grid: level.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,37 +70,44 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ +Classes | │ │ │ │ Namespaces
│ │ │ │ -
macrodata.cc File Reference
│ │ │ │ +
level.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ -

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

│ │ │ │ -
#include <vector>
│ │ │ │ -#include <array>
│ │ │ │ -#include <dune/grid/common/exceptions.hh>
│ │ │ │ -#include <dune/grid/albertagrid/macrodata.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.

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

│ │ │ │ +Classes

class  Dune::AlbertaGridLevelProvider< dim >
 
class  Dune::AlbertaGridLevelProvider< dim >::SetLocal
 
class  Dune::AlbertaGridLevelProvider< dim >::CalcMaxLevel
 
struct  Dune::AlbertaGridLevelProvider< dim >::Interpolation
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ 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 {} │ │ │ │ │ @@ -1,26 +1,30 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 <_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> │ │ │ │ │ +_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> │ │ │ │ │ +_G_o_ _t_o_ _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 │ │ │ │ │ +  │ │ │ │ │ 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/a00647.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: meshpointer.hh File Reference │ │ │ │ +dune-grid: albertagrid.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,48 +71,66 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces
│ │ │ │ -
meshpointer.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Macros | │ │ │ │ +Functions | │ │ │ │ +Variables
│ │ │ │ +
albertagrid.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>
│ │ │ │ +
#include "geometry.cc"
│ │ │ │ +#include "entity.cc"
│ │ │ │ +#include "intersection.cc"
│ │ │ │
│ │ │ │

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

│ │ │ │ +Macros

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

│ │ │ │ +Functions

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

│ │ │ │ +Variables

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

Detailed Description

│ │ │ │ -

provides a wrapper for ALBERTA's mesh structure

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

Macro Definition Documentation

│ │ │ │ + │ │ │ │ +

◆ DUNE_ALBERTAGRID_CC

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
#define DUNE_ALBERTAGRID_CC
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,34 +1,34 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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> │ │ │ │ │ +_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_:_:_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 │ │ │ │ │ +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/a00647_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: meshpointer.hh Source File │ │ │ │ +dune-grid: albertagrid.cc Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,623 +74,799 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
meshpointer.hh
│ │ │ │ +
albertagrid.cc
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │ +
5#ifndef DUNE_ALBERTAGRID_CC
│ │ │ │ +
6#define DUNE_ALBERTAGRID_CC
│ │ │ │
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 // -----------
│ │ │ │ +
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 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
40 {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
43 typedef typename ElementInfo::FillFlags FillFlags;
│ │ │ │ -
44
│ │ │ │ -
45 class BoundaryProvider;
│ │ │ │ -
46
│ │ │ │ -
47 template< int dimWorld >
│ │ │ │ -
48 struct Library;
│ │ │ │ -
49
│ │ │ │ -
50 public:
│ │ │ │ -
51 class MacroIterator;
│ │ │ │ -
52
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
54 : mesh_( 0 )
│ │ │ │ -
55 {}
│ │ │ │ +
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 explicit MeshPointer ( Mesh *mesh )
│ │ │ │ -
58 : mesh_( mesh )
│ │ │ │ -
59 {}
│ │ │ │ -
│ │ │ │ -
60
│ │ │ │ +
57
│ │ │ │ +
58 template< int dim, int dimworld >
│ │ │ │ +
59 template< class Proj, class Impl >
│ │ │ │ + │ │ │ │
│ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ + │ │ │ │ + │ │ │ │ +
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
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
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
│ │ │ │ -
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 );
│ │ │ │ +
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 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 >
│ │ │ │ +
114 setup();
│ │ │ │ +
115 hIndexSet_.create();
│ │ │ │ +
116
│ │ │ │ +
117 calcExtras();
│ │ │ │ +
118 }
│ │ │ │ +
│ │ │ │ +
119
│ │ │ │ +
120
│ │ │ │ +
121 template < int dim, int dimworld >
│ │ │ │ + │ │ │ │
│ │ │ │ -
123 void leafTraverse ( Functor &functor,
│ │ │ │ -
124 typename FillFlags::Flags fillFlags = FillFlags::standard ) const;
│ │ │ │ -
125
│ │ │ │ -
│ │ │ │ -
126 bool coarsen ( typename FillFlags::Flags fillFlags = FillFlags::nothing );
│ │ │ │ -
127
│ │ │ │ -
│ │ │ │ -
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
│ │ │ │ -
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;
│ │ │ │ +
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 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
│ │ │ │ +
154 template< int dim, int dimworld >
│ │ │ │ + │ │ │ │ +
156 {
│ │ │ │ +
157 dofNumbering_.create( mesh_ );
│ │ │ │ +
158
│ │ │ │ +
159 levelProvider_.create( dofNumbering_ );
│ │ │ │
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 {}
│ │ │ │ -
│ │ │ │ +
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 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 }
│ │ │ │ -
│ │ │ │ +
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 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 }
│ │ │ │ -
│ │ │ │ +
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 const MeshPointer &mesh () const
│ │ │ │ -
212 {
│ │ │ │ -
213 return mesh_;
│ │ │ │ -
214 }
│ │ │ │ -
│ │ │ │ -
215
│ │ │ │ -
│ │ │ │ -
216 This &operator++ ()
│ │ │ │ -
217 {
│ │ │ │ -
218 increment();
│ │ │ │ -
219 return *this;
│ │ │ │ -
220 }
│ │ │ │ +
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 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
│ │ │ │ -
252
│ │ │ │ -
253 // Implementation of MeshPointer
│ │ │ │ -
254 // -----------------------------
│ │ │ │ -
255
│ │ │ │ -
256 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
258 {
│ │ │ │ -
259 return (mesh_ ? mesh_->n_macro_el : 0);
│ │ │ │ -
260 }
│ │ │ │ -
│ │ │ │ -
261
│ │ │ │ +
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 template<>
│ │ │ │ +
263 MarkerVector &markerVector = leafMarkerVector_;
│ │ │ │
│ │ │ │ -
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<>
│ │ │ │ +
264 const int firstMarkedCodim = 2;
│ │ │ │ +
265 if( (codim >= firstMarkedCodim) && !markerVector.up2Date() )
│ │ │ │ + │ │ │ │ +
267
│ │ │ │ +
268 return LeafIteratorImp( *this, &markerVector, maxlevel_ );
│ │ │ │ +
269 }
│ │ │ │ +
270
│ │ │ │
│ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ + │ │ │ │ +
272 template< int dim, int dimworld >
│ │ │ │ +
273 template< int codim, PartitionIteratorType pitype >
│ │ │ │ + │ │ │ │ +
275 ::template Codim< codim >::template Partition< pitype >::LeafIterator
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
277 {
│ │ │ │ + │ │ │ │ +
279 return LeafIteratorImp( *this, maxlevel_ );
│ │ │ │ +
280 }
│ │ │ │
281
│ │ │ │ -
282 template<>
│ │ │ │ +
282
│ │ │ │
│ │ │ │ -
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 }
│ │ │ │ +
283 template< int dim, int dimworld >
│ │ │ │ +
284 template< int codim >
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
288 {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
│ │ │ │ +
291
│ │ │ │ +
292
│ │ │ │ +
293 template< int dim, int dimworld >
│ │ │ │ +
294 template< int codim >
│ │ │ │ + │ │ │ │ +
296 ::template Codim< codim >::LeafIterator
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
298 {
│ │ │ │ + │ │ │ │ +
300 }
│ │ │ │
│ │ │ │ +
301
│ │ │ │ +
302
│ │ │ │ +
303 template< int dim, int dimworld >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
305 {
│ │ │ │ +
306 typedef typename Traits::template Codim< 0 >::LeafIterator LeafIterator;
│ │ │ │
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 }
│ │ │ │ -
│ │ │ │ -
339
│ │ │ │ -
340
│ │ │ │ -
341 template< int dim >
│ │ │ │ -
│ │ │ │ -
342 inline unsigned int MeshPointer< dim >::read ( const std::string &filename, Real &time )
│ │ │ │ -
343 {
│ │ │ │ -
344 release();
│ │ │ │ +
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 );
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
342 adapt( handle );
│ │ │ │ +
343 }
│ │ │ │ +
│ │ │ │ + │ │ │ │
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
│ │ │ │ +
346
│ │ │ │ +
│ │ │ │ +
347 template< int dim, int dimworld >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
349 {
│ │ │ │ +
350 adaptationState_.preAdapt();
│ │ │ │ +
351 return adaptationState_.coarsen();
│ │ │ │ +
352 }
│ │ │ │ +
│ │ │ │ +
353
│ │ │ │ +
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 template< int dim >
│ │ │ │ -
383 template< class Functor >
│ │ │ │ -
384 inline void MeshPointer< dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
383 template< int dim, int dimworld >
│ │ │ │ + │ │ │ │
│ │ │ │ -
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 >
│ │ │ │ +
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;
│ │ │ │ +
394
│ │ │ │ +
│ │ │ │ +
395 // take back previous marking
│ │ │ │ +
396 adaptationState_.unmark( getMark( e ) );
│ │ │ │ +
397
│ │ │ │
│ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ +
398 // set new marking
│ │ │ │ +
399 adaptationState_.mark( refCount );
│ │ │ │ +
400 e.impl().elementInfo().setMark( refCount );
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
402 return true;
│ │ │ │ +
403 }
│ │ │ │ +
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 }
│ │ │ │ -
│ │ │ │ +
406 template< int dim, int dimworld >
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
409 {
│ │ │ │ +
410 return e.impl().elementInfo().getMark();
│ │ │ │ +
411 }
│ │ │ │
│ │ │ │ -
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 }
│ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
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 } // namespace Alberta
│ │ │ │ -
464
│ │ │ │ -
465} // namespace Dune
│ │ │ │ +
463 postAdapt();
│ │ │ │ +
464 return refined;
│ │ │ │ +
465 }
│ │ │ │
466
│ │ │ │ -
467#endif // #if HAVE_ALBERTA
│ │ │ │ -
468
│ │ │ │ -
469#endif // #ifndef DUNE_ALBERTA_MESHPOINTER_HH
│ │ │ │ +
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 >
│ │ │ │ +
│ │ │ │ +
504 inline int AlbertaGrid< dim, dimworld >::size ( int codim ) const
│ │ │ │ +
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 ()
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
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 >
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
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
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -
provides a wrapper for ALBERTA's macro_data structure
│ │ │ │ - │ │ │ │ -
provides a wrapper for ALBERTA's el_info structure
│ │ │ │ -
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
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 void checkAlbertaDimensions()
Definition albertagrid.cc:29
│ │ │ │
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
│ │ │ │ +
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:410
│ │ │ │ +
GridFamily::ctype ctype
Definition agrid.hh:143
│ │ │ │ +
Definition albertagrid/datahandle.hh:27
│ │ │ │
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 dofvector.hh:179
│ │ │ │ + │ │ │ │ +
const GlobalVector & coordinate(int vertex) const
Definition elementinfo.hh:685
│ │ │ │ +
void create()
Definition indexsets.cc:133
│ │ │ │ +
Definition albertagrid/indexsets.hh:329
│ │ │ │ +
Definition albertagrid/gridfamily.hh:98
│ │ │ │ +
Definition albertagrid/gridfamily.hh:117
│ │ │ │
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 misc.hh:32
│ │ │ │ +
Definition misc.hh:36
│ │ │ │
Definition albertagrid/projection.hh:80
│ │ │ │ -
Definition albertagrid/projection.hh:208
│ │ │ │ - │ │ │ │ +
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,643 +1,748 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ +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 © 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 │ │ │ │ │ +5#ifndef DUNE_ALBERTAGRID_CC │ │ │ │ │ +_6#define DUNE_ALBERTAGRID_CC │ │ │ │ │ 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 // ----------- │ │ │ │ │ +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 │ │ │ │ │ -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; │ │ │ │ │ -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 {} │ │ │ │ │ +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 │ │ │ │ │ -_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 } │ │ │ │ │ +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 │ │ │ │ │ -_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 │ │ │ │ │ -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 ); │ │ │ │ │ +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 │ │ │ │ │ +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 _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 │ │ │ │ │ -_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; │ │ │ │ │ -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 ); │ │ │ │ │ -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 │ │ │ │ │ -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; │ │ │ │ │ +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 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 │ │ │ │ │ +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 │ │ │ │ │ -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 { │ │ │ │ │ -_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 {} │ │ │ │ │ +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 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()); │ │ │ │ │ +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 │ │ │ │ │ -_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 } │ │ │ │ │ +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 │ │ │ │ │ -_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 } │ │ │ │ │ +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( (codim > 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 │ │ │ │ │ -_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 │ │ │ │ │ -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 │ │ │ │ │ +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 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; │ │ │ │ │ +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_; │ │ │ │ │ +_2_6_4 const int _f_i_r_s_t_M_a_r_k_e_d_C_o_d_i_m = 2; │ │ │ │ │ +265 if( (codim >= _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 } │ │ │ │ │ +270 │ │ │ │ │ +_2_7_1 │ │ │ │ │ +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 │ │ │ │ │ +277 { │ │ │ │ │ +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 │ │ │ │ │ -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(); │ │ │ │ │ +282 │ │ │ │ │ +_2_8_3 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 │ │ │ │ │ +_2_8_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_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 { │ │ │ │ │ +289 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_ _>(); │ │ │ │ │ +_2_9_0 } │ │ │ │ │ +291 │ │ │ │ │ +292 │ │ │ │ │ +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 │ │ │ │ │ +296 ::template Codim< codim >::LeafIterator │ │ │ │ │ +_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 Library< dimWorld >::boundaryCount = 0; │ │ │ │ │ -304 Library< dimWorld >::create( *this, macroData, &initNodeProjection ); │ │ │ │ │ -305 return Library< dimWorld >::boundaryCount; │ │ │ │ │ -306 } │ │ │ │ │ +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 │ │ │ │ │ -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 _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(); │ │ │ │ │ +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 │ │ │ │ │ +_3_3_8 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 ); │ │ │ │ │ +_3_4_1 │ │ │ │ │ +342 adapt( _h_a_n_d_l_e ); │ │ │ │ │ +343 } │ │ │ │ │ +_3_4_4 } │ │ │ │ │ 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 │ │ │ │ │ +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 { │ │ │ │ │ +350 adaptationState_.preAdapt(); │ │ │ │ │ +351 return adaptationState_.coarsen(); │ │ │ │ │ +352 } │ │ │ │ │ +353 │ │ │ │ │ +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 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 _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(); │ │ │ │ │ +_3_7_9 adaptationState_.postAdapt(); │ │ │ │ │ +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 ) │ │ │ │ │ -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 } │ │ │ │ │ +_3_8_2 │ │ │ │ │ +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; │ │ │ │ │ +394 │ │ │ │ │ +_3_9_5 // take back previous marking │ │ │ │ │ +396 adaptationState_.unmark( getMark( _e ) ); │ │ │ │ │ +397 │ │ │ │ │ +_3_9_8 // set new marking │ │ │ │ │ +399 adaptationState_.mark( refCount ); │ │ │ │ │ +400 _e.impl().elementInfo().setMark( refCount ); │ │ │ │ │ +_4_0_1 │ │ │ │ │ +402 return true; │ │ │ │ │ +403 } │ │ │ │ │ +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 │ │ │ │ │ +406 template< int dim, int dimworld > │ │ │ │ │ +407 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 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 ) │ │ │ │ │ +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 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 } │ │ │ │ │ +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 │ │ │ │ │ +_4_3_0 // return true if elements were created │ │ │ │ │ +431 return _r_e_f_i_n_e_d; │ │ │ │ │ +432 } │ │ │ │ │ +_4_3_3 │ │ │ │ │ +434 │ │ │ │ │ +435 template< int dim, int dimworld > │ │ │ │ │ +436 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 │ │ │ │ │ +_4_4_2 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; │ │ │ │ │ +445 _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; │ │ │ │ │ +448 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 } // namespace Alberta │ │ │ │ │ -464 │ │ │ │ │ -465} // namespace Dune │ │ │ │ │ +463 postAdapt(); │ │ │ │ │ +464 return _r_e_f_i_n_e_d; │ │ │ │ │ +465 } │ │ │ │ │ 466 │ │ │ │ │ -467#endif // #if HAVE_ALBERTA │ │ │ │ │ -468 │ │ │ │ │ -469#endif // #ifndef DUNE_ALBERTA_MESHPOINTER_HH │ │ │ │ │ -_m_a_c_r_o_d_a_t_a_._h_h │ │ │ │ │ -provides a wrapper for ALBERTA's macro_data structure │ │ │ │ │ -_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 │ │ │ │ │ -_A_L_B_E_R_T_A │ │ │ │ │ -#define ALBERTA │ │ │ │ │ -DDeeffiinniittiioonn albertaheader.hh:29 │ │ │ │ │ +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 codim ) │ │ │ │ │ +const │ │ │ │ │ +491 { │ │ │ │ │ +492 return ((level >= 0) && (level <= maxlevel_) ? sizeCache_.size( level, │ │ │ │ │ +codim ) : 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 codim ) const │ │ │ │ │ +505 { │ │ │ │ │ +506 _a_s_s_e_r_t( sizeCache_.size( codim ) == mesh_.size( codim ) ); │ │ │ │ │ +507 return mesh_.size( codim ); │ │ │ │ │ +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 () │ │ │ │ │ +_5_4_8 { │ │ │ │ │ +549 // determine new maxlevel │ │ │ │ │ +550 maxlevel_ = levelProvider_.maxLevel(); │ │ │ │ │ +551 _a_s_s_e_r_t( (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( _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 _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _> │ │ │ │ │ +_5_7_5_ _:_:_w_r_i_t_e_G_r_i_d ( 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 │ │ │ │ │ _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_:_:_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_:_:_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 │ │ │ │ │ -_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_:_:_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:410 │ │ │ │ │ +_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_:_:_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_:_:_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_:_:_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:133 │ │ │ │ │ +_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:329 │ │ │ │ │ +_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_:_:_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_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_:_:_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 │ │ │ │ │ +_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/a00650.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: leafiterator.hh File Reference │ │ │ │ +dune-grid: indexstack.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,35 +72,41 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
leafiterator.hh File Reference
│ │ │ │ +
indexstack.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/grid/common/entityiterator.hh>
│ │ │ │ -#include <dune/grid/albertagrid/treeiterator.hh>
│ │ │ │ + │ │ │ │ +

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

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::AlbertaGridLeafIterator< codim, pitype, GridImp >
 
class  Dune::AlbertaGridLeafIterator< codim, Ghost_Partition, GridImp >
class  Dune::IndexStack< T, length >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

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

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,22 +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 │ │ │ │ │ -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> │ │ │ │ │ +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_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_ _> │ │ │ │ │ +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. │ │ │ │ │   │ │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ +Provides an index stack that supplies indices for element numbering for a grid │ │ │ │ │ +(i.e. AlbertaGrid and ALUGrid) │ │ │ │ │ + Author │ │ │ │ │ + Robert Kloefkorn │ │ │ │ │ =============================================================================== │ │ │ │ │ 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: leafiterator.hh Source File │ │ │ │ +dune-grid: indexstack.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,146 +74,257 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
leafiterator.hh
│ │ │ │ +
indexstack.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_ALBERTAGRID_INDEXSTACK_HH
│ │ │ │ +
6#define DUNE_ALBERTAGRID_INDEXSTACK_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ -
9
│ │ │ │ - │ │ │ │ -
11
│ │ │ │ -
12#if HAVE_ALBERTA
│ │ │ │ +
8#include <assert.h>
│ │ │ │ +
9#include <stack>
│ │ │ │ +
10
│ │ │ │ +
11#include <dune/common/exceptions.hh>
│ │ │ │ +
12#include <dune/common/reservedvector.hh>
│ │ │ │
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 {}
│ │ │ │ -
│ │ │ │ +
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; }
│ │ │ │
33
│ │ │ │ -
│ │ │ │ -
35 AlbertaGridLeafIterator ( const GridImp &grid, int level )
│ │ │ │ -
36 : Base( grid, level )
│ │ │ │ -
37 {}
│ │ │ │ -
│ │ │ │ -
38
│ │ │ │ -
│ │ │ │ -
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
│ │ │ │ +
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 };
│ │ │ │ +
50
│ │ │ │ +
51 typedef MyFiniteStack StackType;
│ │ │ │ +
52 typedef typename std::stack < StackType * > StackListType;
│ │ │ │
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 {}
│ │ │ │ -
│ │ │ │ -
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 };
│ │ │ │ -
│ │ │ │ +
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
│ │ │ │ +
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(); }
│ │ │ │ +
80
│ │ │ │ +
82 inline T getIndex ();
│ │ │ │ +
83
│ │ │ │ +
85 inline void freeIndex(T index);
│ │ │ │
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
│ │ │ │ +
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 // clear fullStacks
│ │ │ │ +
107 void clearStack ();
│ │ │ │ +
108
│ │ │ │ +
109 }; // end class IndexStack
│ │ │ │ +
│ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ +
156
│ │ │ │ +
157 template <class T, int length>
│ │ │ │ +
│ │ │ │ +
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 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 return ;
│ │ │ │ +
209 }
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ +
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,176 +1,271 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ +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 © 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_ALBERTAGRID_INDEXSTACK_HH │ │ │ │ │ +6#define DUNE_ALBERTAGRID_INDEXSTACK_HH │ │ │ │ │ 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 │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10 │ │ │ │ │ +11#include │ │ │ │ │ +12#include │ │ │ │ │ 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 {} │ │ │ │ │ +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; } │ │ │ │ │ 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 {} │ │ │ │ │ -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 │ │ │ │ │ +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 }; │ │ │ │ │ +50 │ │ │ │ │ +51 typedef MyFiniteStack StackType; │ │ │ │ │ +52 typedef typename std::stack < StackType * > StackListType; │ │ │ │ │ 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 {} │ │ │ │ │ -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 }; │ │ │ │ │ +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 │ │ │ │ │ +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(); } │ │ │ │ │ +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); │ │ │ │ │ 86 │ │ │ │ │ -87} │ │ │ │ │ -88 │ │ │ │ │ -89#endif // #if HAVE_ALBERTA │ │ │ │ │ -90 │ │ │ │ │ -91#endif // #ifndef DUNE_ALBERTA_LEAFITERATOR_HH │ │ │ │ │ -_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 │ │ │ │ │ +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 │ │ │ │ │ +106 // clear fullStacks │ │ │ │ │ +107 void clearStack (); │ │ │ │ │ +108 │ │ │ │ │ +109 }; // end class IndexStack │ │ │ │ │ +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 ) │ │ │ │ │ +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 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 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_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 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 │ │ │ │ │ -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 │ │ │ │ │ -_e_n_t_i_t_y_i_t_e_r_a_t_o_r_._h_h │ │ │ │ │ +_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/a00653.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: undefine-2.0.hh File Reference │ │ │ │ +dune-grid: misc.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -69,25 +69,189 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
undefine-2.0.hh File Reference
│ │ │ │ +
│ │ │ │ +Classes | │ │ │ │ +Namespaces | │ │ │ │ +Macros | │ │ │ │ +Typedefs | │ │ │ │ +Functions | │ │ │ │ +Variables
│ │ │ │ +
misc.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>
│ │ │ │ +
│ │ │ │ +

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

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

│ │ │ │ │ │ │ │ -

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

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

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,150 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 | _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_. │ │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -Contains #undefs for all preprocessor macros defined by alberta. │ │ │ │ │ -This file is created automatically by the perl script undefAllMacros.pl. │ │ │ │ │ +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_ _> │ │ │ │ │ +  │ │ │ │ │ +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/a00653_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: undefine-2.0.hh Source File │ │ │ │ +dune-grid: misc.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,476 +74,870 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
undefine-2.0.hh
│ │ │ │ +
misc.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_
│ │ │ │ -
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
│ │ │ │ +
5#ifndef DUNE_ALBERTA_MISC_HH
│ │ │ │ +
6#define DUNE_ALBERTA_MISC_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>
│ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ +
24namespace Dune
│ │ │ │ +
25{
│ │ │ │ +
26
│ │ │ │ +
27 // Exceptions
│ │ │ │ +
28 // ----------
│ │ │ │ +
29
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
31 : public Exception
│ │ │ │ +
32 {};
│ │ │ │ +
│ │ │ │ +
33
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
35 : public IOError
│ │ │ │ +
36 {};
│ │ │ │ +
│ │ │ │ +
37
│ │ │ │ +
38
│ │ │ │
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
│ │ │ │ +
40 namespace Alberta
│ │ │ │ +
41 {
│ │ │ │ +
42
│ │ │ │ +
43 // Import Types
│ │ │ │ +
44 // ------------
│ │ │ │ +
45
│ │ │ │ +
46 static const int dimWorld = DIM_OF_WORLD;
│ │ │ │
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
│ │ │ │ +
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#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
│ │ │ │ +
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#ifdef N_WALLS_0D
│ │ │ │ -
69 #undef N_WALLS_0D
│ │ │ │ -
70#endif // N_WALLS_0D
│ │ │ │ +
68
│ │ │ │ +
69 // Memory Manipulation Functions
│ │ │ │ +
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
│ │ │ │ -
79
│ │ │ │ -
80#ifdef N_FACES_1D
│ │ │ │ -
81 #undef N_FACES_1D
│ │ │ │ -
82#endif // N_FACES_1D
│ │ │ │ +
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#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
│ │ │ │ +
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#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
│ │ │ │ +
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#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
│ │ │ │ +
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#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
│ │ │ │ +
│ │ │ │ +
136 static const Vector &nullVector ()
│ │ │ │ +
137 {
│ │ │ │ +
138 return instance().nullVector_;
│ │ │ │ +
139 }
│ │ │ │ +
│ │ │ │ +
140 };
│ │ │ │ +
│ │ │ │ +
141
│ │ │ │ +
142
│ │ │ │
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
│ │ │ │ +
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#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
│ │ │ │ +
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#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
│ │ │ │ -
175
│ │ │ │ -
176#ifdef INTERIOR
│ │ │ │ -
177 #undef INTERIOR
│ │ │ │ -
178#endif // INTERIOR
│ │ │ │ +
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#ifdef DIRICHLET
│ │ │ │ -
181 #undef DIRICHLET
│ │ │ │ -
182#endif // DIRICHLET
│ │ │ │ -
183
│ │ │ │ -
184#ifdef NEUMANN
│ │ │ │ -
185 #undef NEUMANN
│ │ │ │ -
186#endif // NEUMANN
│ │ │ │ +
180 template<>
│ │ │ │ +
│ │ │ │ +
181 struct NumSubEntities< 3, 2 >
│ │ │ │ +
182 {
│ │ │ │ +
183 static const int value = 6;
│ │ │ │ +
184 };
│ │ │ │ +
│ │ │ │ +
185
│ │ │ │ +
186
│ │ │ │
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
│ │ │ │ +
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#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
│ │ │ │ +
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#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
│ │ │ │ +
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#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
│ │ │ │ +
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#ifdef FILL_BOUND
│ │ │ │ -
237 #undef FILL_BOUND
│ │ │ │ -
238#endif // FILL_BOUND
│ │ │ │ +
236 static const Flags coords = FILL_COORDS;
│ │ │ │ +
237
│ │ │ │ +
238 static const Flags neighbor = FILL_NEIGH;
│ │ │ │
239
│ │ │ │ -
240#ifdef FILL_NEIGH
│ │ │ │ -
241 #undef FILL_NEIGH
│ │ │ │ -
242#endif // FILL_NEIGH
│ │ │ │ +
240 static const Flags orientation = (dim == 3 ? FILL_ORIENTATION : FILL_NOTHING);
│ │ │ │ +
241
│ │ │ │ +
242 static const Flags projection = FILL_PROJECTION;
│ │ │ │
243
│ │ │ │ -
244#ifdef FILL_OPP_COORDS
│ │ │ │ -
245 #undef FILL_OPP_COORDS
│ │ │ │ -
246#endif // FILL_OPP_COORDS
│ │ │ │ +
244 static const Flags elementType = FILL_NOTHING;
│ │ │ │ +
245
│ │ │ │ +
246 static const Flags boundaryId = FILL_MACRO_WALLS;
│ │ │ │
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
│ │ │ │ +
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#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
│ │ │ │ +
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#ifdef RUN_HOOKS_2
│ │ │ │ -
281 #undef RUN_HOOKS_2
│ │ │ │ -
282#endif // RUN_HOOKS_2
│ │ │ │ +
280
│ │ │ │ +
281 // Dune2AlbertaNumbering
│ │ │ │ +
282 // ---------------------
│ │ │ │
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
│ │ │ │ -
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
│ │ │ │ +
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#ifdef CALL_EVERY_EL_INORDER
│ │ │ │ -
309 #undef CALL_EVERY_EL_INORDER
│ │ │ │ -
310#endif // CALL_EVERY_EL_INORDER
│ │ │ │ +
308
│ │ │ │ +
309 // Generic2AlbertaNumbering
│ │ │ │ +
310 // ------------------------
│ │ │ │
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#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
│ │ │ │ +
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#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
│ │ │ │ -
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
│ │ │ │ -
351
│ │ │ │ -
352#ifdef FOR_ALL_FREE_DOFS
│ │ │ │ -
353 #undef FOR_ALL_FREE_DOFS
│ │ │ │ -
354#endif // FOR_ALL_FREE_DOFS
│ │ │ │ +
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#ifdef DOWBM_FULL
│ │ │ │ -
357 #undef DOWBM_FULL
│ │ │ │ -
358#endif // DOWBM_FULL
│ │ │ │ +
356
│ │ │ │ +
357 // NumberingMap
│ │ │ │ +
358 // ------------
│ │ │ │
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
│ │ │ │ +
360 template< int dim, template< int, int > class Numbering = Generic2AlbertaNumbering >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
362 {
│ │ │ │ + │ │ │ │ +
364
│ │ │ │ +
365 template< int codim >
│ │ │ │ +
366 struct Initialize;
│ │ │ │
367
│ │ │ │ -
368#ifdef ROW_LENGTH
│ │ │ │ -
369 #undef ROW_LENGTH
│ │ │ │ -
370#endif // ROW_LENGTH
│ │ │ │ +
368 int *dune2alberta_[ dim+1 ];
│ │ │ │ +
369 int *alberta2dune_[ dim+1 ];
│ │ │ │ +
370 int numSubEntities_[ dim+1 ];
│ │ │ │
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
│ │ │ │ +
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#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
│ │ │ │ +
│ │ │ │ +
404 int numSubEntities ( int codim ) const
│ │ │ │ +
405 {
│ │ │ │ +
406 assert( (codim >= 0) && (codim <= dim) );
│ │ │ │ +
407 return numSubEntities_[ codim ];
│ │ │ │ +
408 }
│ │ │ │ +
│ │ │ │ +
409 };
│ │ │ │ +
│ │ │ │ +
410
│ │ │ │
411
│ │ │ │ -
412#ifdef MESH_COARSENED
│ │ │ │ -
413 #undef MESH_COARSENED
│ │ │ │ -
414#endif // MESH_COARSENED
│ │ │ │ +
412
│ │ │ │ +
413 // NumberingMap::Initialize
│ │ │ │ +
414 // ------------------------
│ │ │ │
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
│ │ │ │ +
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#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
│ │ │ │ +
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#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
│ │ │ │ +
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 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,471 +1,888 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ +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 © 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_ │ │ │ │ │ -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 │ │ │ │ │ +5#ifndef DUNE_ALBERTA_MISC_HH │ │ │ │ │ +6#define DUNE_ALBERTA_MISC_HH │ │ │ │ │ +7 │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10 │ │ │ │ │ +11#include │ │ │ │ │ +12#include │ │ │ │ │ +13#include │ │ │ │ │ +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 │ │ │ │ │ -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 │ │ │ │ │ +24namespace _D_u_n_e │ │ │ │ │ +25{ │ │ │ │ │ +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 │ │ │ │ │ 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 │ │ │ │ │ +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#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 │ │ │ │ │ +_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 │ │ │ │ │ -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 │ │ │ │ │ +_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#ifdef N_WALLS_0D │ │ │ │ │ -69 #undef N_WALLS_0D │ │ │ │ │ -70#endif // N_WALLS_0D │ │ │ │ │ +68 │ │ │ │ │ +69 // Memory Manipulation Functions │ │ │ │ │ +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 │ │ │ │ │ -79 │ │ │ │ │ -80#ifdef N_FACES_1D │ │ │ │ │ -81 #undef N_FACES_1D │ │ │ │ │ -82#endif // N_FACES_1D │ │ │ │ │ +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#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 │ │ │ │ │ +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#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 │ │ │ │ │ +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#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 │ │ │ │ │ +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 │ │ │ │ │ -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 │ │ │ │ │ +_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#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 │ │ │ │ │ +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#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 │ │ │ │ │ +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#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 │ │ │ │ │ -175 │ │ │ │ │ -176#ifdef INTERIOR │ │ │ │ │ -177 #undef INTERIOR │ │ │ │ │ -178#endif // INTERIOR │ │ │ │ │ +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#ifdef DIRICHLET │ │ │ │ │ -181 #undef DIRICHLET │ │ │ │ │ -182#endif // DIRICHLET │ │ │ │ │ -183 │ │ │ │ │ -184#ifdef NEUMANN │ │ │ │ │ -185 #undef NEUMANN │ │ │ │ │ -186#endif // NEUMANN │ │ │ │ │ +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#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 │ │ │ │ │ +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#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 │ │ │ │ │ +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#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 │ │ │ │ │ +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#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 │ │ │ │ │ +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 │ │ │ │ │ -236#ifdef FILL_BOUND │ │ │ │ │ -237 #undef FILL_BOUND │ │ │ │ │ -238#endif // FILL_BOUND │ │ │ │ │ +_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 │ │ │ │ │ -240#ifdef FILL_NEIGH │ │ │ │ │ -241 #undef FILL_NEIGH │ │ │ │ │ -242#endif // FILL_NEIGH │ │ │ │ │ +_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 │ │ │ │ │ -244#ifdef FILL_OPP_COORDS │ │ │ │ │ -245 #undef FILL_OPP_COORDS │ │ │ │ │ -246#endif // FILL_OPP_COORDS │ │ │ │ │ +_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 │ │ │ │ │ -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 │ │ │ │ │ +_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#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 │ │ │ │ │ +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#ifdef RUN_HOOKS_2 │ │ │ │ │ -281 #undef RUN_HOOKS_2 │ │ │ │ │ -282#endif // RUN_HOOKS_2 │ │ │ │ │ +280 │ │ │ │ │ +281 // Dune2AlbertaNumbering │ │ │ │ │ +282 // --------------------- │ │ │ │ │ 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 │ │ │ │ │ -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 │ │ │ │ │ +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#ifdef CALL_EVERY_EL_INORDER │ │ │ │ │ -309 #undef CALL_EVERY_EL_INORDER │ │ │ │ │ -310#endif // CALL_EVERY_EL_INORDER │ │ │ │ │ +308 │ │ │ │ │ +309 // Generic2AlbertaNumbering │ │ │ │ │ +310 // ------------------------ │ │ │ │ │ 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#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 │ │ │ │ │ +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#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 │ │ │ │ │ -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 │ │ │ │ │ -351 │ │ │ │ │ -352#ifdef FOR_ALL_FREE_DOFS │ │ │ │ │ -353 #undef FOR_ALL_FREE_DOFS │ │ │ │ │ -354#endif // FOR_ALL_FREE_DOFS │ │ │ │ │ +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#ifdef DOWBM_FULL │ │ │ │ │ -357 #undef DOWBM_FULL │ │ │ │ │ -358#endif // DOWBM_FULL │ │ │ │ │ +356 │ │ │ │ │ +357 // NumberingMap │ │ │ │ │ +358 // ------------ │ │ │ │ │ 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 │ │ │ │ │ +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#ifdef ROW_LENGTH │ │ │ │ │ -369 #undef ROW_LENGTH │ │ │ │ │ -370#endif // ROW_LENGTH │ │ │ │ │ +368 int *dune2alberta_[ dim+1 ]; │ │ │ │ │ +369 int *alberta2dune_[ dim+1 ]; │ │ │ │ │ +370 int numSubEntities_[ dim+1 ]; │ │ │ │ │ 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 │ │ │ │ │ +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 │ │ │ │ │ -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 │ │ │ │ │ +_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#ifdef MESH_COARSENED │ │ │ │ │ -413 #undef MESH_COARSENED │ │ │ │ │ -414#endif // MESH_COARSENED │ │ │ │ │ +412 │ │ │ │ │ +413 // NumberingMap::Initialize │ │ │ │ │ +414 // ------------------------ │ │ │ │ │ 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 │ │ │ │ │ +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#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 │ │ │ │ │ +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#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 │ │ │ │ │ +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_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/a00656.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: indexstack.hh File Reference │ │ │ │ +dune-grid: coordcache.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,41 +72,40 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
indexstack.hh File Reference
│ │ │ │ +
coordcache.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 <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

class  Dune::IndexStack< T, length >
class  Dune::Alberta::CoordCache< dim >
 
class  Dune::Alberta::CoordCache< dim >::LocalCaching
 
struct  Dune::Alberta::CoordCache< dim >::Interpolation
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ 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,27 @@ │ │ │ │ │ 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 │ │ │ │ │ +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 │ │ │ │ │ -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_:_:_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 │ │ │ │ │   │ │ │ │ │ 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/a00656_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: indexstack.hh Source File │ │ │ │ +dune-grid: coordcache.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,257 +74,225 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
indexstack.hh
│ │ │ │ +
coordcache.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_COORDCACHE_HH
│ │ │ │ +
6#define DUNE_ALBERTA_COORDCACHE_HH
│ │ │ │
7
│ │ │ │ -
8#include <assert.h>
│ │ │ │ -
9#include <stack>
│ │ │ │ -
10
│ │ │ │ -
11#include <dune/common/exceptions.hh>
│ │ │ │ -
12#include <dune/common/reservedvector.hh>
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
11
│ │ │ │ +
12#if HAVE_ALBERTA
│ │ │ │
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; }
│ │ │ │ -
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 };
│ │ │ │ +
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;
│ │ │ │ +
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 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
│ │ │ │ -
67 inline ~IndexStack ();
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
70 inline void checkAndSetMax(T index) { if(index > maxIndex_) maxIndex_ = index;}
│ │ │ │ -
71
│ │ │ │ -
73 inline void setMaxIndex(T index) { maxIndex_ = index; }
│ │ │ │ +
69 private:
│ │ │ │ +
70 CoordVectorPointer coords_;
│ │ │ │ +
71 DofAccess dofAccess_;
│ │ │ │ +
72 };
│ │ │ │ +
│ │ │ │ +
73
│ │ │ │
74
│ │ │ │ -
76 inline int getMaxIndex() const { return maxIndex_; }
│ │ │ │ -
77
│ │ │ │ -
79 inline int size() const { return getMaxIndex(); }
│ │ │ │ -
80
│ │ │ │ -
82 inline T getIndex ();
│ │ │ │ -
83
│ │ │ │ -
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 }
│ │ │ │ +
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 // clear fullStacks
│ │ │ │ -
107 void clearStack ();
│ │ │ │ +
106 // CoordCache::Interpolation
│ │ │ │ +
107 // -------------------------
│ │ │ │
108
│ │ │ │ -
109 }; // end class IndexStack
│ │ │ │ -
│ │ │ │ -
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;
│ │ │ │ +
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 ];
│ │ │ │
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 }
│ │ │ │ -
│ │ │ │ -
156
│ │ │ │ -
157 template <class T, int length>
│ │ │ │ -
│ │ │ │ -
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 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 return ;
│ │ │ │ -
209 }
│ │ │ │ -
│ │ │ │ -
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
│ │ │ │ +
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#endif // #ifndef DUNE_ALBERTA_COORDCACHE_HH
│ │ │ │ +
provides a wrapper for ALBERTA's mesh 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
│ │ │ │ +
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,271 +1,259 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ +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 © 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_COORDCACHE_HH │ │ │ │ │ +6#define DUNE_ALBERTA_COORDCACHE_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10 │ │ │ │ │ -11#include │ │ │ │ │ -12#include │ │ │ │ │ +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 │ │ │ │ │ -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; } │ │ │ │ │ -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 }; │ │ │ │ │ +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; │ │ │ │ │ +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 │ │ │ │ │ +47 { │ │ │ │ │ +48 return (*this)( elementInfo._e_l(), vertex ); │ │ │ │ │ +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 │ │ │ │ │ -67 inline _~_I_n_d_e_x_S_t_a_c_k (); │ │ │ │ │ +_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 │ │ │ │ │ -_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; } │ │ │ │ │ +69 private: │ │ │ │ │ +70 CoordVectorPointer coords_; │ │ │ │ │ +71 _D_o_f_A_c_c_e_s_s dofAccess_; │ │ │ │ │ +72 }; │ │ │ │ │ +73 │ │ │ │ │ 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(); } │ │ │ │ │ -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); │ │ │ │ │ -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 } │ │ │ │ │ +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 // clear fullStacks │ │ │ │ │ -107 void clearStack (); │ │ │ │ │ +106 // CoordCache::Interpolation │ │ │ │ │ +107 // ------------------------- │ │ │ │ │ 108 │ │ │ │ │ -109 }; // end class IndexStack │ │ │ │ │ -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; │ │ │ │ │ +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 ]; │ │ │ │ │ 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 ) │ │ │ │ │ -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 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 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 │ │ │ │ │ +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#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 │ │ │ │ │ _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_:_:_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/a00659.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: algebra.hh File Reference │ │ │ │ +dune-grid: transformation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,76 +70,34 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Namespaces | │ │ │ │ -Functions
│ │ │ │ -
algebra.hh File Reference
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
transformation.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ +#include <dune/grid/albertagrid/misc.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ +Classes

class  Dune::AlbertaTransformation
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ 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)
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,77 +1,21 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +transformation.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> │ │ │ │ │ _G_o_ _t_o_ _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. │ │ │ │ │   │ │ │ │ │ -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) │ │ │ │ │ -  │ │ │ │ │ =============================================================================== │ │ │ │ │ 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: algebra.hh Source File │ │ │ │ +dune-grid: transformation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,197 +74,119 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
algebra.hh
│ │ │ │ +
transformation.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_ALBERTA_TRANSFORMATION_HH
│ │ │ │ +
6#define DUNE_ALBERTA_TRANSFORMATION_HH
│ │ │ │
7
│ │ │ │
8#include <dune/common/fvector.hh>
│ │ │ │ -
9#include <dune/common/fmatrix.hh>
│ │ │ │ -
10
│ │ │ │ -
11namespace Dune
│ │ │ │ -
12{
│ │ │ │ +
9
│ │ │ │ + │ │ │ │ +
11
│ │ │ │ +
12#if HAVE_ALBERTA
│ │ │ │
13
│ │ │ │ -
14 namespace Alberta
│ │ │ │ -
15 {
│ │ │ │ +
14namespace Dune
│ │ │ │ +
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 }
│ │ │ │ -
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
18 {
│ │ │ │ + │ │ │ │ +
20
│ │ │ │ +
21 public:
│ │ │ │ + │ │ │ │ +
23
│ │ │ │ +
24 static const int dimension = Alberta::dimWorld;
│ │ │ │ +
25
│ │ │ │ +
26 typedef FieldVector< ctype, dimension > WorldVector;
│ │ │ │
27
│ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ -
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 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
│ │ │ │ +
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
│ │ │ │ + │ │ │ │
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
│ │ │ │ +
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
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,179 +1,133 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ +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 © 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_ALBERTA_TRANSFORMATION_HH │ │ │ │ │ +6#define DUNE_ALBERTA_TRANSFORMATION_HH │ │ │ │ │ 7 │ │ │ │ │ 8#include │ │ │ │ │ -9#include │ │ │ │ │ -10 │ │ │ │ │ -11namespace _D_u_n_e │ │ │ │ │ -12{ │ │ │ │ │ +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 │ │ │ │ │ -14 namespace Alberta │ │ │ │ │ -15 { │ │ │ │ │ +14namespace _D_u_n_e │ │ │ │ │ +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 } │ │ │ │ │ +_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 │ │ │ │ │ -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 ); │ │ │ │ │ +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 │ │ │ │ │ -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 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 │ │ │ │ │ +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 │ │ │ │ │ _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_:_:_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 │ │ │ │ │ =============================================================================== │ │ │ │ │ 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: level.hh File Reference │ │ │ │ +dune-grid: elementinfo.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,42 +72,50 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
level.hh File Reference
│ │ │ │ +
elementinfo.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ + │ │ │ │ +

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

│ │ │ │
#include <cassert>
│ │ │ │ -#include <cstdlib>
│ │ │ │ -#include <dune/grid/albertagrid/meshpointer.hh>
│ │ │ │ -#include <dune/grid/albertagrid/dofadmin.hh>
│ │ │ │ -#include <dune/grid/albertagrid/dofvector.hh>
│ │ │ │ +#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::AlbertaGridLevelProvider< dim >
class  Dune::Alberta::ElementInfo< dim >
 
class  Dune::AlbertaGridLevelProvider< dim >::SetLocal
struct  Dune::Alberta::ElementInfo< dim >::Instance
 
class  Dune::AlbertaGridLevelProvider< dim >::CalcMaxLevel
class  Dune::Alberta::ElementInfo< dim >::Stack
 
struct  Dune::AlbertaGridLevelProvider< dim >::Interpolation
struct  Dune::Alberta::ElementInfo< dim >::Seed
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ 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 {} │ │ │ │ │ @@ -2,29 +2,36 @@ │ │ │ │ │ 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 │ │ │ │ │ +elementinfo.hh File Reference │ │ │ │ │ +provides a wrapper for ALBERTA's el_info 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_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> │ │ │ │ │ +#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_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_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _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 │ │ │ │ │ +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_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_:_:_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_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 │ │ │ │ │ +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. │ │ │ │ │   │ │ │ │ │ +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/a00662_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: level.hh Source File │ │ │ │ +dune-grid: elementinfo.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,327 +74,1228 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
level.hh
│ │ │ │ +
elementinfo.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_ELEMENTINFO_HH
│ │ │ │ +
6#define DUNE_ALBERTA_ELEMENTINFO_HH
│ │ │ │
7
│ │ │ │ -
8#include <cassert>
│ │ │ │ -
9#include <cstdlib>
│ │ │ │ -
10
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
14
│ │ │ │ -
15#if HAVE_ALBERTA
│ │ │ │ +
13#include <cassert>
│ │ │ │ +
14#include <vector>
│ │ │ │ +
15#include <utility>
│ │ │ │
16
│ │ │ │ -
17namespace Dune
│ │ │ │ -
18{
│ │ │ │ + │ │ │ │ + │ │ │ │
19
│ │ │ │ -
20 // AlbertaGridLevelProvider
│ │ │ │ -
21 // ------------------------
│ │ │ │ -
22
│ │ │ │ -
23 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
25 {
│ │ │ │ - │ │ │ │ +
20#if HAVE_ALBERTA
│ │ │ │ +
21
│ │ │ │ +
22namespace Dune
│ │ │ │ +
23{
│ │ │ │ +
24
│ │ │ │ +
25 namespace Alberta
│ │ │ │ +
26 {
│ │ │ │
27
│ │ │ │ -
28 typedef unsigned char Level;
│ │ │ │ -
29
│ │ │ │ - │ │ │ │ - │ │ │ │ -
32
│ │ │ │ - │ │ │ │ -
34
│ │ │ │ -
35 static const Level isNewFlag = (1 << 7);
│ │ │ │ -
36 static const Level levelMask = (1 << 7) - 1;
│ │ │ │ +
28 // External Forward Declarations
│ │ │ │ +
29 // -----------------------------
│ │ │ │ +
30
│ │ │ │ +
31 template< int dim >
│ │ │ │ +
32 class MeshPointer;
│ │ │ │ +
33
│ │ │ │ +
34 struct BasicNodeProjection;
│ │ │ │ +
35
│ │ │ │ +
36
│ │ │ │
37
│ │ │ │ -
38 class SetLocal;
│ │ │ │ -
39 class CalcMaxLevel;
│ │ │ │ +
38 // ElementInfo
│ │ │ │ +
39 // -----------
│ │ │ │
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 }
│ │ │ │ -
│ │ │ │ +
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 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 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
│ │ │ │ +
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 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
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
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 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
│ │ │ │ +
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;
│ │ │ │ +
105
│ │ │ │ +
│ │ │ │ +
106 int level () const;
│ │ │ │ +
107 // see ALBERTA documentation for definition of element type
│ │ │ │ +
108 // values are 0, 1, 2
│ │ │ │
│ │ │ │ -
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:
│ │ │ │ +
109 int type () const;
│ │ │ │ +
110
│ │ │ │ +
│ │ │ │ +
111 int getMark () const;
│ │ │ │ +
│ │ │ │ +
112 void setMark ( int refCount ) const;
│ │ │ │ +
113
│ │ │ │ +
│ │ │ │ +
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 explicit SetLocal ( const DofVectorPointer &level )
│ │ │ │ -
133 : level_( level ),
│ │ │ │ -
134 dofAccess_( level.dofSpace() )
│ │ │ │ -
135 {}
│ │ │ │ -
│ │ │ │ +
132 bool isBoundary ( int face ) const;
│ │ │ │ +
│ │ │ │ +
133 int boundaryId ( int face ) const;
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │
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 }
│ │ │ │ +
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 }
│ │ │ │
│ │ │ │ -
142 };
│ │ │ │ -
│ │ │ │ -
143
│ │ │ │ -
144
│ │ │ │ +
144#endif
│ │ │ │
145
│ │ │ │ -
146 // AlbertaGridLevelProvider::CalcMaxLevel
│ │ │ │ -
147 // --------------------------------------
│ │ │ │ +
146 template< class Functor >
│ │ │ │ +
│ │ │ │ +
147 void hierarchicTraverse ( Functor &functor ) const;
│ │ │ │
148
│ │ │ │ -
149 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
151 {
│ │ │ │ -
152 Level maxLevel_;
│ │ │ │ -
153
│ │ │ │ -
154 public:
│ │ │ │ +
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;
│ │ │ │
│ │ │ │ - │ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ +
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 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 Level maxLevel () const
│ │ │ │ -
170 {
│ │ │ │ -
171 return maxLevel_;
│ │ │ │ -
172 }
│ │ │ │ -
│ │ │ │ -
173 };
│ │ │ │ -
│ │ │ │ +
169 void addReference () const;
│ │ │ │ +
170 void removeReference () const;
│ │ │ │ +
171
│ │ │ │ +
172 static InstancePtr null ();
│ │ │ │ +
173 static Stack &stack ();
│ │ │ │
174
│ │ │ │ -
175
│ │ │ │ -
176
│ │ │ │ -
177 // AlbertaGridLevelProvider::ClearFlags
│ │ │ │ -
178 // ------------------------------------
│ │ │ │ +
175 InstancePtr instance_;
│ │ │ │ +
176 };
│ │ │ │ +
177
│ │ │ │ +
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;
│ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ +
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 // ------------------
│ │ │ │
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 }
│ │ │ │ +
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
│ │ │ │
│ │ │ │ -
220 };
│ │ │ │
│ │ │ │ -
221
│ │ │ │ -
222}
│ │ │ │ -
223
│ │ │ │ -
224#endif // #if HAVE_ALBERTA
│ │ │ │ -
225
│ │ │ │ -
226#endif
│ │ │ │ - │ │ │ │ - │ │ │ │ -
provides a wrapper for ALBERTA's mesh structure
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
#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 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
│ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ +
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
│ │ │ │ -
Definition refinement.hh:40
│ │ │ │ -
int count() const
Definition refinement.hh:67
│ │ │ │ +
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,355 +1,1211 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ +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 © 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_ELEMENTINFO_HH │ │ │ │ │ +6#define DUNE_ALBERTA_ELEMENTINFO_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_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 │ │ │ │ │ +13#include │ │ │ │ │ +14#include │ │ │ │ │ +15#include │ │ │ │ │ 16 │ │ │ │ │ -17namespace _D_u_n_e │ │ │ │ │ -18{ │ │ │ │ │ +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 // 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; │ │ │ │ │ +20#if HAVE_ALBERTA │ │ │ │ │ +21 │ │ │ │ │ +22namespace _D_u_n_e │ │ │ │ │ +23{ │ │ │ │ │ +24 │ │ │ │ │ +25 namespace Alberta │ │ │ │ │ +26 { │ │ │ │ │ 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; │ │ │ │ │ +28 // External Forward Declarations │ │ │ │ │ +29 // ----------------------------- │ │ │ │ │ +30 │ │ │ │ │ +31 template< int dim > │ │ │ │ │ +32 class MeshPointer; │ │ │ │ │ +33 │ │ │ │ │ +34 struct BasicNodeProjection; │ │ │ │ │ +35 │ │ │ │ │ +36 │ │ │ │ │ 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; │ │ │ │ │ +38 // ElementInfo │ │ │ │ │ +39 // ----------- │ │ │ │ │ 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 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 } │ │ │ │ │ +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 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 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 {} │ │ │ │ │ +_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 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 │ │ │ │ │ +_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; │ │ │ │ │ +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 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 │ │ │ │ │ +_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 // AlbertaGridLevelProvider::CalcMaxLevel │ │ │ │ │ -147 // -------------------------------------- │ │ │ │ │ +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< 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 } │ │ │ │ │ +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 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 │ │ │ │ │ -_1_6_9 Level _m_a_x_L_e_v_e_l () const │ │ │ │ │ -170 { │ │ │ │ │ -171 return maxLevel_; │ │ │ │ │ -172 } │ │ │ │ │ -173 }; │ │ │ │ │ +169 void addReference () const; │ │ │ │ │ +170 void removeReference () const; │ │ │ │ │ +171 │ │ │ │ │ +172 static InstancePtr null (); │ │ │ │ │ +173 static Stack &stack (); │ │ │ │ │ 174 │ │ │ │ │ -175 │ │ │ │ │ -176 │ │ │ │ │ -177 // AlbertaGridLevelProvider::ClearFlags │ │ │ │ │ -178 // ------------------------------------ │ │ │ │ │ +175 InstancePtr instance_; │ │ │ │ │ +176 }; │ │ │ │ │ +177 │ │ │ │ │ +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 │ │ │ │ │ +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 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; │ │ │ │ │ +_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_; │ │ │ │ │ +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 // ------------------ │ │ │ │ │ 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} │ │ │ │ │ +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#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 │ │ │ │ │ +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 │ │ │ │ │ +_A_L_B_E_R_T_A │ │ │ │ │ +#define ALBERTA │ │ │ │ │ +DDeeffiinniittiioonn albertaheader.hh:29 │ │ │ │ │ +_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_:_:_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_:_:_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_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 │ │ │ │ │ +_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 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 │ │ │ │ │ +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_:_:_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 │ │ │ │ │ +_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/a00665.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: intersection.cc File Reference │ │ │ │ +dune-grid: leafiterator.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,56 +71,36 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces | │ │ │ │ -Macros
│ │ │ │ -
intersection.cc File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
leafiterator.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/grid/albertagrid/intersection.hh>
│ │ │ │ +
#include <dune/grid/common/entityiterator.hh>
│ │ │ │ +#include <dune/grid/albertagrid/treeiterator.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

struct  Dune::AlbertaGridIntersectionBase< Grid >::GlobalCoordReader< GridImp >
class  Dune::AlbertaGridLeafIterator< codim, pitype, GridImp >
 
struct  Dune::AlbertaGridIntersectionBase< Grid >::LocalCoordReader< GridImp >
class  Dune::AlbertaGridLeafIterator< codim, Ghost_Partition, GridImp >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ │ 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,23 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ +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 │ │ │ │ │ -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 │ │ │ │ │ - _> │ │ │ │ │ +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_ _> │ │ │ │ │   │ │ │ │ │ -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_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___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/a00665_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: intersection.cc Source File │ │ │ │ +dune-grid: leafiterator.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,618 +74,146 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
intersection.cc
│ │ │ │ +
leafiterator.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_LEAFITERATOR_HH
│ │ │ │ +
6#define DUNE_ALBERTA_LEAFITERATOR_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ + │ │ │ │
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 {}
│ │ │ │ -
│ │ │ │ -
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
│ │ │ │ + │ │ │ │ +
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
│ │ │ │
│ │ │ │ - │ │ │ │ -
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 );
│ │ │ │ +
35 AlbertaGridLeafIterator ( const GridImp &grid, int level )
│ │ │ │ +
36 : Base( grid, level )
│ │ │ │ +
37 {}
│ │ │ │ +
│ │ │ │ +
38
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ +
61 public:
│ │ │ │ +
62 typedef typename Base::Entity Entity;
│ │ │ │ + │ │ │ │ +
64
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
66 {}
│ │ │ │ +
│ │ │ │ +
67
│ │ │ │
│ │ │ │ -
69 return projection->boundaryIndex();
│ │ │ │ -
70 }
│ │ │ │ -
71
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
73 template< class Grid >
│ │ │ │ +
69 AlbertaGridLeafIterator ( const GridImp &grid, int level )
│ │ │ │ +
70 : Base( grid, level )
│ │ │ │ +
71 {}
│ │ │ │ +
│ │ │ │ +
72
│ │ │ │
│ │ │ │ - │ │ │ │ -
75 {
│ │ │ │ -
│ │ │ │ -
76 const int face = (dimension > 1 ? oppVertex_ : 1-oppVertex_);
│ │ │ │ -
│ │ │ │ -
77 return grid().alberta2generic( 1, face );
│ │ │ │ -
│ │ │ │ -
78 }
│ │ │ │ +
74 AlbertaGridLeafIterator ( const GridImp &grid,
│ │ │ │ +
75 const MarkerVector *,
│ │ │ │ +
76 int level )
│ │ │ │ +
77 : Base( grid, level )
│ │ │ │ +
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
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ +
81 void increment ()
│ │ │ │ +
82 {
│ │ │ │ + │ │ │ │ +
84 }
│ │ │ │
│ │ │ │ +
85 };
│ │ │ │
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ │ +
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
│ │ │ │
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
│ │ │ │ - │ │ │ │ +
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,671 +1,176 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ +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 © 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_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_/_i_n_t_e_r_s_e_c_t_i_o_n_._h_h> │ │ │ │ │ +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 │ │ │ │ │ -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 {} │ │ │ │ │ -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 │ │ │ │ │ -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 } │ │ │ │ │ -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 } │ │ │ │ │ +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 │ │ │ │ │ +_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 │ │ │ │ │ +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 _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_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 } │ │ │ │ │ +_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 │ │ │ │ │ -_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 │ │ │ │ │ +87} │ │ │ │ │ +88 │ │ │ │ │ +89#endif // #if HAVE_ALBERTA │ │ │ │ │ +90 │ │ │ │ │ +91#endif // #ifndef DUNE_ALBERTA_LEAFITERATOR_HH │ │ │ │ │ +_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_:_:_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 │ │ │ │ │ +_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 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 │ │ │ │ │ +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 │ │ │ │ │ +_e_n_t_i_t_y_i_t_e_r_a_t_o_r_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ 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: geometry.cc File Reference │ │ │ │ +dune-grid: macrodata.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,58 +71,47 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces | │ │ │ │ -Macros
│ │ │ │ -
geometry.cc File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
macrodata.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/grid/albertagrid/algebra.hh>
│ │ │ │ -#include <dune/grid/albertagrid/geometry.hh>
│ │ │ │ -#include <dune/grid/albertagrid/refinement.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.

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

│ │ │ │ Classes

struct  Dune::AlbertaGridLocalGeometryProvider< Grid >::GeoInFatherCoordReader< Grid >
class  Dune::Alberta::MacroData< dim >
 
struct  Dune::AlbertaGridLocalGeometryProvider< Grid >::FaceCoordReader< Grid >
struct  Dune::Alberta::MacroData< dim >::Library< int >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

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

Detailed Description

│ │ │ │ +

provides a wrapper for ALBERTA's macro_data structure

│ │ │ │ +
Author
Martin Nolte
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,32 +1,33 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +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_/_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> │ │ │ │ │ +#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_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_:_:_M_a_c_r_o_D_a_t_a_<_ _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 │ │ │ │ │ - _> │ │ │ │ │ +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. │ │ │ │ │   │ │ │ │ │ -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 │ │ │ │ │ +********** 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: geometry.cc Source File │ │ │ │ +dune-grid: macrodata.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,344 +74,518 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
geometry.cc
│ │ │ │ +
macrodata.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_MACRODATA_HH
│ │ │ │ +
6#define DUNE_ALBERTA_MACRODATA_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
│ │ │ │ -
31
│ │ │ │ -
32 template< int mydim, int cdim, class GridImp >
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
35 {
│ │ │ │ -
36 GlobalCoordinate y = corner( 0 );
│ │ │ │ -
37 jacobianTransposed().umtv( local, y );
│ │ │ │ -
38 return y;
│ │ │ │ -
39 }
│ │ │ │ -
│ │ │ │ +
13#include <dune/common/fvector.hh>
│ │ │ │ +
14#include <dune/common/fmatrix.hh>
│ │ │ │ +
15
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
19
│ │ │ │ +
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 static const int initialSize = 4096;
│ │ │ │
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 }
│ │ │ │ -
│ │ │ │ +
41 public:
│ │ │ │ +
42 template< int >
│ │ │ │ +
43 struct Library;
│ │ │ │ +
44
│ │ │ │ +
45 template< int > friend struct InstantiateMacroDataLibrary;
│ │ │ │ +
46
│ │ │ │ +
47 public:
│ │ │ │ +
48 typedef int ElementId[ numVertices ];
│ │ │ │ +
49
│ │ │ │ +
50 static const int supportPeriodicity = 1;
│ │ │ │
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 >
│ │ │ │ - │ │ │ │ +
│ │ │ │ + │ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ +
67
│ │ │ │ +
│ │ │ │ +
68 int elementCount () const
│ │ │ │ +
69 {
│ │ │ │ +
70 return (elementCount_ < 0 ? data_->n_macro_elements : elementCount_);
│ │ │ │ +
71 }
│ │ │ │ +
│ │ │ │ +
72
│ │ │ │
│ │ │ │ - │ │ │ │ -
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:
│ │ │ │ - │ │ │ │ +
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 ();
│ │ │ │ +
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 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 // -------------------------------------------------
│ │ │ │ +
│ │ │ │ +
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 );
│ │ │ │ +
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 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
│ │ │ │ +
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 );
│ │ │ │ +
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
│ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ + │ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
int applyInverseTwist(int twist, int i)
Definition misc.hh:637
│ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ +
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
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,393 +1,531 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ +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 © 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_MACRODATA_HH │ │ │ │ │ +6#define DUNE_ALBERTA_MACRODATA_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> │ │ │ │ │ -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 │ │ │ │ │ -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 } │ │ │ │ │ +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#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 static const int initialSize = 4096; │ │ │ │ │ 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 } │ │ │ │ │ +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; │ │ │ │ │ +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 │ │ │ │ │ -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; │ │ │ │ │ +_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 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; │ │ │ │ │ +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 if( data_ != NULL ) │ │ │ │ │ +130 { │ │ │ │ │ +131 _A_L_B_E_R_T_A free_macro_data( data_ ); │ │ │ │ │ +132 data_ = NULL; │ │ │ │ │ +133 } │ │ │ │ │ +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_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 │ │ │ │ │ -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 // ------------------------------------------------- │ │ │ │ │ +_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 ); │ │ │ │ │ +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 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 │ │ │ │ │ +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 ); │ │ │ │ │ +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 │ │ │ │ │ +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 } │ │ │ │ │ +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_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 │ │ │ │ │ +_m_i_s_c_._h_h │ │ │ │ │ _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 │ │ │ │ │ _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_:_:_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_:_:_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_:_:_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 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00671.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: hierarchiciterator.hh File Reference │ │ │ │ +dune-grid: intersection.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,34 +71,56 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces
│ │ │ │ -
hierarchiciterator.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Macros
│ │ │ │ +
intersection.cc File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/grid/albertagrid/elementinfo.hh>
│ │ │ │ -#include <dune/grid/common/entityiterator.hh>
│ │ │ │ +
#include <dune/grid/albertagrid/intersection.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::AlbertaGridHierarchicIterator< GridImp >
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

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
#define DUNE_ALBERTA_INTERSECTION_CC
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,21 +1,29 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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> │ │ │ │ │ -#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> │ │ │ │ │ +_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_. │ │ │ │ │ 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_ _> │ │ │ │ │ +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/a00671_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: hierarchiciterator.hh Source File │ │ │ │ +dune-grid: intersection.cc Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,210 +74,618 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
hierarchiciterator.hh
│ │ │ │ +
intersection.cc
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_INTERSECTION_CC
│ │ │ │ +
6#define DUNE_ALBERTA_INTERSECTION_CC
│ │ │ │
7
│ │ │ │ - │ │ │ │ - │ │ │ │ -
10
│ │ │ │ -
11#if HAVE_ALBERTA
│ │ │ │ + │ │ │ │ +
9
│ │ │ │ +
10namespace Dune
│ │ │ │ +
11{
│ │ │ │
12
│ │ │ │ -
13namespace Dune
│ │ │ │ -
14{
│ │ │ │ +
13 // AlbertaGridIntersectionBase
│ │ │ │ +
14 // ---------------------------
│ │ │ │
15
│ │ │ │ -
16 // AlbertaGridHierarchicIterator
│ │ │ │ -
17 // -----------------------------
│ │ │ │ -
18
│ │ │ │ -
27 template< class GridImp >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
29 {
│ │ │ │ - │ │ │ │ +
16 template< class Grid >
│ │ │ │ +
17 inline AlbertaGridIntersectionBase< Grid >
│ │ │ │ +
│ │ │ │ +
18 ::AlbertaGridIntersectionBase ()
│ │ │ │ +
19 : grid_( nullptr ),
│ │ │ │ +
20 elementInfo_(),
│ │ │ │ +
21 oppVertex_( -1 ) // mark invalid intersection
│ │ │ │ +
22 {}
│ │ │ │ +
│ │ │ │ +
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 public:
│ │ │ │ -
33 typedef typename GridImp::template Codim<0>::Entity Entity;
│ │ │ │ -
34 typedef typename GridImp::ctype ctype;
│ │ │ │ -
35
│ │ │ │ - │ │ │ │ - │ │ │ │ -
38
│ │ │ │ -
39 typedef typename EntityImp::ElementInfo ElementInfo;
│ │ │ │ +
32
│ │ │ │ +
33 template< class Grid >
│ │ │ │ +
34 inline typename Grid::template Codim< 0 >::Entity
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
36 {
│ │ │ │ + │ │ │ │ +
38 return EntityImp( grid(), elementInfo(), 0 );
│ │ │ │ +
39 }
│ │ │ │ +
│ │ │ │
40
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
42 {}
│ │ │ │ -
│ │ │ │ -
43
│ │ │ │ -
45 AlbertaGridHierarchicIterator ( const GridImp &grid,
│ │ │ │ -
46 const ElementInfo &elementInfo,
│ │ │ │ -
47 int maxLevel );
│ │ │ │ +
41
│ │ │ │ +
42 template< class Grid >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
44 {
│ │ │ │ +
45 return elementInfo().isBoundary( oppVertex_ );
│ │ │ │ +
46 }
│ │ │ │ +
│ │ │ │ +
47
│ │ │ │
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 equals ( const This &other ) const
│ │ │ │ -
63 {
│ │ │ │ -
64 return entity_.impl().equals( other.entity_.impl() );
│ │ │ │ -
65 }
│ │ │ │ +
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 }
│ │ │ │
│ │ │ │ -
66
│ │ │ │ +
61
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
63 template< class Grid >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
65 {
│ │ │ │ +
│ │ │ │ +
66 assert( boundary() );
│ │ │ │ +
67 const Alberta::BasicNodeProjection *projection = elementInfo().boundaryProjection( oppVertex_ );
│ │ │ │
│ │ │ │ - │ │ │ │ -
69 {
│ │ │ │ -
70 return entity_;
│ │ │ │ -
71 }
│ │ │ │ -
│ │ │ │ -
72
│ │ │ │ +
68 assert( projection );
│ │ │ │ +
│ │ │ │ +
69 return projection->boundaryIndex();
│ │ │ │ +
70 }
│ │ │ │ +
71
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
73 template< class Grid >
│ │ │ │
│ │ │ │ -
74 int level () const
│ │ │ │ -
75 {
│ │ │ │ -
76 return entity_.impl().level();
│ │ │ │ -
77 }
│ │ │ │ -
│ │ │ │ -
78
│ │ │ │ -
79 protected:
│ │ │ │ + │ │ │ │ +
75 {
│ │ │ │ +
│ │ │ │ +
76 const int face = (dimension > 1 ? oppVertex_ : 1-oppVertex_);
│ │ │ │ +
│ │ │ │ +
77 return grid().alberta2generic( 1, face );
│ │ │ │ +
│ │ │ │ +
78 }
│ │ │ │ +
79
│ │ │ │ +
│ │ │ │ + │ │ │ │
│ │ │ │ -
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_;
│ │ │ │ +
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 // maximal level to go down to
│ │ │ │ -
95 int maxlevel_;
│ │ │ │ -
96 };
│ │ │ │ -
│ │ │ │ +
94 const int face = indexInInside();
│ │ │ │ +
95 auto refSimplex = ReferenceElements< ctype, dimension >::simplex();
│ │ │ │ +
96 FieldVector< ctype, dimension > refNormal = refSimplex.integrationOuterNormal( face );
│ │ │ │
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 {}
│ │ │ │ +
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 }
│ │ │ │
│ │ │ │ -
106
│ │ │ │
107
│ │ │ │ -
108 template< class GridImp >
│ │ │ │ - │ │ │ │ +
108 template<>
│ │ │ │ + │ │ │ │
│ │ │ │ - │ │ │ │ -
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() )
│ │ │ │ +
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 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
│ │ │ │ +
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#endif // #ifndef DUNE_ALBERTA_HIERARCHICITERATOR_HH
│ │ │ │ -
provides a wrapper for ALBERTA's el_info structure
│ │ │ │ +
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
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ │
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:1122
│ │ │ │ - │ │ │ │ +
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,224 +1,671 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ +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 © 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_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_/_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 │ │ │ │ │ +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 │ │ │ │ │ -13namespace _D_u_n_e │ │ │ │ │ -14{ │ │ │ │ │ +13 // AlbertaGridIntersectionBase │ │ │ │ │ +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; │ │ │ │ │ +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 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 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; │ │ │ │ │ +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 │ │ │ │ │ -_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 ); │ │ │ │ │ +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 │ │ │ │ │ -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 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 } │ │ │ │ │ -72 │ │ │ │ │ -_7_4 int _l_e_v_e_l () const │ │ │ │ │ +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 │ │ │ │ │ +_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 { │ │ │ │ │ -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_; │ │ │ │ │ +_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 // maximal level to go down to │ │ │ │ │ -95 int maxlevel_; │ │ │ │ │ -96 }; │ │ │ │ │ +94 const int face = indexInInside(); │ │ │ │ │ +95 auto refSimplex = ReferenceElements< ctype, dimension >::simplex(); │ │ │ │ │ +96 FieldVector< ctype, dimension > refNormal = │ │ │ │ │ +refSimplex.integrationOuterNormal( face ); │ │ │ │ │ 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 │ │ │ │ │ +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< 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() ) │ │ │ │ │ +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 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 │ │ │ │ │ +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#endif // #ifndef DUNE_ALBERTA_HIERARCHICITERATOR_HH │ │ │ │ │ -_e_l_e_m_e_n_t_i_n_f_o_._h_h │ │ │ │ │ -provides a wrapper for ALBERTA's el_info structure │ │ │ │ │ +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 │ │ │ │ │ _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 │ │ │ │ │ -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 │ │ │ │ │ -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:1122 │ │ │ │ │ -_e_n_t_i_t_y_i_t_e_r_a_t_o_r_._h_h │ │ │ │ │ +_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/a00674.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: refinement.hh File Reference │ │ │ │ +dune-grid: geometrycache.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,58 +72,37 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
refinement.hh File Reference
│ │ │ │ +
geometrycache.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/grid/albertagrid/misc.hh>
│ │ │ │ +#include <dune/grid/albertagrid/algebra.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 >
class  Dune::Alberta::GeometryCache< dim >
 
struct  Dune::Alberta::GeometryInFather< 3 >
struct  Dune::Alberta::GeometryCacheProxy< dim >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ 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,24 @@ │ │ │ │ │ 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 │ │ │ │ │ +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_/_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> │ │ │ │ │ _G_o_ _t_o_ _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_ _> │ │ │ │ │ + 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_:_:_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_ _> │ │ │ │ │ +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_ _> │ │ │ │ │   │ │ │ │ │ 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/a00674_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: refinement.hh Source File │ │ │ │ +dune-grid: geometrycache.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,454 +74,187 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
refinement.hh
│ │ │ │ +
geometrycache.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_GEOMETRYCACHE_HH
│ │ │ │ +
6#define DUNE_ALBERTA_GEOMETRYCACHE_HH
│ │ │ │
7
│ │ │ │ -
14#include <cassert>
│ │ │ │ + │ │ │ │ + │ │ │ │ +
10
│ │ │ │ +
11#if HAVE_ALBERTA
│ │ │ │ +
12
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │
15
│ │ │ │ - │ │ │ │ - │ │ │ │ +
16 namespace Alberta
│ │ │ │ +
17 {
│ │ │ │
18
│ │ │ │ -
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 >
│ │ │ │ - │ │ │ │ +
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
│ │ │ │ -
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;
│ │ │ │ -
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 );
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
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
│ │ │ │ -
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 }
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
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 };
│ │ │ │
│ │ │ │ +
83
│ │ │ │ +
84
│ │ │ │
85
│ │ │ │ -
86 template< int codim, class Functor >
│ │ │ │ -
│ │ │ │ -
87 void forEachInteriorSubChild ( Functor &functor ) const
│ │ │ │ -
88 {
│ │ │ │ - │ │ │ │ -
90 }
│ │ │ │ -
│ │ │ │ -
91 };
│ │ │ │ -
│ │ │ │ -
92
│ │ │ │ -
93
│ │ │ │ -
94 template< int dim >
│ │ │ │ +
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 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 }
│ │ │ │ +
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 }
│ │ │ │
│ │ │ │ -
122
│ │ │ │ +
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 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
│ │ │ │ +
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_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 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,454 +1,210 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ +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 © 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_GEOMETRYCACHE_HH │ │ │ │ │ +6#define DUNE_ALBERTA_GEOMETRYCACHE_HH │ │ │ │ │ 7 │ │ │ │ │ -14#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#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#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> │ │ │ │ │ +16 namespace Alberta │ │ │ │ │ +17 { │ │ │ │ │ 18 │ │ │ │ │ -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; │ │ │ │ │ +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 │ │ │ │ │ -33 │ │ │ │ │ -34 │ │ │ │ │ -35 // Patch │ │ │ │ │ -36 // ----- │ │ │ │ │ -37 │ │ │ │ │ -38 template< int dim > │ │ │ │ │ -_3_9 class _P_a_t_c_h │ │ │ │ │ +_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 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 ); │ │ │ │ │ +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 _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 } │ │ │ │ │ +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 }; │ │ │ │ │ +83 │ │ │ │ │ +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 │ │ │ │ │ +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 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 │ │ │ │ │ +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 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 │ │ │ │ │ -_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 │ │ │ │ │ +124#endif // #if HAVE_ALBERTA │ │ │ │ │ +125 │ │ │ │ │ +126#endif // #ifndef DUNE_ALBERTA_GEOMETRYCACHE_HH │ │ │ │ │ _A_L_B_E_R_T_A │ │ │ │ │ #define ALBERTA │ │ │ │ │ DDeeffiinniittiioonn albertaheader.hh:29 │ │ │ │ │ +_m_i_s_c_._h_h │ │ │ │ │ +_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_:_:_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 │ │ │ │ │ -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 │ │ │ │ │ +_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/a00677.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: macrodata.hh File Reference │ │ │ │ +dune-grid: dofvector.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,47 +71,59 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces
│ │ │ │ -
macrodata.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Functions
│ │ │ │ +
dofvector.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ - │ │ │ │ -

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>
│ │ │ │ +
#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::MacroData< dim >
struct  Dune::Alberta::DofVectorProvider< int >
 
struct  Dune::Alberta::DofVectorProvider< signed char >
 
struct  Dune::Alberta::DofVectorProvider< unsigned char >
 
struct  Dune::Alberta::MacroData< dim >::Library< int >
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

│ │ │ │ -

provides a wrapper for ALBERTA's macro_data structure

│ │ │ │ -
Author
Martin Nolte
│ │ │ │ -
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,33 +1,43 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ -macrodata.hh File Reference │ │ │ │ │ -provides a wrapper for ALBERTA's macro_data structure _M_o_r_e_._._. │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ │ +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_/_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_/_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_:_:_M_a_c_r_o_D_a_t_a_<_ _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_:_:_M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _>_:_:_L_i_b_r_a_r_y_<_ _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 │ │ │ │ │   │ │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -provides a wrapper for ALBERTA's macro_data structure │ │ │ │ │ - Author │ │ │ │ │ - Martin Nolte │ │ │ │ │ +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/a00677_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: macrodata.hh Source File │ │ │ │ +dune-grid: dofvector.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,518 +74,532 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
macrodata.hh
│ │ │ │ +
dofvector.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_ALBERTA_DOFVECTOR_HH
│ │ │ │ +
6#define DUNE_ALBERTA_DOFVECTOR_HH
│ │ │ │
7
│ │ │ │ -
13#include <dune/common/fvector.hh>
│ │ │ │ -
14#include <dune/common/fmatrix.hh>
│ │ │ │ -
15
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
8#include <cstdlib>
│ │ │ │ +
9#include <limits>
│ │ │ │ +
10
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
14
│ │ │ │ +
15#if HAVE_ALBERTA
│ │ │ │ +
16
│ │ │ │ +
17namespace Dune
│ │ │ │ +
18{
│ │ │ │
19
│ │ │ │ -
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 static const int initialSize = 4096;
│ │ │ │ -
40
│ │ │ │ -
41 public:
│ │ │ │ -
42 template< int >
│ │ │ │ -
43 struct Library;
│ │ │ │ -
44
│ │ │ │ -
45 template< int > friend struct InstantiateMacroDataLibrary;
│ │ │ │ +
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 public:
│ │ │ │ -
48 typedef int ElementId[ numVertices ];
│ │ │ │ -
49
│ │ │ │ -
50 static const int supportPeriodicity = 1;
│ │ │ │ +
│ │ │ │ +
47 static void free ( DofVector *dofVector )
│ │ │ │ +
48 {
│ │ │ │ +
49 ALBERTA free_dof_int_vec( dofVector );
│ │ │ │ +
50 }
│ │ │ │ +
│ │ │ │
51
│ │ │ │
│ │ │ │ - │ │ │ │ -
53 : data_( NULL ),
│ │ │ │ -
54 vertexCount_( -1 ),
│ │ │ │ -
55 elementCount_( -1 )
│ │ │ │ -
56 {}
│ │ │ │ -
│ │ │ │ -
57
│ │ │ │ -
│ │ │ │ -
58 operator Data * () const
│ │ │ │ -
59 {
│ │ │ │ -
60 return data_;
│ │ │ │ +
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 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;
│ │ │ │ +
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 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 ();
│ │ │ │ +
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
│ │ │ │ -
│ │ │ │ -
92 void finalize ();
│ │ │ │ -
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 }
│ │ │ │ +
│ │ │ │ +
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 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 );
│ │ │ │ -
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 }
│ │ │ │ +
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 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 {
│ │ │ │ - │ │ │ │ +
│ │ │ │ +
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 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 );
│ │ │ │ +
│ │ │ │ +
223 const DofSpace *dofSpace () const
│ │ │ │ +
224 {
│ │ │ │ +
225 return dofVector_->fe_space;
│ │ │ │ +
226 }
│ │ │ │ +
│ │ │ │
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 }
│ │ │ │ +
│ │ │ │ +
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 }
│ │ │ │
│ │ │ │ -
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 }
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ -
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 }
│ │ │ │ +
│ │ │ │ +
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 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 }
│ │ │ │ +
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
│ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ +
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 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 MESH Mesh
Definition misc.hh:53
│ │ │ │ +
void abs(const DofVectorPointer< int > &dofVector)
Definition dofvector.hh:328
│ │ │ │
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 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 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 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,531 +1,563 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ +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 © 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_ALBERTA_DOFVECTOR_HH │ │ │ │ │ +6#define DUNE_ALBERTA_DOFVECTOR_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_/_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> │ │ │ │ │ +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{ │ │ │ │ │ 19 │ │ │ │ │ -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 static const int initialSize = 4096; │ │ │ │ │ -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; │ │ │ │ │ +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 │ │ │ │ │ -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; │ │ │ │ │ +_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 _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_; │ │ │ │ │ +_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 │ │ │ │ │ -_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 (); │ │ │ │ │ +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 │ │ │ │ │ -_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 if( data_ != NULL ) │ │ │ │ │ -130 { │ │ │ │ │ -131 _A_L_B_E_R_T_A free_macro_data( data_ ); │ │ │ │ │ -132 data_ = NULL; │ │ │ │ │ -133 } │ │ │ │ │ -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_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 ); │ │ │ │ │ -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 │ │ │ │ │ +_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() │ │ │ │ │ ); │ │ │ │ │ -203 assert( (data_->coords != NULL) || (newSize == 0) ); │ │ │ │ │ -204 } │ │ │ │ │ +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 │ │ │ │ │ -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; │ │ │ │ │ +_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 │ │ │ │ │ -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 ); │ │ │ │ │ +_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 │ │ │ │ │ -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 │ │ │ │ │ +_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 │ │ │ │ │ -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 ]; │ │ │ │ │ +_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 │ │ │ │ │ -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 } │ │ │ │ │ -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; │ │ │ │ │ +_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 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 } │ │ │ │ │ +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 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 } │ │ │ │ │ +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 │ │ │ │ │ -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 } │ │ │ │ │ +_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 │ │ │ │ │ -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 │ │ │ │ │ +364#endif // #ifndef DUNE_ALBERTA_DOFVECTOR_HH │ │ │ │ │ _A_L_B_E_R_T_A │ │ │ │ │ #define ALBERTA │ │ │ │ │ DDeeffiinniittiioonn albertaheader.hh:29 │ │ │ │ │ +_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 │ │ │ │ │ +_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_:_:_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_:_:_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_:_:_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_:_:_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_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 │ │ │ │ │ +_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() │ │ │ │ │ -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 │ │ │ │ │ +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/a00680.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: undefine-3.0.hh File Reference │ │ │ │ +dune-grid: meshpointer.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -69,25 +69,29 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
undefine-3.0.hh File Reference
│ │ │ │ +
│ │ │ │ +Namespaces
│ │ │ │ +
meshpointer.cc File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ -

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

│ │ │ │ - │ │ │ │ -

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.

│ │ │ │ -
│ │ │ │ +
#include <dune/grid/albertagrid/meshpointer.hh>
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::Alberta
 
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,18 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -undefine-3.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_. │ │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -Contains #undefs for all preprocessor macros defined by alberta. │ │ │ │ │ -This file is created automatically by the perl script undefAllMacros.pl. │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +meshpointer.cc 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> │ │ │ │ │ +NNaammeessppaacceess │ │ │ │ │ +namespace   _D_u_n_e │ │ │ │ │ +  Include standard header files. │ │ │ │ │ +  │ │ │ │ │ +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/a00683.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: agrid.hh File Reference │ │ │ │ +dune-grid: albertareader.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,95 +71,36 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces | │ │ │ │ -Macros
│ │ │ │ -
agrid.hh File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
albertareader.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ - │ │ │ │ -

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/geometry/type.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>
│ │ │ │ +#include <dune/grid/albertagrid/macrodata.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::AlbertaGrid< dim, dimworld >
 [ provides Dune::Grid ] More...
class  Dune::AlbertaReader< Grid >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ │ Namespaces

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

│ │ │ │ -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,66 +1,23 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +_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_/_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> │ │ │ │ │ +#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_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_._._. │ │ │ │ │ +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. │ │ │ │ │   │ │ │ │ │ -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/a00683_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: agrid.hh Source File │ │ │ │ +dune-grid: albertareader.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,844 +74,133 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
agrid.hh
│ │ │ │ +
albertareader.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_IMP_HH
│ │ │ │ -
6#define DUNE_ALBERTAGRID_IMP_HH
│ │ │ │ +
5#ifndef DUNE_ALBERTA_ALBERTAREADER_HH
│ │ │ │ +
6#define DUNE_ALBERTA_ALBERTAREADER_HH
│ │ │ │
7
│ │ │ │ -
13#if HAVE_ALBERTA || DOXYGEN
│ │ │ │ +
8#include <dune/geometry/type.hh>
│ │ │ │ +
9
│ │ │ │ + │ │ │ │ + │ │ │ │ +
12
│ │ │ │ + │ │ │ │
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>
│ │ │ │ +
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
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
34
│ │ │ │ -
35//- Local includes
│ │ │ │ -
36// some cpp defines and include of alberta.h
│ │ │ │ -
37#include "albertaheader.hh"
│ │ │ │ +
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.");
│ │ │ │ +
36
│ │ │ │ + │ │ │ │
38
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
42
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
50
│ │ │ │ -
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
│ │ │ │ -
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 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
│ │ │ │ - │ │ │ │ - │ │ │ │ -
147
│ │ │ │ -
148 // the Traits
│ │ │ │ - │ │ │ │ -
150
│ │ │ │ - │ │ │ │ - │ │ │ │ -
155
│ │ │ │ - │ │ │ │ -
158
│ │ │ │ - │ │ │ │ - │ │ │ │ -
163
│ │ │ │ - │ │ │ │ -
166
│ │ │ │ -
167 private:
│ │ │ │ -
169 typedef typename Traits::template Codim<0>::LeafIterator LeafIterator;
│ │ │ │ -
170
│ │ │ │ -
172 typedef AlbertaGridIdSet<dim,dimworld> IdSetImp;
│ │ │ │ -
173
│ │ │ │ -
175 struct AdaptationState
│ │ │ │ -
176 {
│ │ │ │ -
177 enum Phase { ComputationPhase, PreAdaptationPhase, PostAdaptationPhase };
│ │ │ │ -
178
│ │ │ │ -
179 private:
│ │ │ │ -
180 Phase phase_;
│ │ │ │ -
181 int coarsenMarked_;
│ │ │ │ -
182 int refineMarked_;
│ │ │ │ -
183
│ │ │ │ -
184 public:
│ │ │ │ -
185 AdaptationState ()
│ │ │ │ -
186 : phase_( ComputationPhase ),
│ │ │ │ -
187 coarsenMarked_( 0 ),
│ │ │ │ -
188 refineMarked_( 0 )
│ │ │ │ -
189 {}
│ │ │ │ -
190
│ │ │ │ -
191 void mark ( int count )
│ │ │ │ -
192 {
│ │ │ │ -
193 if( count < 0 )
│ │ │ │ -
194 ++coarsenMarked_;
│ │ │ │ -
195 if( count > 0 )
│ │ │ │ -
196 refineMarked_ += (2 << count);
│ │ │ │ -
197 }
│ │ │ │ -
198
│ │ │ │ -
199 void unmark ( int count )
│ │ │ │ -
200 {
│ │ │ │ -
201 if( count < 0 )
│ │ │ │ -
202 --coarsenMarked_;
│ │ │ │ -
203 if( count > 0 )
│ │ │ │ -
204 refineMarked_ -= (2 << count);
│ │ │ │ -
205 }
│ │ │ │ -
206
│ │ │ │ -
207 bool coarsen () const
│ │ │ │ -
208 {
│ │ │ │ -
209 return (coarsenMarked_ > 0);
│ │ │ │ -
210 }
│ │ │ │ -
211
│ │ │ │ -
212 int refineMarked () const
│ │ │ │ -
213 {
│ │ │ │ -
214 return refineMarked_;
│ │ │ │ -
215 }
│ │ │ │ -
216
│ │ │ │ -
217 void preAdapt ()
│ │ │ │ -
218 {
│ │ │ │ -
219 if( phase_ != ComputationPhase )
│ │ │ │ -
220 error( "preAdapt may only be called in computation phase." );
│ │ │ │ -
221 phase_ = PreAdaptationPhase;
│ │ │ │ -
222 }
│ │ │ │ -
223
│ │ │ │ -
224 void adapt ()
│ │ │ │ -
225 {
│ │ │ │ -
226 if( phase_ != PreAdaptationPhase )
│ │ │ │ -
227 error( "adapt may only be called in preadapdation phase." );
│ │ │ │ -
228 phase_ = PostAdaptationPhase;
│ │ │ │ -
229 }
│ │ │ │ -
230
│ │ │ │ -
231 void postAdapt ()
│ │ │ │ -
232 {
│ │ │ │ -
233 if( phase_ != PostAdaptationPhase )
│ │ │ │ -
234 error( "postAdapt may only be called in postadaptation phase." );
│ │ │ │ -
235 phase_ = ComputationPhase;
│ │ │ │ -
236
│ │ │ │ -
237 coarsenMarked_ = 0;
│ │ │ │ -
238 refineMarked_ = 0;
│ │ │ │ -
239 }
│ │ │ │ -
240
│ │ │ │ -
241 private:
│ │ │ │ -
242 void error ( const std::string &message )
│ │ │ │ -
243 {
│ │ │ │ - │ │ │ │ -
245 }
│ │ │ │ -
246 };
│ │ │ │ -
247
│ │ │ │ -
248 template< class DataHandler >
│ │ │ │ -
249 struct AdaptationCallback;
│ │ │ │ -
250
│ │ │ │ -
251 // max number of allowed levels is 64
│ │ │ │ -
252 static const int MAXL = 64;
│ │ │ │ -
253
│ │ │ │ -
254 typedef Alberta::ElementInfo< dimension > ElementInfo;
│ │ │ │ -
255 typedef Alberta::MeshPointer< dimension > MeshPointer;
│ │ │ │ - │ │ │ │ -
257 typedef AlbertaGridLevelProvider< dimension > LevelProvider;
│ │ │ │ -
258
│ │ │ │ -
259 public:
│ │ │ │ -
260 AlbertaGrid ( const This & ) = delete;
│ │ │ │ -
261 This &operator= ( const This & ) = delete;
│ │ │ │ -
262
│ │ │ │ -
264 AlbertaGrid ();
│ │ │ │ -
265
│ │ │ │ - │ │ │ │ -
272 const std::shared_ptr< DuneBoundaryProjection< dimensionworld > > &projection
│ │ │ │ -
273 = std::shared_ptr< DuneBoundaryProjection< dimensionworld > >() );
│ │ │ │ -
274
│ │ │ │ -
275 template< class Proj, class Impl >
│ │ │ │ - │ │ │ │ -
277 const Alberta::ProjectionFactoryInterface< Proj, Impl > &projectionFactory );
│ │ │ │ -
278
│ │ │ │ -
283 AlbertaGrid ( const std::string &macroGridFileName );
│ │ │ │ -
284
│ │ │ │ -
286 ~AlbertaGrid ();
│ │ │ │ -
287
│ │ │ │ -
290 int maxLevel () const;
│ │ │ │ -
291
│ │ │ │ -
293 template<int cd, PartitionIteratorType pitype>
│ │ │ │ -
294 typename Traits::template Codim<cd>::template Partition<pitype>::LevelIterator
│ │ │ │ -
295 lbegin (int level) const;
│ │ │ │ -
296
│ │ │ │ -
298 template<int cd, PartitionIteratorType pitype>
│ │ │ │ -
299 typename Traits::template Codim<cd>::template Partition<pitype>::LevelIterator
│ │ │ │ -
300 lend (int level) const;
│ │ │ │ -
301
│ │ │ │ -
303 template< int codim >
│ │ │ │ - │ │ │ │ -
305 lbegin ( int level ) const;
│ │ │ │ -
306
│ │ │ │ -
308 template< int codim >
│ │ │ │ - │ │ │ │ -
310 lend ( int level ) const;
│ │ │ │ -
311
│ │ │ │ -
313 template< int codim, PartitionIteratorType pitype >
│ │ │ │ -
314 typename Traits
│ │ │ │ -
315 ::template Codim< codim >::template Partition< pitype >::LeafIterator
│ │ │ │ -
316 leafbegin () const;
│ │ │ │ -
317
│ │ │ │ -
319 template< int codim, PartitionIteratorType pitype >
│ │ │ │ -
320 typename Traits
│ │ │ │ -
321 ::template Codim< codim >::template Partition< pitype >::LeafIterator
│ │ │ │ -
322 leafend () const;
│ │ │ │ -
323
│ │ │ │ -
325 template< int codim >
│ │ │ │ - │ │ │ │ -
327 leafbegin () const;
│ │ │ │ -
328
│ │ │ │ -
330 template< int codim >
│ │ │ │ - │ │ │ │ -
332 leafend () const;
│ │ │ │ -
333
│ │ │ │ -
338 int size (int level, int codim) const;
│ │ │ │ -
339
│ │ │ │ -
341 int size (int level, GeometryType type) const;
│ │ │ │ -
342
│ │ │ │ -
344 int size (int codim) const;
│ │ │ │ -
345
│ │ │ │ -
347 int size (GeometryType type) const;
│ │ │ │ -
348
│ │ │ │ -
│ │ │ │ -
350 std::size_t numBoundarySegments () const
│ │ │ │ -
351 {
│ │ │ │ -
352 return numBoundarySegments_;
│ │ │ │ -
353 }
│ │ │ │ -
│ │ │ │ -
354
│ │ │ │ -
│ │ │ │ -
356 typename Traits::LevelGridView levelGridView ( int level ) const
│ │ │ │ -
357 {
│ │ │ │ -
358 typedef typename Traits::LevelGridView View;
│ │ │ │ -
359 typedef typename View::GridViewImp ViewImp;
│ │ │ │ -
360 return View( ViewImp( *this, level ) );
│ │ │ │ -
361 }
│ │ │ │ -
│ │ │ │ -
362
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
365 {
│ │ │ │ -
366 typedef typename Traits::LeafGridView View;
│ │ │ │ -
367 typedef typename View::GridViewImp ViewImp;
│ │ │ │ -
368 return View( ViewImp( *this ) );
│ │ │ │ -
369 }
│ │ │ │ -
│ │ │ │ -
370
│ │ │ │ -
371 public:
│ │ │ │ -
372 //***************************************************************
│ │ │ │ -
373 // Interface for Adaptation
│ │ │ │ -
374 //***************************************************************
│ │ │ │ -
375 using Base::getMark;
│ │ │ │ -
376 using Base::mark;
│ │ │ │ -
377
│ │ │ │ -
379 int getMark ( const typename Traits::template Codim< 0 >::Entity &e ) const;
│ │ │ │ -
380
│ │ │ │ -
382 bool mark ( int refCount, const typename Traits::template Codim< 0 >::Entity &e );
│ │ │ │ -
383
│ │ │ │ -
385 void globalRefine ( int refCount );
│ │ │ │ -
386
│ │ │ │ -
387 template< class DataHandle >
│ │ │ │ -
388 void globalRefine ( int refCount, AdaptDataHandleInterface< This, DataHandle > &handle );
│ │ │ │ -
389
│ │ │ │ -
391 bool adapt ();
│ │ │ │ -
392
│ │ │ │ -
394 template< class DataHandle >
│ │ │ │ - │ │ │ │ -
396
│ │ │ │ -
398 bool preAdapt ();
│ │ │ │ -
399
│ │ │ │ -
401 void postAdapt();
│ │ │ │ -
402
│ │ │ │ -
│ │ │ │ -
405 const Communication &comm () const
│ │ │ │ -
406 {
│ │ │ │ -
407 return comm_;
│ │ │ │ -
408 }
│ │ │ │ -
│ │ │ │ -
409
│ │ │ │ -
│ │ │ │ -
410 static std::string typeName ()
│ │ │ │ -
411 {
│ │ │ │ -
412 std::ostringstream s;
│ │ │ │ -
413 s << "AlbertaGrid< " << dim << ", " << dimworld << " >";
│ │ │ │ -
414 return s.str();
│ │ │ │ -
415 }
│ │ │ │ -
│ │ │ │ -
416
│ │ │ │ -
418 template< class EntitySeed >
│ │ │ │ -
419 typename Traits::template Codim< EntitySeed::codimension >::Entity
│ │ │ │ -
│ │ │ │ -
420 entity ( const EntitySeed &seed ) const
│ │ │ │ -
421 {
│ │ │ │ - │ │ │ │ -
423 return EntityImpl( *this, seed.impl().elementInfo( meshPointer() ), seed.impl().subEntity() );
│ │ │ │ -
424 }
│ │ │ │ -
│ │ │ │ -
425
│ │ │ │ -
426 //**********************************************************
│ │ │ │ -
427 // End of Interface Methods
│ │ │ │ -
428 //**********************************************************
│ │ │ │ -
430 bool writeGrid( const std::string &filename, ctype time ) const;
│ │ │ │ -
431
│ │ │ │ -
433 bool readGrid( const std::string &filename, ctype &time );
│ │ │ │ -
434
│ │ │ │ -
435 // return hierarchic index set
│ │ │ │ -
436 const HierarchicIndexSet & hierarchicIndexSet () const { return hIndexSet_; }
│ │ │ │ -
437
│ │ │ │ -
439 const typename Traits :: LevelIndexSet & levelIndexSet (int level) const;
│ │ │ │ -
440
│ │ │ │ -
442 const typename Traits :: LeafIndexSet & leafIndexSet () const;
│ │ │ │ -
443
│ │ │ │ -
│ │ │ │ -
445 const GlobalIdSet &globalIdSet () const
│ │ │ │ -
446 {
│ │ │ │ -
447 return idSet_;
│ │ │ │ -
448 }
│ │ │ │ -
│ │ │ │ -
449
│ │ │ │ -
│ │ │ │ -
451 const LocalIdSet &localIdSet () const
│ │ │ │ -
452 {
│ │ │ │ -
453 return idSet_;
│ │ │ │ -
454 }
│ │ │ │ -
│ │ │ │ -
455
│ │ │ │ -
456 // access to mesh pointer, needed by some methods
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
458 {
│ │ │ │ -
459 return mesh_;
│ │ │ │ -
460 };
│ │ │ │ -
│ │ │ │ -
461
│ │ │ │ -
│ │ │ │ -
462 const MeshPointer &meshPointer () const
│ │ │ │ -
463 {
│ │ │ │ -
464 return mesh_;
│ │ │ │ -
465 }
│ │ │ │ -
│ │ │ │ -
466
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
468 {
│ │ │ │ -
469 return dofNumbering_;
│ │ │ │ -
470 }
│ │ │ │ -
│ │ │ │ -
471
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
473 {
│ │ │ │ -
474 return levelProvider_;
│ │ │ │ -
475 }
│ │ │ │ -
│ │ │ │ -
476
│ │ │ │ -
│ │ │ │ -
477 int dune2alberta ( int codim, int i ) const
│ │ │ │ -
478 {
│ │ │ │ -
479 return numberingMap_.dune2alberta( codim, i );
│ │ │ │ -
480 }
│ │ │ │ -
│ │ │ │ -
481
│ │ │ │ -
│ │ │ │ -
482 int alberta2dune ( int codim, int i ) const
│ │ │ │ -
483 {
│ │ │ │ -
484 return numberingMap_.alberta2dune( codim, i );
│ │ │ │ -
485 }
│ │ │ │ -
│ │ │ │ -
486
│ │ │ │ -
│ │ │ │ -
487 int generic2alberta ( int codim, int i ) const
│ │ │ │ -
488 {
│ │ │ │ -
489 return genericNumberingMap_.dune2alberta( codim, i );
│ │ │ │ -
490 }
│ │ │ │ -
│ │ │ │ -
491
│ │ │ │ -
│ │ │ │ -
492 int alberta2generic ( int codim, int i ) const
│ │ │ │ -
493 {
│ │ │ │ -
494 return genericNumberingMap_.alberta2dune( codim, i );
│ │ │ │ -
495 }
│ │ │ │ -
│ │ │ │ -
496
│ │ │ │ -
497 private:
│ │ │ │ -
498 typedef std::vector<int> ArrayType;
│ │ │ │ -
499
│ │ │ │ -
500 void setup ();
│ │ │ │ -
501
│ │ │ │ -
502 // make the calculation of indexOnLevel and so on.
│ │ │ │ -
503 // extra method because of Reihenfolge
│ │ │ │ -
504 void calcExtras();
│ │ │ │ -
505
│ │ │ │ -
506 private:
│ │ │ │ -
507 // delete mesh and all vectors
│ │ │ │ -
508 void removeMesh();
│ │ │ │ -
509
│ │ │ │ -
510 //***********************************************************************
│ │ │ │ -
511 // MemoryManagement for Entities and Geometries
│ │ │ │ -
512 //**********************************************************************
│ │ │ │ - │ │ │ │ - │ │ │ │ -
515
│ │ │ │ -
516 public:
│ │ │ │ - │ │ │ │ -
518
│ │ │ │ -
519 template< int codim >
│ │ │ │ -
520 static int
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
522 {
│ │ │ │ -
523 return entity.impl().twist();
│ │ │ │ -
524 }
│ │ │ │ -
│ │ │ │ -
525
│ │ │ │ -
526 template< int codim >
│ │ │ │ -
527 static int
│ │ │ │ -
│ │ │ │ -
528 getTwist ( const typename Traits::template Codim< 0 >::Entity &entity, int subEntity )
│ │ │ │ -
529 {
│ │ │ │ -
530 return entity.impl().template twist< codim >( subEntity );
│ │ │ │ -
531 }
│ │ │ │ -
│ │ │ │ -
532
│ │ │ │ -
533 static int
│ │ │ │ -
│ │ │ │ -
534 getTwistInInside ( const typename Traits::LeafIntersection &intersection )
│ │ │ │ -
535 {
│ │ │ │ -
536 return intersection.impl().twistInInside();
│ │ │ │ -
537 }
│ │ │ │ -
│ │ │ │ -
538
│ │ │ │ -
539 static int
│ │ │ │ -
│ │ │ │ -
540 getTwistInOutside ( const typename Traits::LeafIntersection &intersection )
│ │ │ │ -
541 {
│ │ │ │ -
542 return intersection.impl().twistInOutside();
│ │ │ │ -
543 }
│ │ │ │ -
│ │ │ │ -
544
│ │ │ │ -
545 public:
│ │ │ │ -
546 // read global element number from elNumbers_
│ │ │ │ - │ │ │ │ -
548 getCoord ( const ElementInfo &elementInfo, int vertex ) const;
│ │ │ │ -
549
│ │ │ │ -
550 private:
│ │ │ │ -
551 // pointer to an Albert Mesh, which contains the data
│ │ │ │ -
552 MeshPointer mesh_;
│ │ │ │ -
553
│ │ │ │ -
554 // communication
│ │ │ │ -
555 Communication comm_;
│ │ │ │ -
556
│ │ │ │ -
557 // maximum level of the mesh
│ │ │ │ -
558 int maxlevel_;
│ │ │ │ -
559
│ │ │ │ -
560 // number of boundary segments within the macro grid
│ │ │ │ -
561 size_t numBoundarySegments_;
│ │ │ │ -
562
│ │ │ │ -
563 // map between ALBERTA and DUNE numbering
│ │ │ │ - │ │ │ │ - │ │ │ │ -
566
│ │ │ │ -
567 DofNumbering dofNumbering_;
│ │ │ │ -
568
│ │ │ │ -
569 LevelProvider levelProvider_;
│ │ │ │ -
570
│ │ │ │ -
571 // hierarchical numbering of AlbertaGrid, unique per codim
│ │ │ │ -
572 HierarchicIndexSet hIndexSet_;
│ │ │ │ -
573
│ │ │ │ -
574 // the id set of this grid
│ │ │ │ -
575 IdSetImp idSet_;
│ │ │ │ -
576
│ │ │ │ -
577 // the level index set, is generated from the HierarchicIndexSet
│ │ │ │ -
578 // is generated, when accessed
│ │ │ │ -
579 mutable std::vector< typename GridFamily::LevelIndexSetImp * > levelIndexVec_;
│ │ │ │ -
580
│ │ │ │ -
581 // the leaf index set, is generated from the HierarchicIndexSet
│ │ │ │ -
582 // is generated, when accessed
│ │ │ │ -
583 mutable typename GridFamily::LeafIndexSetImp* leafIndexSet_;
│ │ │ │ -
584
│ │ │ │ -
585 SizeCache< This > sizeCache_;
│ │ │ │ -
586
│ │ │ │ -
587 typedef AlbertaMarkerVector< dim, dimworld > MarkerVector;
│ │ │ │ -
588
│ │ │ │ -
589 // needed for VertexIterator, mark on which element a vertex is treated
│ │ │ │ -
590 mutable MarkerVector leafMarkerVector_;
│ │ │ │ -
591
│ │ │ │ -
592 // needed for VertexIterator, mark on which element a vertex is treated
│ │ │ │ -
593 mutable std::vector< MarkerVector > levelMarkerVector_;
│ │ │ │ -
594
│ │ │ │ -
595#if DUNE_ALBERTA_CACHE_COORDINATES
│ │ │ │ - │ │ │ │ -
597#endif
│ │ │ │ -
598
│ │ │ │ -
599 // current state of adaptation
│ │ │ │ -
600 AdaptationState adaptationState_;
│ │ │ │ -
601 };
│ │ │ │ -
│ │ │ │ -
602
│ │ │ │ -
603} // namespace Dune
│ │ │ │ -
│ │ │ │ -
604
│ │ │ │ -
605#include "albertagrid.cc"
│ │ │ │ -
606
│ │ │ │ -
607// undef all dangerous defines
│ │ │ │ -
608#undef DIM
│ │ │ │ -
609#undef DIM_OF_WORLD
│ │ │ │ -
610
│ │ │ │ -
611#ifdef _ABS_NOT_DEFINED_
│ │ │ │ -
612#undef ABS
│ │ │ │ -
613#endif
│ │ │ │ -
614
│ │ │ │ -
615#ifdef _MIN_NOT_DEFINED_
│ │ │ │ -
616#undef MIN
│ │ │ │ -
617#endif
│ │ │ │ -
618
│ │ │ │ -
619#ifdef _MAX_NOT_DEFINED_
│ │ │ │ -
620#undef MAX
│ │ │ │ -
621#endif
│ │ │ │ -
622
│ │ │ │ -
623#ifdef obstack_chunk_alloc
│ │ │ │ -
624#undef obstack_chunk_alloc
│ │ │ │ -
625#endif
│ │ │ │ -
626#ifdef obstack_chunk_free
│ │ │ │ -
627#undef obstack_chunk_free
│ │ │ │ -
628#endif
│ │ │ │ - │ │ │ │ -
630
│ │ │ │ -
631// We use MEM_ALLOC, so undefine it here.
│ │ │ │ -
632#undef MEM_ALLOC
│ │ │ │ -
633
│ │ │ │ -
634// We use MEM_REALLOC, so undefine it here.
│ │ │ │ -
635#undef MEM_REALLOC
│ │ │ │ -
636
│ │ │ │ -
637// We use MEM_CALLOC, so undefine it here.
│ │ │ │ -
638#undef MEM_CALLOC
│ │ │ │ -
639
│ │ │ │ -
640// We use MEM_FREE, so undefine it here.
│ │ │ │ -
641#undef MEM_FREE
│ │ │ │ -
642
│ │ │ │ -
643// Macro ERROR may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ -
644#ifdef ERROR
│ │ │ │ -
645#undef ERROR
│ │ │ │ -
646#endif // #ifdef ERROR
│ │ │ │ -
647
│ │ │ │ -
648// Macro ERROR_EXIT may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ -
649#ifdef ERROR_EXIT
│ │ │ │ -
650#undef ERROR_EXIT
│ │ │ │ -
651#endif // #ifdef ERROR_EXIT
│ │ │ │ -
652
│ │ │ │ -
653// Macro WARNING may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ -
654#ifdef WARNING
│ │ │ │ -
655#undef WARNING
│ │ │ │ -
656#endif // #ifdef WARNING
│ │ │ │ -
657
│ │ │ │ -
658// Macro TEST may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ -
659#ifdef TEST
│ │ │ │ -
660#undef TEST
│ │ │ │ -
661#endif // #ifdef TEST
│ │ │ │ -
662
│ │ │ │ -
663// Macro TEST_EXIT may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ -
664#ifdef TEST_EXIT
│ │ │ │ -
665#undef TEST_EXIT
│ │ │ │ -
666#endif // #ifdef TEST_EXIT
│ │ │ │ -
667
│ │ │ │ -
668// Macro DEBUG_TEST may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ -
669#ifdef DEBUG_TEST
│ │ │ │ -
670#undef DEBUG_TEST
│ │ │ │ -
671#endif // #ifdef DEBUG_TEST
│ │ │ │ -
672
│ │ │ │ -
673// Macro DEBUG_TEST_EXIT may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ -
674#ifdef DEBUG_TEST_EXIT
│ │ │ │ -
675#undef DEBUG_TEST_EXIT
│ │ │ │ -
676#endif // #ifdef DEBUG_TEST_EXIT
│ │ │ │ -
677
│ │ │ │ -
678// Macro INFO may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ -
679#ifdef INFO
│ │ │ │ -
680#undef INFO
│ │ │ │ -
681#endif // #ifdef INFO
│ │ │ │ -
682
│ │ │ │ -
683// Macro PRINT_INFO may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ -
684#ifdef PRINT_INFO
│ │ │ │ -
685#undef PRINT_INFO
│ │ │ │ -
686#endif // #ifdef PRINT_INFO
│ │ │ │ -
687
│ │ │ │ -
688// Macro PRINT_INT_VEC may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ -
689#ifdef PRINT_INT_VEC
│ │ │ │ -
690#undef PRINT_INT_VEC
│ │ │ │ -
691#endif // #ifdef PRINT_INT_VEC
│ │ │ │ -
692
│ │ │ │ -
693// Macro PRINT_REAL_VEC may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ -
694#ifdef PRINT_REAL_VEC
│ │ │ │ -
695#undef PRINT_REAL_VEC
│ │ │ │ -
696#endif // #ifdef PRINT_REAL_VEC
│ │ │ │ -
697
│ │ │ │ -
698// Macro WAIT may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ -
699#ifdef WAIT
│ │ │ │ -
700#undef WAIT
│ │ │ │ -
701#endif // #ifdef WAIT
│ │ │ │ -
702
│ │ │ │ -
703// Macro WAIT_REALLY may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ -
704#ifdef WAIT_REALLY
│ │ │ │ -
705#undef WAIT_REALLY
│ │ │ │ -
706#endif // #ifdef WAIT_REALLY
│ │ │ │ -
707
│ │ │ │ -
708// Macro GET_WORKSPACE may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ -
709#ifdef GET_WORKSPACE
│ │ │ │ -
710#undef GET_WORKSPACE
│ │ │ │ -
711#endif // #ifdef GET_WORKSPACE
│ │ │ │ -
712
│ │ │ │ -
713// Macro FREE_WORKSPACE may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ -
714#ifdef FREE_WORKSPACE
│ │ │ │ -
715#undef FREE_WORKSPACE
│ │ │ │ -
716#endif // #ifdef FREE_WORKSPACE
│ │ │ │ -
717
│ │ │ │ -
718// Macro MAT_ALLOC may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ -
719#ifdef MAT_ALLOC
│ │ │ │ -
720#undef MAT_ALLOC
│ │ │ │ -
721#endif // #ifdef MAT_ALLOC
│ │ │ │ -
722
│ │ │ │ -
723// Macro MAT_FREE may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ -
724#ifdef MAT_FREE
│ │ │ │ -
725#undef MAT_FREE
│ │ │ │ -
726#endif // #ifdef MAT_FREE
│ │ │ │ -
727
│ │ │ │ -
728// Macro NAME may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ -
729#ifdef NAME
│ │ │ │ -
730#undef NAME
│ │ │ │ -
731#endif // #ifdef NAME
│ │ │ │ -
732
│ │ │ │ -
733// Macro GET_STRUCT may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ -
734#ifdef GET_STRUCT
│ │ │ │ -
735#undef GET_STRUCT
│ │ │ │ -
736#endif // #ifdef GET_STRUCT
│ │ │ │ -
737
│ │ │ │ -
738// Macro ADD_PARAMETER may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ -
739#ifdef ADD_PARAMETER
│ │ │ │ -
740#undef ADD_PARAMETER
│ │ │ │ -
741#endif // #ifdef ADD_PARAMETER
│ │ │ │ -
742
│ │ │ │ -
743// Macro GET_PARAMETER may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ -
744#ifdef GET_PARAMETER
│ │ │ │ -
745#undef GET_PARAMETER
│ │ │ │ -
746#endif // #ifdef GET_PARAMETER
│ │ │ │ -
747
│ │ │ │ -
748#define _ALBERTA_H_
│ │ │ │ -
749
│ │ │ │ -
750#endif // HAVE_ALBERTA || DOXYGEN
│ │ │ │ -
751
│ │ │ │ -
752#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
│ │ │ │ - │ │ │ │ - │ │ │ │ +
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 // 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
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
ALBERTA REAL Real
Definition misc.hh:48
│ │ │ │ +
static const int dimWorld
Definition misc.hh:46
│ │ │ │
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:467
│ │ │ │ -
int generic2alberta(int codim, int i) const
Definition agrid.hh:487
│ │ │ │ -
static std::string typeName()
Definition agrid.hh:410
│ │ │ │ -
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:436
│ │ │ │ -
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:477
│ │ │ │ -
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:472
│ │ │ │ -
static int getTwistInOutside(const typename Traits::LeafIntersection &intersection)
Definition agrid.hh:540
│ │ │ │ -
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:364
│ │ │ │ -
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:534
│ │ │ │ -
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:451
│ │ │ │ -
std::size_t numBoundarySegments() const
number of boundary segments within the macro grid
Definition agrid.hh:350
│ │ │ │ -
GridFamily::ctype ctype
Definition agrid.hh:143
│ │ │ │ -
AlbertaGrid(const This &)=delete
│ │ │ │ -
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:492
│ │ │ │ -
static int getTwist(const typename Traits::template Codim< codim >::Entity &entity)
Definition agrid.hh:521
│ │ │ │ -
const Communication & comm() const
return reference to communication, if MPI found this is specialisation for MPI
Definition agrid.hh:405
│ │ │ │ -
ALBERTA MESH * getMesh() const
Definition agrid.hh:457
│ │ │ │ -
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:356
│ │ │ │ -
int alberta2dune(int codim, int i) const
Definition agrid.hh:482
│ │ │ │ -
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:528
│ │ │ │ -
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:445
│ │ │ │ -
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:420
│ │ │ │ -
~AlbertaGrid()
destructor
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:462
│ │ │ │ -
Definition coordcache.hh:25
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
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:518
│ │ │ │ -
Definition albertagrid/indexsets.hh:329
│ │ │ │ -
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:76
│ │ │ │ -
Definition albertagrid/gridview.hh:287
│ │ │ │ -
Definition albertagrid/intersection.hh:32
│ │ │ │ - │ │ │ │ +
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 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:848
│ │ │ │ -
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:929
│ │ │ │ -
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:941
│ │ │ │ -
A Traits struct that collects all associated types of one implementation.
Definition common/grid.hh:411
│ │ │ │ -
Definition common/grid.hh:1121
│ │ │ │ -
Provide a generic factory class for unstructured grids.
Definition common/gridfactory.hh:275
│ │ │ │ -
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 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:518
│ │ │ │ + │ │ │ │ +
virtual void insertElement(const GeometryType &type, const std::vector< unsigned int > &vertices)
Insert an element into the coarse grid.
Definition common/gridfactory.hh:307
│ │ │ │ +
virtual void insertVertex(const FieldVector< ctype, dimworld > &pos)
Insert a vertex into the coarse grid.
Definition common/gridfactory.hh:296
│ │ │ │
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,1036 +1,176 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ -agrid.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 © 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_IMP_HH │ │ │ │ │ -6#define DUNE_ALBERTAGRID_IMP_HH │ │ │ │ │ +5#ifndef DUNE_ALBERTA_ALBERTAREADER_HH │ │ │ │ │ +6#define DUNE_ALBERTA_ALBERTAREADER_HH │ │ │ │ │ 7 │ │ │ │ │ -13#if HAVE_ALBERTA || DOXYGEN │ │ │ │ │ +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#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 │ │ │ │ │ +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#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 │ │ │ │ │ -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" │ │ │ │ │ +_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."); │ │ │ │ │ +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#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 │ │ │ │ │ -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 │ │ │ │ │ -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 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 │ │ │ │ │ -_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 │ │ │ │ │ -_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 │ │ │ │ │ -167 private: │ │ │ │ │ -169 _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; │ │ │ │ │ -170 │ │ │ │ │ -172 _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; │ │ │ │ │ -173 │ │ │ │ │ -175 _s_t_r_u_c_t AdaptationState │ │ │ │ │ -176 { │ │ │ │ │ -177 enum Phase { ComputationPhase, PreAdaptationPhase, PostAdaptationPhase }; │ │ │ │ │ -178 │ │ │ │ │ -179 private: │ │ │ │ │ -180 Phase phase_; │ │ │ │ │ -181 int coarsenMarked_; │ │ │ │ │ -182 int refineMarked_; │ │ │ │ │ -183 │ │ │ │ │ -184 public: │ │ │ │ │ -185 AdaptationState () │ │ │ │ │ -186 : phase_( ComputationPhase ), │ │ │ │ │ -187 coarsenMarked_( 0 ), │ │ │ │ │ -188 refineMarked_( 0 ) │ │ │ │ │ -189 {} │ │ │ │ │ -190 │ │ │ │ │ -191 void mark ( int count ) │ │ │ │ │ -192 { │ │ │ │ │ -193 if( count < 0 ) │ │ │ │ │ -194 ++coarsenMarked_; │ │ │ │ │ -195 if( count > 0 ) │ │ │ │ │ -196 refineMarked_ += (2 << count); │ │ │ │ │ -197 } │ │ │ │ │ -198 │ │ │ │ │ -199 void unmark ( int count ) │ │ │ │ │ -200 { │ │ │ │ │ -201 if( count < 0 ) │ │ │ │ │ -202 --coarsenMarked_; │ │ │ │ │ -203 if( count > 0 ) │ │ │ │ │ -204 refineMarked_ -= (2 << count); │ │ │ │ │ -205 } │ │ │ │ │ -206 │ │ │ │ │ -207 bool coarsen () const │ │ │ │ │ -208 { │ │ │ │ │ -209 return (coarsenMarked_ > 0); │ │ │ │ │ -210 } │ │ │ │ │ -211 │ │ │ │ │ -212 int refineMarked () const │ │ │ │ │ -213 { │ │ │ │ │ -214 return refineMarked_; │ │ │ │ │ -215 } │ │ │ │ │ -216 │ │ │ │ │ -217 void preAdapt () │ │ │ │ │ -218 { │ │ │ │ │ -219 if( phase_ != ComputationPhase ) │ │ │ │ │ -220 error( "preAdapt may only be called in computation phase." ); │ │ │ │ │ -221 phase_ = PreAdaptationPhase; │ │ │ │ │ -222 } │ │ │ │ │ -223 │ │ │ │ │ -224 void adapt () │ │ │ │ │ -225 { │ │ │ │ │ -226 if( phase_ != PreAdaptationPhase ) │ │ │ │ │ -227 error( "adapt may only be called in preadapdation phase." ); │ │ │ │ │ -228 phase_ = PostAdaptationPhase; │ │ │ │ │ -229 } │ │ │ │ │ -230 │ │ │ │ │ -231 void postAdapt () │ │ │ │ │ -232 { │ │ │ │ │ -233 if( phase_ != PostAdaptationPhase ) │ │ │ │ │ -234 error( "postAdapt may only be called in postadaptation phase." ); │ │ │ │ │ -235 phase_ = ComputationPhase; │ │ │ │ │ -236 │ │ │ │ │ -237 coarsenMarked_ = 0; │ │ │ │ │ -238 refineMarked_ = 0; │ │ │ │ │ -239 } │ │ │ │ │ -240 │ │ │ │ │ -241 private: │ │ │ │ │ -242 void error ( const std::string &_m_e_s_s_a_g_e ) │ │ │ │ │ -243 { │ │ │ │ │ -244 _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 ); │ │ │ │ │ -245 } │ │ │ │ │ -246 }; │ │ │ │ │ -247 │ │ │ │ │ -248 template< class DataHandler > │ │ │ │ │ -249 struct AdaptationCallback; │ │ │ │ │ -250 │ │ │ │ │ -251 // max number of allowed levels is 64 │ │ │ │ │ -252 static const int MAXL = 64; │ │ │ │ │ -253 │ │ │ │ │ -254 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; │ │ │ │ │ -255 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; │ │ │ │ │ -256 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; │ │ │ │ │ -257 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; │ │ │ │ │ -258 │ │ │ │ │ -259 public: │ │ │ │ │ -_2_6_0 _A_l_b_e_r_t_a_G_r_i_d ( const _T_h_i_s & ) = delete; │ │ │ │ │ -_2_6_1 _T_h_i_s &_o_p_e_r_a_t_o_r_=_ ( const _T_h_i_s & ) = delete; │ │ │ │ │ -262 │ │ │ │ │ -264 _A_l_b_e_r_t_a_G_r_i_d (); │ │ │ │ │ -265 │ │ │ │ │ -271 _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, │ │ │ │ │ -272 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 │ │ │ │ │ -273 = 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_ _> >() ); │ │ │ │ │ -274 │ │ │ │ │ -275 template< class Proj, class Impl > │ │ │ │ │ -276 _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, │ │ │ │ │ -277 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 │ │ │ │ │ -); │ │ │ │ │ -278 │ │ │ │ │ -283 _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 ); │ │ │ │ │ -284 │ │ │ │ │ -286 _~_A_l_b_e_r_t_a_G_r_i_d (); │ │ │ │ │ -287 │ │ │ │ │ -290 int _m_a_x_L_e_v_e_l () const; │ │ │ │ │ -291 │ │ │ │ │ -293 template │ │ │ │ │ -294 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 │ │ │ │ │ -_2_9_5 _l_b_e_g_i_n (int level) const; │ │ │ │ │ -296 │ │ │ │ │ -298 template │ │ │ │ │ -299 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_0 _l_e_n_d (int level) const; │ │ │ │ │ -301 │ │ │ │ │ -303 template< int codim > │ │ │ │ │ -304 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_0_5 _l_b_e_g_i_n ( int level ) const; │ │ │ │ │ -306 │ │ │ │ │ -308 template< int codim > │ │ │ │ │ -309 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_0 _l_e_n_d ( int level ) const; │ │ │ │ │ -311 │ │ │ │ │ -313 template< int codim, PartitionIteratorType pitype > │ │ │ │ │ -314 typename Traits │ │ │ │ │ -315 ::template _C_o_d_i_m_<_ _c_o_d_i_m_ _>_:_:_t_e_m_p_l_a_t_e Partition< pitype >::LeafIterator │ │ │ │ │ -_3_1_6 _l_e_a_f_b_e_g_i_n () 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_e_n_d () const; │ │ │ │ │ -323 │ │ │ │ │ -325 template< int codim > │ │ │ │ │ -326 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_2_7 _l_e_a_f_b_e_g_i_n () const; │ │ │ │ │ -328 │ │ │ │ │ -330 template< int codim > │ │ │ │ │ -331 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_2 _l_e_a_f_e_n_d () const; │ │ │ │ │ -333 │ │ │ │ │ -338 int _s_i_z_e (int level, int codim) const; │ │ │ │ │ -339 │ │ │ │ │ -341 int _s_i_z_e (int level, GeometryType type) const; │ │ │ │ │ -342 │ │ │ │ │ -344 int _s_i_z_e (int codim) const; │ │ │ │ │ -345 │ │ │ │ │ -347 int _s_i_z_e (GeometryType type) const; │ │ │ │ │ -348 │ │ │ │ │ -_3_5_0 std::size_t _n_u_m_B_o_u_n_d_a_r_y_S_e_g_m_e_n_t_s () const │ │ │ │ │ -351 { │ │ │ │ │ -352 return numBoundarySegments_; │ │ │ │ │ -353 } │ │ │ │ │ -354 │ │ │ │ │ -_3_5_6 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 │ │ │ │ │ -357 { │ │ │ │ │ -358 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; │ │ │ │ │ -359 typedef typename View::GridViewImp _V_i_e_w_I_m_p; │ │ │ │ │ -360 return _V_i_e_w( _V_i_e_w_I_m_p( *this, level ) ); │ │ │ │ │ -361 } │ │ │ │ │ -362 │ │ │ │ │ -_3_6_4 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 │ │ │ │ │ -365 { │ │ │ │ │ -366 typedef typename _T_r_a_i_t_s_:_:_L_e_a_f_G_r_i_d_V_i_e_w _V_i_e_w; │ │ │ │ │ -367 typedef typename View::GridViewImp _V_i_e_w_I_m_p; │ │ │ │ │ -368 return _V_i_e_w( _V_i_e_w_I_m_p( *this ) ); │ │ │ │ │ -369 } │ │ │ │ │ -370 │ │ │ │ │ -371 public: │ │ │ │ │ -372 //*************************************************************** │ │ │ │ │ -373 // Interface for Adaptation │ │ │ │ │ -374 //*************************************************************** │ │ │ │ │ -375 using _B_a_s_e_:_:_g_e_t_M_a_r_k; │ │ │ │ │ -376 using _B_a_s_e_:_:_m_a_r_k; │ │ │ │ │ -377 │ │ │ │ │ -379 int _g_e_t_M_a_r_k ( const typename Traits::template Codim< 0 >::Entity &e ) │ │ │ │ │ -const; │ │ │ │ │ -380 │ │ │ │ │ -382 bool _m_a_r_k ( int refCount, const typename Traits::template Codim< 0 >:: │ │ │ │ │ -Entity &e ); │ │ │ │ │ -383 │ │ │ │ │ -385 void _g_l_o_b_a_l_R_e_f_i_n_e ( int refCount ); │ │ │ │ │ -386 │ │ │ │ │ -387 template< class DataHandle > │ │ │ │ │ -388 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 ); │ │ │ │ │ -389 │ │ │ │ │ -391 bool _a_d_a_p_t (); │ │ │ │ │ -392 │ │ │ │ │ -394 template< class DataHandle > │ │ │ │ │ -395 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 ); │ │ │ │ │ -396 │ │ │ │ │ -398 bool _p_r_e_A_d_a_p_t (); │ │ │ │ │ -399 │ │ │ │ │ -401 void _p_o_s_t_A_d_a_p_t(); │ │ │ │ │ -402 │ │ │ │ │ -_4_0_5 const _C_o_m_m_u_n_i_c_a_t_i_o_n &_c_o_m_m () const │ │ │ │ │ -406 { │ │ │ │ │ -407 return comm_; │ │ │ │ │ -408 } │ │ │ │ │ -409 │ │ │ │ │ -_4_1_0 static std::string _t_y_p_e_N_a_m_e () │ │ │ │ │ -411 { │ │ │ │ │ -412 std::ostringstream s; │ │ │ │ │ -413 s << "AlbertaGrid< " << dim << ", " << dimworld << " >"; │ │ │ │ │ -414 return s.str(); │ │ │ │ │ -415 } │ │ │ │ │ -416 │ │ │ │ │ -418 template< class EntitySeed > │ │ │ │ │ -419 typename Traits::template Codim< EntitySeed::codimension >::Entity │ │ │ │ │ -_4_2_0 _e_n_t_i_t_y ( const _E_n_t_i_t_y_S_e_e_d &seed ) const │ │ │ │ │ -421 { │ │ │ │ │ -422 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; │ │ │ │ │ -423 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() ); │ │ │ │ │ -424 } │ │ │ │ │ -425 │ │ │ │ │ -426 //********************************************************** │ │ │ │ │ -427 // End of Interface Methods │ │ │ │ │ -428 //********************************************************** │ │ │ │ │ -430 bool _w_r_i_t_e_G_r_i_d( const std::string &filename, _c_t_y_p_e time ) const; │ │ │ │ │ -431 │ │ │ │ │ -433 bool _r_e_a_d_G_r_i_d( const std::string &filename, _c_t_y_p_e &time ); │ │ │ │ │ -434 │ │ │ │ │ -435 // return hierarchic index set │ │ │ │ │ -_4_3_6 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_; │ │ │ │ │ -} │ │ │ │ │ -437 │ │ │ │ │ -439 const typename Traits :: LevelIndexSet & _l_e_v_e_l_I_n_d_e_x_S_e_t (int level) const; │ │ │ │ │ -440 │ │ │ │ │ -442 const typename Traits :: LeafIndexSet & _l_e_a_f_I_n_d_e_x_S_e_t () const; │ │ │ │ │ -443 │ │ │ │ │ -_4_4_5 const _G_l_o_b_a_l_I_d_S_e_t &_g_l_o_b_a_l_I_d_S_e_t () const │ │ │ │ │ -446 { │ │ │ │ │ -447 return idSet_; │ │ │ │ │ -448 } │ │ │ │ │ -449 │ │ │ │ │ -_4_5_1 const _L_o_c_a_l_I_d_S_e_t &_l_o_c_a_l_I_d_S_e_t () const │ │ │ │ │ -452 { │ │ │ │ │ -453 return idSet_; │ │ │ │ │ -454 } │ │ │ │ │ -455 │ │ │ │ │ -456 // access to mesh pointer, needed by some methods │ │ │ │ │ -_4_5_7 _A_L_B_E_R_T_A _M_E_S_H* _g_e_t_M_e_s_h () const │ │ │ │ │ -458 { │ │ │ │ │ -459 return mesh_; │ │ │ │ │ -460 }; │ │ │ │ │ -461 │ │ │ │ │ -_4_6_2 const _M_e_s_h_P_o_i_n_t_e_r &_m_e_s_h_P_o_i_n_t_e_r () const │ │ │ │ │ -463 { │ │ │ │ │ -464 return mesh_; │ │ │ │ │ -465 } │ │ │ │ │ -466 │ │ │ │ │ -_4_6_7 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 │ │ │ │ │ -468 { │ │ │ │ │ -469 return dofNumbering_; │ │ │ │ │ -470 } │ │ │ │ │ -471 │ │ │ │ │ -_4_7_2 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 │ │ │ │ │ -473 { │ │ │ │ │ -474 return levelProvider_; │ │ │ │ │ -475 } │ │ │ │ │ -476 │ │ │ │ │ -_4_7_7 int _d_u_n_e_2_a_l_b_e_r_t_a ( int codim, int i ) const │ │ │ │ │ -478 { │ │ │ │ │ -479 return numberingMap_._d_u_n_e_2_a_l_b_e_r_t_a( codim, i ); │ │ │ │ │ -480 } │ │ │ │ │ -481 │ │ │ │ │ -_4_8_2 int _a_l_b_e_r_t_a_2_d_u_n_e ( int codim, int i ) const │ │ │ │ │ -483 { │ │ │ │ │ -484 return numberingMap_._a_l_b_e_r_t_a_2_d_u_n_e( codim, i ); │ │ │ │ │ -485 } │ │ │ │ │ -486 │ │ │ │ │ -_4_8_7 int _g_e_n_e_r_i_c_2_a_l_b_e_r_t_a ( int codim, int i ) const │ │ │ │ │ -488 { │ │ │ │ │ -489 return genericNumberingMap_.dune2alberta( codim, i ); │ │ │ │ │ -490 } │ │ │ │ │ -491 │ │ │ │ │ -_4_9_2 int _a_l_b_e_r_t_a_2_g_e_n_e_r_i_c ( int codim, int i ) const │ │ │ │ │ -493 { │ │ │ │ │ -494 return genericNumberingMap_.alberta2dune( codim, i ); │ │ │ │ │ -495 } │ │ │ │ │ -496 │ │ │ │ │ -497 private: │ │ │ │ │ -498 typedef std::vector ArrayType; │ │ │ │ │ -499 │ │ │ │ │ -500 void setup (); │ │ │ │ │ -501 │ │ │ │ │ -502 // make the calculation of indexOnLevel and so on. │ │ │ │ │ -503 // extra method because of Reihenfolge │ │ │ │ │ -504 void calcExtras(); │ │ │ │ │ -505 │ │ │ │ │ -506 private: │ │ │ │ │ -507 // delete mesh and all vectors │ │ │ │ │ -508 void removeMesh(); │ │ │ │ │ -509 │ │ │ │ │ -510 //*********************************************************************** │ │ │ │ │ -511 // MemoryManagement for Entities and Geometries │ │ │ │ │ -512 //********************************************************************** │ │ │ │ │ -513 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_1_4 _E_n_t_i_t_y_O_b_j_e_c_t; │ │ │ │ │ -515 │ │ │ │ │ -516 public: │ │ │ │ │ -517 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 >; │ │ │ │ │ -518 │ │ │ │ │ -519 template< int codim > │ │ │ │ │ -520 static int │ │ │ │ │ -_5_2_1 _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 ) │ │ │ │ │ -522 { │ │ │ │ │ -523 return _e_n_t_i_t_y.impl().twist(); │ │ │ │ │ -524 } │ │ │ │ │ -525 │ │ │ │ │ -526 template< int codim > │ │ │ │ │ -527 static int │ │ │ │ │ -_5_2_8 _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 ) │ │ │ │ │ -529 { │ │ │ │ │ -530 return _e_n_t_i_t_y.impl().template _t_w_i_s_t_<_ _c_o_d_i_m_ _>( subEntity ); │ │ │ │ │ -531 } │ │ │ │ │ -532 │ │ │ │ │ -533 static int │ │ │ │ │ -_5_3_4 _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 ) │ │ │ │ │ -535 { │ │ │ │ │ -536 return intersection._i_m_p_l().twistInInside(); │ │ │ │ │ -537 } │ │ │ │ │ -538 │ │ │ │ │ -539 static int │ │ │ │ │ -_5_4_0 _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 ) │ │ │ │ │ -541 { │ │ │ │ │ -542 return intersection._i_m_p_l().twistInOutside(); │ │ │ │ │ -543 } │ │ │ │ │ -544 │ │ │ │ │ -545 public: │ │ │ │ │ -546 // read global element number from elNumbers_ │ │ │ │ │ -547 const _A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r & │ │ │ │ │ -548 _g_e_t_C_o_o_r_d ( const ElementInfo &elementInfo, int vertex ) const; │ │ │ │ │ -549 │ │ │ │ │ -550 private: │ │ │ │ │ -551 // pointer to an Albert Mesh, which contains the data │ │ │ │ │ -552 MeshPointer mesh_; │ │ │ │ │ -553 │ │ │ │ │ -554 // communication │ │ │ │ │ -555 _C_o_m_m_u_n_i_c_a_t_i_o_n comm_; │ │ │ │ │ -556 │ │ │ │ │ -557 // maximum level of the mesh │ │ │ │ │ -558 int maxlevel_; │ │ │ │ │ -559 │ │ │ │ │ -560 // number of boundary segments within the macro grid │ │ │ │ │ -561 size_t numBoundarySegments_; │ │ │ │ │ -562 │ │ │ │ │ -563 // map between ALBERTA and DUNE numbering │ │ │ │ │ -564 _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_; │ │ │ │ │ -565 _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_; │ │ │ │ │ -566 │ │ │ │ │ -567 DofNumbering dofNumbering_; │ │ │ │ │ -568 │ │ │ │ │ -569 LevelProvider levelProvider_; │ │ │ │ │ -570 │ │ │ │ │ -571 // hierarchical numbering of AlbertaGrid, unique per codim │ │ │ │ │ -572 _H_i_e_r_a_r_c_h_i_c_I_n_d_e_x_S_e_t hIndexSet_; │ │ │ │ │ -573 │ │ │ │ │ -574 // the id set of this grid │ │ │ │ │ -575 IdSetImp idSet_; │ │ │ │ │ -576 │ │ │ │ │ -577 // the level index set, is generated from the HierarchicIndexSet │ │ │ │ │ -578 // is generated, when accessed │ │ │ │ │ -579 mutable std::vector< typename GridFamily::LevelIndexSetImp * > │ │ │ │ │ -levelIndexVec_; │ │ │ │ │ -580 │ │ │ │ │ -581 // the leaf index set, is generated from the HierarchicIndexSet │ │ │ │ │ -582 // is generated, when accessed │ │ │ │ │ -583 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_; │ │ │ │ │ -584 │ │ │ │ │ -585 _S_i_z_e_C_a_c_h_e_<_ _T_h_i_s_ _> sizeCache_; │ │ │ │ │ -586 │ │ │ │ │ -587 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; │ │ │ │ │ -588 │ │ │ │ │ -589 // needed for VertexIterator, mark on which element a vertex is treated │ │ │ │ │ -590 mutable MarkerVector leafMarkerVector_; │ │ │ │ │ -591 │ │ │ │ │ -592 // needed for VertexIterator, mark on which element a vertex is treated │ │ │ │ │ -593 mutable std::vector< MarkerVector > levelMarkerVector_; │ │ │ │ │ -594 │ │ │ │ │ -595#if DUNE_ALBERTA_CACHE_COORDINATES │ │ │ │ │ -596 _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_; │ │ │ │ │ -597#endif │ │ │ │ │ -598 │ │ │ │ │ -599 // current state of adaptation │ │ │ │ │ -600 AdaptationState adaptationState_; │ │ │ │ │ -601 }; │ │ │ │ │ -602 │ │ │ │ │ -603} // namespace Dune │ │ │ │ │ -604 │ │ │ │ │ -605#include "_a_l_b_e_r_t_a_g_r_i_d_._c_c" │ │ │ │ │ -606 │ │ │ │ │ -607// undef all dangerous defines │ │ │ │ │ -608#undef DIM │ │ │ │ │ -609#undef DIM_OF_WORLD │ │ │ │ │ -610 │ │ │ │ │ -611#ifdef _ABS_NOT_DEFINED_ │ │ │ │ │ -612#undef ABS │ │ │ │ │ -613#endif │ │ │ │ │ -614 │ │ │ │ │ -615#ifdef _MIN_NOT_DEFINED_ │ │ │ │ │ -616#undef MIN │ │ │ │ │ -617#endif │ │ │ │ │ -618 │ │ │ │ │ -619#ifdef _MAX_NOT_DEFINED_ │ │ │ │ │ -620#undef MAX │ │ │ │ │ -621#endif │ │ │ │ │ -622 │ │ │ │ │ -623#ifdef obstack_chunk_alloc │ │ │ │ │ -624#undef obstack_chunk_alloc │ │ │ │ │ -625#endif │ │ │ │ │ -626#ifdef obstack_chunk_free │ │ │ │ │ -627#undef obstack_chunk_free │ │ │ │ │ -628#endif │ │ │ │ │ -629#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> │ │ │ │ │ -630 │ │ │ │ │ -631// We use MEM_ALLOC, so undefine it here. │ │ │ │ │ -632#undef MEM_ALLOC │ │ │ │ │ -633 │ │ │ │ │ -634// We use MEM_REALLOC, so undefine it here. │ │ │ │ │ -635#undef MEM_REALLOC │ │ │ │ │ -636 │ │ │ │ │ -637// We use MEM_CALLOC, so undefine it here. │ │ │ │ │ -638#undef MEM_CALLOC │ │ │ │ │ -639 │ │ │ │ │ -640// We use MEM_FREE, so undefine it here. │ │ │ │ │ -641#undef MEM_FREE │ │ │ │ │ -642 │ │ │ │ │ -643// Macro ERROR may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ -644#ifdef ERROR │ │ │ │ │ -645#undef ERROR │ │ │ │ │ -646#endif // #ifdef ERROR │ │ │ │ │ -647 │ │ │ │ │ -648// Macro ERROR_EXIT may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ -649#ifdef ERROR_EXIT │ │ │ │ │ -650#undef ERROR_EXIT │ │ │ │ │ -651#endif // #ifdef ERROR_EXIT │ │ │ │ │ -652 │ │ │ │ │ -653// Macro WARNING may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ -654#ifdef WARNING │ │ │ │ │ -655#undef WARNING │ │ │ │ │ -656#endif // #ifdef WARNING │ │ │ │ │ -657 │ │ │ │ │ -658// Macro TEST may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ -659#ifdef TEST │ │ │ │ │ -660#undef TEST │ │ │ │ │ -661#endif // #ifdef TEST │ │ │ │ │ -662 │ │ │ │ │ -663// Macro TEST_EXIT may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ -664#ifdef TEST_EXIT │ │ │ │ │ -665#undef TEST_EXIT │ │ │ │ │ -666#endif // #ifdef TEST_EXIT │ │ │ │ │ -667 │ │ │ │ │ -668// Macro DEBUG_TEST may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ -669#ifdef DEBUG_TEST │ │ │ │ │ -670#undef DEBUG_TEST │ │ │ │ │ -671#endif // #ifdef DEBUG_TEST │ │ │ │ │ -672 │ │ │ │ │ -673// Macro DEBUG_TEST_EXIT may be defined by alberta_util.h. If so, undefine │ │ │ │ │ -it. │ │ │ │ │ -674#ifdef DEBUG_TEST_EXIT │ │ │ │ │ -675#undef DEBUG_TEST_EXIT │ │ │ │ │ -676#endif // #ifdef DEBUG_TEST_EXIT │ │ │ │ │ -677 │ │ │ │ │ -678// Macro INFO may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ -679#ifdef INFO │ │ │ │ │ -680#undef INFO │ │ │ │ │ -681#endif // #ifdef INFO │ │ │ │ │ -682 │ │ │ │ │ -683// Macro PRINT_INFO may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ -684#ifdef PRINT_INFO │ │ │ │ │ -685#undef PRINT_INFO │ │ │ │ │ -686#endif // #ifdef PRINT_INFO │ │ │ │ │ -687 │ │ │ │ │ -688// Macro PRINT_INT_VEC may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ -689#ifdef PRINT_INT_VEC │ │ │ │ │ -690#undef PRINT_INT_VEC │ │ │ │ │ -691#endif // #ifdef PRINT_INT_VEC │ │ │ │ │ -692 │ │ │ │ │ -693// Macro PRINT_REAL_VEC may be defined by alberta_util.h. If so, undefine │ │ │ │ │ -it. │ │ │ │ │ -694#ifdef PRINT_REAL_VEC │ │ │ │ │ -695#undef PRINT_REAL_VEC │ │ │ │ │ -696#endif // #ifdef PRINT_REAL_VEC │ │ │ │ │ -697 │ │ │ │ │ -698// Macro WAIT may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ -699#ifdef WAIT │ │ │ │ │ -700#undef WAIT │ │ │ │ │ -701#endif // #ifdef WAIT │ │ │ │ │ -702 │ │ │ │ │ -703// Macro WAIT_REALLY may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ -704#ifdef WAIT_REALLY │ │ │ │ │ -705#undef WAIT_REALLY │ │ │ │ │ -706#endif // #ifdef WAIT_REALLY │ │ │ │ │ -707 │ │ │ │ │ -708// Macro GET_WORKSPACE may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ -709#ifdef GET_WORKSPACE │ │ │ │ │ -710#undef GET_WORKSPACE │ │ │ │ │ -711#endif // #ifdef GET_WORKSPACE │ │ │ │ │ -712 │ │ │ │ │ -713// Macro FREE_WORKSPACE may be defined by alberta_util.h. If so, undefine │ │ │ │ │ -it. │ │ │ │ │ -714#ifdef FREE_WORKSPACE │ │ │ │ │ -715#undef FREE_WORKSPACE │ │ │ │ │ -716#endif // #ifdef FREE_WORKSPACE │ │ │ │ │ -717 │ │ │ │ │ -718// Macro MAT_ALLOC may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ -719#ifdef MAT_ALLOC │ │ │ │ │ -720#undef MAT_ALLOC │ │ │ │ │ -721#endif // #ifdef MAT_ALLOC │ │ │ │ │ -722 │ │ │ │ │ -723// Macro MAT_FREE may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ -724#ifdef MAT_FREE │ │ │ │ │ -725#undef MAT_FREE │ │ │ │ │ -726#endif // #ifdef MAT_FREE │ │ │ │ │ -727 │ │ │ │ │ -728// Macro NAME may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ -729#ifdef NAME │ │ │ │ │ -730#undef NAME │ │ │ │ │ -731#endif // #ifdef NAME │ │ │ │ │ -732 │ │ │ │ │ -733// Macro GET_STRUCT may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ -734#ifdef GET_STRUCT │ │ │ │ │ -735#undef GET_STRUCT │ │ │ │ │ -736#endif // #ifdef GET_STRUCT │ │ │ │ │ -737 │ │ │ │ │ -738// Macro ADD_PARAMETER may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ -739#ifdef ADD_PARAMETER │ │ │ │ │ -740#undef ADD_PARAMETER │ │ │ │ │ -741#endif // #ifdef ADD_PARAMETER │ │ │ │ │ -742 │ │ │ │ │ -743// Macro GET_PARAMETER may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ -744#ifdef GET_PARAMETER │ │ │ │ │ -745#undef GET_PARAMETER │ │ │ │ │ -746#endif // #ifdef GET_PARAMETER │ │ │ │ │ -747 │ │ │ │ │ -_7_4_8#define _ALBERTA_H_ │ │ │ │ │ -749 │ │ │ │ │ -750#endif // HAVE_ALBERTA || DOXYGEN │ │ │ │ │ -751 │ │ │ │ │ -752#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 │ │ │ │ │ -_l_e_a_f_i_t_e_r_a_t_o_r_._h_h │ │ │ │ │ -_l_e_v_e_l_._h_h │ │ │ │ │ -_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. │ │ │ │ │ -_m_i_s_c_._h_h │ │ │ │ │ -_c_o_o_r_d_c_a_c_h_e_._h_h │ │ │ │ │ -_l_e_v_e_l_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 │ │ │ │ │ -_a_l_b_e_r_t_a_g_r_i_d_._c_c │ │ │ │ │ +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 // 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 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 │ │ │ │ │ _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_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_:_:_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:467 │ │ │ │ │ -_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:487 │ │ │ │ │ -_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:410 │ │ │ │ │ -_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:436 │ │ │ │ │ -_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:477 │ │ │ │ │ -_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:472 │ │ │ │ │ -_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:540 │ │ │ │ │ -_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:364 │ │ │ │ │ -_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 │ │ │ │ │ +_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 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:534 │ │ │ │ │ -_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:451 │ │ │ │ │ -_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:350 │ │ │ │ │ -_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_:_:_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:492 │ │ │ │ │ -_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:521 │ │ │ │ │ -_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:405 │ │ │ │ │ -_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:457 │ │ │ │ │ -_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:356 │ │ │ │ │ -_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:482 │ │ │ │ │ -_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:528 │ │ │ │ │ -_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:445 │ │ │ │ │ -_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:420 │ │ │ │ │ -_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() │ │ │ │ │ -destructor │ │ │ │ │ -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:462 │ │ │ │ │ -_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_:_:_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_:_:_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_:_:_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_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:518 │ │ │ │ │ -_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:329 │ │ │ │ │ -_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 │ │ │ │ │ +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 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:76 │ │ │ │ │ -_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: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 │ │ │ │ │ -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_ _> │ │ │ │ │ +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_:_:_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:848 │ │ │ │ │ -_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:929 │ │ │ │ │ -_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:941 │ │ │ │ │ -_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:1121 │ │ │ │ │ -_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:275 │ │ │ │ │ -_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 │ │ │ │ │ +_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:518 │ │ │ │ │ +_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:307 │ │ │ │ │ +_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:296 │ │ │ │ │ _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/a00686.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: geometrycache.hh File Reference │ │ │ │ +dune-grid: algebra.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,38 +70,76 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
geometrycache.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Functions
│ │ │ │ +
algebra.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/grid/albertagrid/misc.hh>
│ │ │ │ -#include <dune/grid/albertagrid/algebra.hh>
│ │ │ │ +
#include <dune/common/fvector.hh>
│ │ │ │ +#include <dune/common/fmatrix.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ -Classes

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

│ │ │ │ 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)
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,25 +1,77 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ -#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> │ │ │ │ │ +_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_. │ │ │ │ │ -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_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_P_r_o_x_y_<_ _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 │ │ │ │ │   │ │ │ │ │ +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/a00686_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: geometrycache.hh Source File │ │ │ │ +dune-grid: algebra.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,187 +74,197 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
geometrycache.hh
│ │ │ │ +
algebra.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_ALGEBRA_HH
│ │ │ │ +
6#define DUNE_ALBERTA_ALGEBRA_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ - │ │ │ │ +
8#include <dune/common/fvector.hh>
│ │ │ │ +
9#include <dune/common/fmatrix.hh>
│ │ │ │
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);
│ │ │ │ +
11namespace Dune
│ │ │ │ +
12{
│ │ │ │ +
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
│ │ │ │
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 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;
│ │ │ │ +
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 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 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 };
│ │ │ │ +
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 } // 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
│ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ +
static FieldVector< K, 3 > vectorProduct(const FieldVector< K, 3 > &u, const FieldVector< K, 3 > &v)
Definition algebra.hh:19
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,210 +1,179 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ +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 © 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_ALGEBRA_HH │ │ │ │ │ +6#define DUNE_ALBERTA_ALGEBRA_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); │ │ │ │ │ +11namespace _D_u_n_e │ │ │ │ │ +12{ │ │ │ │ │ +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 │ │ │ │ │ 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; │ │ │ │ │ +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 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 }; │ │ │ │ │ -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; │ │ │ │ │ +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 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 │ │ │ │ │ -_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 }; │ │ │ │ │ +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 } // 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 │ │ │ │ │ -_m_i_s_c_._h_h │ │ │ │ │ -_A_L_B_E_R_T_A │ │ │ │ │ -#define ALBERTA │ │ │ │ │ -DDeeffiinniittiioonn albertaheader.hh:29 │ │ │ │ │ +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_:_:_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 │ │ │ │ │ +_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/a00689.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: misc.hh File Reference │ │ │ │ +dune-grid: entity.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,182 +70,42 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ Namespaces | │ │ │ │ -Macros | │ │ │ │ -Typedefs | │ │ │ │ -Functions | │ │ │ │ -Variables
│ │ │ │ -
misc.hh File Reference
│ │ │ │ +Macros
│ │ │ │ +
entity.cc 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>
│ │ │ │ -
│ │ │ │ + │ │ │ │

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

│ │ │ │ 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
 
#define DUNE_ALBERTA_ENTITY_CC
 
│ │ │ │

Macro Definition Documentation

│ │ │ │ - │ │ │ │ -

◆ DUNE_ALBERTA_CACHE_COORDINATES

│ │ │ │ + │ │ │ │ +

◆ DUNE_ALBERTA_ENTITY_CC

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │
#define DUNE_ALBERTA_CACHE_COORDINATES   1#define DUNE_ALBERTA_ENTITY_CC
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,150 +1,22 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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> │ │ │ │ │ +_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_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 │ │ │ │ │ +#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__CCAACCHHEE__CCOOOORRDDIINNAATTEESS ********** │ │ │ │ │ -#define DUNE_ALBERTA_CACHE_COORDINATES   1 │ │ │ │ │ +********** _?◆_? 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/a00689_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: misc.hh Source File │ │ │ │ +dune-grid: entity.cc Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,870 +74,493 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
misc.hh
│ │ │ │ +
entity.cc
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_ENTITY_CC
│ │ │ │ +
6#define DUNE_ALBERTA_ENTITY_CC
│ │ │ │
7
│ │ │ │ -
8#include <cassert>
│ │ │ │ -
9#include <utility>
│ │ │ │ +
8namespace Dune
│ │ │ │ +
9{
│ │ │ │
10
│ │ │ │ -
11#include <dune/common/exceptions.hh>
│ │ │ │ -
12#include <dune/common/hybridutilities.hh>
│ │ │ │ -
13#include <dune/common/typetraits.hh>
│ │ │ │ -
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{
│ │ │ │ -
26
│ │ │ │ -
27 // Exceptions
│ │ │ │ -
28 // ----------
│ │ │ │ +
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 {}
│ │ │ │ +
│ │ │ │ +
21
│ │ │ │ +
22 template<int codim, int dim, class Grid>
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
25 : grid_( &grid ),
│ │ │ │ +
26 elementInfo_(),
│ │ │ │ +
27 subEntity_( -1 )
│ │ │ │ +
28 {}
│ │ │ │ +
│ │ │ │
29
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
31 : public Exception
│ │ │ │ -
32 {};
│ │ │ │ -
│ │ │ │ -
33
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
35 : public IOError
│ │ │ │ -
36 {};
│ │ │ │ +
30 template<int codim, int dim, class Grid>
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
33 : grid_( NULL ),
│ │ │ │ +
34 elementInfo_(),
│ │ │ │ +
35 subEntity_( -1 )
│ │ │ │ +
36 {}
│ │ │ │
│ │ │ │
37
│ │ │ │ -
38
│ │ │ │ -
39
│ │ │ │ -
40 namespace Alberta
│ │ │ │ -
41 {
│ │ │ │ -
42
│ │ │ │ -
43 // Import Types
│ │ │ │ -
44 // ------------
│ │ │ │ +
38 template< int codim, int dim, class Grid >
│ │ │ │ +
39 inline PartitionType
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
41 {
│ │ │ │ +
42 return InteriorEntity;
│ │ │ │ +
43 }
│ │ │ │ +
│ │ │ │ +
44
│ │ │ │
45
│ │ │ │ -
46 static const int dimWorld = DIM_OF_WORLD;
│ │ │ │ -
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;
│ │ │ │ +
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 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;
│ │ │ │ +
59
│ │ │ │ +
60 template< int codim, int dim, class Grid >
│ │ │ │ +
61 inline ALBERTA EL_INFO *
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
63 {
│ │ │ │ +
64 return &(elementInfo_.elInfo());
│ │ │ │ +
65 }
│ │ │ │ +
│ │ │ │
66
│ │ │ │
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 }
│ │ │ │ +
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 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 // -----------
│ │ │ │ +
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
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
102 {
│ │ │ │ -
103 typedef GlobalSpace This;
│ │ │ │ -
104
│ │ │ │ -
105 public:
│ │ │ │ - │ │ │ │ - │ │ │ │ -
108
│ │ │ │ -
109 private:
│ │ │ │ -
110 Matrix identityMatrix_;
│ │ │ │ -
111 Vector nullVector_;
│ │ │ │ +
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 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 }
│ │ │ │ +
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 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 // --------------
│ │ │ │ +
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 template< int dim, int codim >
│ │ │ │ - │ │ │ │ -
149
│ │ │ │ -
150 template< int dim >
│ │ │ │ -
│ │ │ │ -
151 struct NumSubEntities< dim, 0 >
│ │ │ │ -
152 {
│ │ │ │ -
153 static const int value = 1;
│ │ │ │ -
154 };
│ │ │ │ +
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 >
│ │ │ │ -
│ │ │ │ -
157 struct NumSubEntities< dim, dim >
│ │ │ │ -
158 {
│ │ │ │ -
159 static const int value = dim+1;
│ │ │ │ -
160 };
│ │ │ │ +
156 template< int dim, class Grid >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
158 {
│ │ │ │ +
159 return grid().levelProvider().isNew( elementInfo_ );
│ │ │ │ +
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 };
│ │ │ │ +
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<>
│ │ │ │ -
│ │ │ │ -
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 };
│ │ │ │ +
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
│ │ │ │ -
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;
│ │ │ │ +
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 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;
│ │ │ │ +
240 template< int dim, class Grid >
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
242 ::setElement ( const ElementInfo &elementInfo, int /* subEntity */ )
│ │ │ │ +
243 {
│ │ │ │ +
244 elementInfo_ = elementInfo;
│ │ │ │ +
245 }
│ │ │ │ +
│ │ │ │ +
246
│ │ │ │
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 };
│ │ │ │ +
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
│ │ │ │ -
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 };
│ │ │ │ +
262 assert( elementInfo_ );
│ │ │ │ +
263 const CoordReader coordReader( grid(), elementInfo_, 0 );
│ │ │ │ +
264 return Geometry( GeometryImpl( coordReader ) );
│ │ │ │ +
265 }
│ │ │ │
│ │ │ │ -
278
│ │ │ │ -
279
│ │ │ │ +
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 // Dune2AlbertaNumbering
│ │ │ │ -
282 // ---------------------
│ │ │ │ +
281 assert( elementInfo_ );
│ │ │ │ +
282 const ElementInfo fatherInfo = elementInfo_.father();
│ │ │ │
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 };
│ │ │ │ +
284 return EntityImpl( grid(), fatherInfo, 0 );
│ │ │ │ +
285 }
│ │ │ │
│ │ │ │ +
286
│ │ │ │ +
287
│ │ │ │ +
288 template< int dim, class Grid >
│ │ │ │ + │ │ │ │ +
290 {
│ │ │ │ +
291 return elementInfo_.indexInFather();
│ │ │ │ +
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 };
│ │ │ │ -
│ │ │ │ +
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 template<>
│ │ │ │ -
│ │ │ │ - │ │ │ │ +
332#ifndef NDEBUG
│ │ │ │ +
333 for( int i = 0; i <= dimension; ++i )
│ │ │ │
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 // ------------
│ │ │ │ +
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 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
│ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ + │ │ │ │ +
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,888 +1,505 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ +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 © 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_ENTITY_CC │ │ │ │ │ +_6#define DUNE_ALBERTA_ENTITY_CC │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ +8namespace _D_u_n_e │ │ │ │ │ +9{ │ │ │ │ │ 10 │ │ │ │ │ -11#include │ │ │ │ │ -12#include │ │ │ │ │ -13#include │ │ │ │ │ -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{ │ │ │ │ │ -26 │ │ │ │ │ -27 // Exceptions │ │ │ │ │ -28 // ---------- │ │ │ │ │ +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 {} │ │ │ │ │ +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 │ │ │ │ │ -_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 {}; │ │ │ │ │ +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 │ │ │ │ │ -39 │ │ │ │ │ -40 namespace Alberta │ │ │ │ │ +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 │ │ │ │ │ -43 // Import Types │ │ │ │ │ -44 // ------------ │ │ │ │ │ +42 return _I_n_t_e_r_i_o_r_E_n_t_i_t_y; │ │ │ │ │ +43 } │ │ │ │ │ +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 │ │ │ │ │ -_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; │ │ │ │ │ +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 │ │ │ │ │ -_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; │ │ │ │ │ +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 │ │ │ │ │ -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 ); │ │ │ │ │ +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 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 // ----------- │ │ │ │ │ +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 │ │ │ │ │ -_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_; │ │ │ │ │ +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 _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 } │ │ │ │ │ +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 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 // -------------- │ │ │ │ │ +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 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 }; │ │ │ │ │ +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 > │ │ │ │ │ -_1_5_7 struct _N_u_m_S_u_b_E_n_t_i_t_i_e_s< dim, dim > │ │ │ │ │ +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 { │ │ │ │ │ -_1_5_9 static const int value = dim+1; │ │ │ │ │ -160 }; │ │ │ │ │ +159 return _g_r_i_d().levelProvider().isNew( elementInfo_ ); │ │ │ │ │ +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 }; │ │ │ │ │ +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<> │ │ │ │ │ -_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 }; │ │ │ │ │ +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 │ │ │ │ │ -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; │ │ │ │ │ +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 │ │ │ │ │ -_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; │ │ │ │ │ +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 │ │ │ │ │ -_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; │ │ │ │ │ +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#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 }; │ │ │ │ │ +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 │ │ │ │ │ -263 │ │ │ │ │ -264 // RefinementEdge │ │ │ │ │ -265 // -------------- │ │ │ │ │ +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 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 │ │ │ │ │ +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 // Dune2AlbertaNumbering │ │ │ │ │ -282 // --------------------- │ │ │ │ │ +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 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 }; │ │ │ │ │ +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 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 }; │ │ │ │ │ +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 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 > │ │ │ │ │ +332#ifndef NDEBUG │ │ │ │ │ +333 for( int i = 0; i <= _d_i_m_e_n_s_i_o_n; ++i ) │ │ │ │ │ 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 // ------------ │ │ │ │ │ +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 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 │ │ │ │ │ +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_:_:_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_:_:_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 │ │ │ │ │ +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 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/a00692.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: coordcache.hh File Reference │ │ │ │ +dune-grid: undefine-2.0.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -69,43 +69,25 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
coordcache.hh File Reference
│ │ │ │ +
undefine-2.0.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/grid/albertagrid/meshpointer.hh>
│ │ │ │ -#include <dune/grid/albertagrid/dofadmin.hh>
│ │ │ │ -#include <dune/grid/albertagrid/dofvector.hh>
│ │ │ │ -
│ │ │ │ + │ │ │ │ +

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

│ │ │ │ + │ │ │ │

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

│ │ │ │ -Namespaces

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

Detailed Description

│ │ │ │ +

Contains #undefs for all preprocessor macros defined by alberta.

│ │ │ │ +

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

│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,28 +1,15 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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> │ │ │ │ │ +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 │ │ │ │ │ - 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 │ │ │ │ │ -  │ │ │ │ │ -NNaammeessppaacceess │ │ │ │ │ -namespace   _D_u_n_e │ │ │ │ │ -  Include standard header files. │ │ │ │ │ -  │ │ │ │ │ -namespace   _D_u_n_e_:_:_A_l_b_e_r_t_a │ │ │ │ │ -  │ │ │ │ │ +********** 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/a00692_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: coordcache.hh Source File │ │ │ │ +dune-grid: undefine-2.0.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,225 +74,476 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
coordcache.hh
│ │ │ │ +
undefine-2.0.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │ -
7
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
11
│ │ │ │ -
12#if HAVE_ALBERTA
│ │ │ │ -
13
│ │ │ │ -
14namespace Dune
│ │ │ │ -
15{
│ │ │ │ -
16
│ │ │ │ -
17 namespace Alberta
│ │ │ │ -
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 // CoordCache
│ │ │ │ -
21 // ----------
│ │ │ │ -
22
│ │ │ │ -
23 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
25 {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
28
│ │ │ │ -
29 class LocalCaching;
│ │ │ │ -
30 struct Interpolation;
│ │ │ │ +
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 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 );
│ │ │ │ +
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#ifdef N_VERTICES_0D
│ │ │ │ +
53 #undef N_VERTICES_0D
│ │ │ │ +
54#endif // N_VERTICES_0D
│ │ │ │
55
│ │ │ │ -
56 coords_.create( dofSpace, "Coordinate Cache" );
│ │ │ │ -
57 LocalCaching localCaching( coords_ );
│ │ │ │ - │ │ │ │ -
59 coords_.template setupInterpolation< Interpolation >();
│ │ │ │ -
60
│ │ │ │ -
61 dofAccess_ = DofAccess( dofSpace );
│ │ │ │ -
62 }
│ │ │ │ -
│ │ │ │ +
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 void release ()
│ │ │ │ -
65 {
│ │ │ │ -
66 coords_.release();
│ │ │ │ -
67 }
│ │ │ │ -
│ │ │ │ -
68
│ │ │ │ -
69 private:
│ │ │ │ -
70 CoordVectorPointer coords_;
│ │ │ │ -
71 DofAccess dofAccess_;
│ │ │ │ -
72 };
│ │ │ │ -
│ │ │ │ -
73
│ │ │ │ -
74
│ │ │ │ +
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 // 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 };
│ │ │ │ -
│ │ │ │ +
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#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#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
│ │ │ │ -
105
│ │ │ │ -
106 // CoordCache::Interpolation
│ │ │ │ -
107 // -------------------------
│ │ │ │ -
108
│ │ │ │ -
109 template< int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
111 {
│ │ │ │ -
112 static const int dimension = dim;
│ │ │ │ -
113
│ │ │ │ - │ │ │ │ +
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 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 ];
│ │ │ │ +
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 // new vertex is always the last one
│ │ │ │ -
125 assert( element->child[ 0 ] != NULL );
│ │ │ │ -
126 GlobalVector &newCoord = array[ dofAccess( element->child[ 0 ], dimension ) ];
│ │ │ │ +
124#ifdef N_NEIGH_3D
│ │ │ │ +
125 #undef N_NEIGH_3D
│ │ │ │ +
126#endif // N_NEIGH_3D
│ │ │ │
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#endif // #ifndef DUNE_ALBERTA_COORDCACHE_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ -
provides a wrapper for ALBERTA's mesh structure
│ │ │ │ -
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_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
│ │ │ │ +
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
│ │ │ │ +
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
│ │ │ │ +
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
│ │ │ │ +
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
│ │ │ │ +
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#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
│ │ │ │ +
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#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
│ │ │ │ +
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
│ │ │ │ +
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
│ │ │ │ +
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,259 +1,471 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ +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 © 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 │ │ │ │ │ -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 { │ │ │ │ │ +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 // 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; │ │ │ │ │ +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 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 │ │ │ │ │ -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 ); │ │ │ │ │ +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#ifdef N_VERTICES_0D │ │ │ │ │ +53 #undef N_VERTICES_0D │ │ │ │ │ +54#endif // N_VERTICES_0D │ │ │ │ │ 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 } │ │ │ │ │ +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 │ │ │ │ │ -_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 │ │ │ │ │ +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 // 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 }; │ │ │ │ │ +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#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#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 │ │ │ │ │ -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; │ │ │ │ │ +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 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 ]; │ │ │ │ │ +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 // 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 ) │ │ │ │ │ -]; │ │ │ │ │ +124#ifdef N_NEIGH_3D │ │ │ │ │ +125 #undef N_NEIGH_3D │ │ │ │ │ +126#endif // N_NEIGH_3D │ │ │ │ │ 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#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_:_:_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 │ │ │ │ │ +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 │ │ │ │ │ +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 │ │ │ │ │ +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 │ │ │ │ │ +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 │ │ │ │ │ +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#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 │ │ │ │ │ +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#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 │ │ │ │ │ +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 │ │ │ │ │ +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 │ │ │ │ │ +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/a00701.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: geometryreference.hh File Reference │ │ │ │ +dune-grid: leveliterator.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,41 +72,35 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
geometryreference.hh File Reference
│ │ │ │ +
leveliterator.hh 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 <dune/grid/common/entityiterator.hh>
│ │ │ │ +#include <dune/grid/albertagrid/treeiterator.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::GeometryReference< Implementation >
class  Dune::AlbertaGridLevelIterator< codim, pitype, GridImp >
 
class  Dune::LocalGeometryReference< mydim, cdim, Grid >
class  Dune::AlbertaGridLevelIterator< codim, Ghost_Partition, GridImp >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

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

Detailed Description

│ │ │ │ -

Wrapper and interface classes for element geometries.

│ │ │ │ -
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,26 +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 │ │ │ │ │ -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> │ │ │ │ │ +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_:_:_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_:_:_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_:_:_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_ _> │ │ │ │ │ +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. │ │ │ │ │   │ │ │ │ │ -********** 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/a00701_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: geometryreference.hh Source File │ │ │ │ +dune-grid: leveliterator.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,225 +74,145 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
geometryreference.hh
│ │ │ │ +
leveliterator.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_ALBERTA_LEVELITERATOR_HH
│ │ │ │ +
6#define DUNE_ALBERTA_LEVELITERATOR_HH
│ │ │ │
7
│ │ │ │ -
12#include <dune/common/typetraits.hh>
│ │ │ │ + │ │ │ │ +
9
│ │ │ │ + │ │ │ │ +
11
│ │ │ │ +
12#if HAVE_ALBERTA
│ │ │ │
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;
│ │ │ │ -
37
│ │ │ │ -
38 typedef typename Implementation::JacobianInverseTransposed JacobianInverseTransposed;
│ │ │ │ -
39 typedef typename Implementation::JacobianTransposed JacobianTransposed;
│ │ │ │ -
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>())});
│ │ │ │ +
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
│ │ │ │ -
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>()));
│ │ │ │ +
│ │ │ │ +
47 void increment ()
│ │ │ │ +
48 {
│ │ │ │ + │ │ │ │ +
50 }
│ │ │ │ +
│ │ │ │ +
51 };
│ │ │ │ +
│ │ │ │
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:
│ │ │ │ +
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
│ │ │ │ -
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(); }
│ │ │ │ -
82
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
84 {
│ │ │ │ -
85 return impl().global( local );
│ │ │ │ -
86 }
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
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
│ │ │ │ -
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
│ │ │ │ +
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
│ │ │ │ -
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.
│ │ │ │ +
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
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,277 +1,175 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ +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 © 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_ALBERTA_LEVELITERATOR_HH │ │ │ │ │ +6#define DUNE_ALBERTA_LEVELITERATOR_HH │ │ │ │ │ 7 │ │ │ │ │ -12#include │ │ │ │ │ +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 │ │ │ │ │ -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; │ │ │ │ │ -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 private: │ │ │ │ │ -42 │ │ │ │ │ -43 template │ │ │ │ │ -44 using JacobianInverseOfImplementation = decltype(typename Implementation_T:: │ │ │ │ │ -JacobianInverse{std::declval().jacobianInverse(std:: │ │ │ │ │ -declval())}); │ │ │ │ │ +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; │ │ │ │ │ +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 │ │ │ │ │ -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 │ │ │ │ │ -())); │ │ │ │ │ +_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 │ │ │ │ │ -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: │ │ │ │ │ +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_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(); } │ │ │ │ │ -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 } │ │ │ │ │ +_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 │ │ │ │ │ -_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 │ │ │ │ │ -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 │ │ │ │ │ +88#endif // #if HAVE_ALBERTA │ │ │ │ │ +89 │ │ │ │ │ +90#endif // #ifndef DUNE_ALBERTA_LEVELITERATOR_HH │ │ │ │ │ +_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_:_:_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_:_:_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 │ │ │ │ │ +_e_n_t_i_t_y_i_t_e_r_a_t_o_r_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00707.html │ │ │ │ @@ -77,16 +77,16 @@ │ │ │ │ Namespaces
│ │ │ │
elementinfo.cc File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

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

│ │ │ │ -
#include <dune/grid/albertagrid/elementinfo.hh>
│ │ │ │ -#include <dune/grid/albertagrid/meshpointer.hh>
│ │ │ │ +
#include <dune/grid/albertagrid/elementinfo.hh>
│ │ │ │ +#include <dune/grid/albertagrid/meshpointer.hh>
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00710.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: leveliterator.hh File Reference │ │ │ │ +dune-grid: treeiterator.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,27 +72,33 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
leveliterator.hh File Reference
│ │ │ │ +
treeiterator.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/grid/common/entityiterator.hh>
│ │ │ │ -#include <dune/grid/albertagrid/treeiterator.hh>
│ │ │ │ +
#include <utility>
│ │ │ │ +#include <dune/common/hybridutilities.hh>
│ │ │ │ +#include <dune/common/typetraits.hh>
│ │ │ │ +#include <dune/grid/albertagrid/elementinfo.hh>
│ │ │ │ +#include <dune/grid/albertagrid/meshpointer.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Namespaces

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

│ │ │ │ Classes

class  Dune::AlbertaGridLevelIterator< codim, pitype, GridImp >
class  Dune::AlbertaMarkerVector< dim, dimworld >
 marker assigning subentities to one element containing them More...
 
class  Dune::AlbertaGridLevelIterator< codim, Ghost_Partition, GridImp >
struct  Dune::AlbertaMarkerVector< dim, dimworld >::MarkSubEntities< bool >::Codim< codim >
 
class  Dune::AlbertaGridTreeIterator< codim, GridImp, leafIterator >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,22 +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 │ │ │ │ │ -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> │ │ │ │ │ +treeiterator.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#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> │ │ │ │ │ _G_o_ _t_o_ _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_M_a_r_k_e_r_V_e_c_t_o_r_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _> │ │ │ │ │ +  marker assigning subentities to one element containing them _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ -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_M_a_r_k_e_r_V_e_c_t_o_r_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_M_a_r_k_S_u_b_E_n_t_i_t_i_e_s_<_ _b_o_o_l_ _>_:_: │ │ │ │ │ + _C_o_d_i_m_<_ _c_o_d_i_m_ _> │ │ │ │ │ +  │ │ │ │ │ + class   _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_,_ _l_e_a_f_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/a00710_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: leveliterator.hh Source File │ │ │ │ +dune-grid: treeiterator.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,145 +74,647 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
leveliterator.hh
│ │ │ │ +
treeiterator.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │ -
7
│ │ │ │ - │ │ │ │ -
9
│ │ │ │ - │ │ │ │ -
11
│ │ │ │ -
12#if HAVE_ALBERTA
│ │ │ │ +
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
│ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ -
51 };
│ │ │ │ -
│ │ │ │ -
52
│ │ │ │ -
53
│ │ │ │ -
54 template< int codim, class GridImp >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
56 : public AlbertaGridTreeIterator< codim, GridImp, false >
│ │ │ │ -
57 {
│ │ │ │ - │ │ │ │ - │ │ │ │ +
17#if HAVE_ALBERTA
│ │ │ │ +
18
│ │ │ │ +
19namespace Dune
│ │ │ │ +
20{
│ │ │ │ +
21
│ │ │ │ +
22 // AlbertaMarkerVector
│ │ │ │ +
23 // -------------------
│ │ │ │ +
24
│ │ │ │ +
33 template< int dim, int dimworld >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
35 {
│ │ │ │ + │ │ │ │ +
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 public:
│ │ │ │ -
62 typedef typename Base::Entity Entity;
│ │ │ │ - │ │ │ │ -
64
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
66 {}
│ │ │ │ +
│ │ │ │ +
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 AlbertaGridLevelIterator ( const GridImp &grid, int level )
│ │ │ │ -
70 : Base( grid, level )
│ │ │ │ -
71 {}
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
69 {
│ │ │ │ +
70 clear();
│ │ │ │ +
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
│ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ +
93
│ │ │ │ +
│ │ │ │ +
95 bool up2Date () const
│ │ │ │ +
96 {
│ │ │ │ +
97 return (marker_[ dimension ] != 0);
│ │ │ │ +
98 }
│ │ │ │ +
│ │ │ │ +
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 ];
│ │ │ │ +
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 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 // -----------------------
│ │ │ │ +
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
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ +
235
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
238 {
│ │ │ │ +
239 return entity_;
│ │ │ │ +
240 }
│ │ │ │ +
│ │ │ │ +
241
│ │ │ │ +
│ │ │ │ +
243 int level () const
│ │ │ │ +
244 {
│ │ │ │ +
245 return entity_.impl().level();
│ │ │ │ +
246 }
│ │ │ │ +
│ │ │ │ +
247
│ │ │ │ +
│ │ │ │ +
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 );
│ │ │ │ +
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 };
│ │ │ │ +
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 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
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ + │ │ │ │ +
static const int dimension
Definition agrid.hh:145
│ │ │ │ + │ │ │ │ + │ │ │ │ +
int size(int codim) const
Definition dofadmin.hh:163
│ │ │ │ + │ │ │ │
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
│ │ │ │ +
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:1122
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,175 +1,690 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ +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 © 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 │ │ │ │ │ -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 │ │ │ │ │ +5 │ │ │ │ │ +6#ifndef DUNE_ALBERTA_TREEITERATOR_HH │ │ │ │ │ +7#define DUNE_ALBERTA_TREEITERATOR_HH │ │ │ │ │ +8 │ │ │ │ │ +9#include │ │ │ │ │ +10 │ │ │ │ │ +11#include │ │ │ │ │ +12#include │ │ │ │ │ 13 │ │ │ │ │ -14namespace _D_u_n_e │ │ │ │ │ -15{ │ │ │ │ │ +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 // 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; │ │ │ │ │ -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; │ │ │ │ │ +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 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 │ │ │ │ │ -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 {} │ │ │ │ │ +_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_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 {} │ │ │ │ │ +_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 │ │ │ │ │ -_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 │ │ │ │ │ -_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 │ │ │ │ │ +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 } │ │ │ │ │ +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 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[ 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 _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 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 // ----------------------- │ │ │ │ │ +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_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 } │ │ │ │ │ +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 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 ); │ │ │ │ │ +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_; │ │ │ │ │ +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 │ │ │ │ │ +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 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 │ │ │ │ │ +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 │ │ │ │ │ +_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_:_:_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_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _f_a_l_s_e_ _>_:_:_E_n_t_i_t_y │ │ │ │ │ +_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_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _f_a_l_s_e_ _>_:_:_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_:_:_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 │ │ │ │ │ +_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_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _f_a_l_s_e_ _>_:_:_g_r_i_d │ │ │ │ │ +_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_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) │ │ │ │ │ +_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 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 │ │ │ │ │ +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 │ │ │ │ │ -_e_n_t_i_t_y_i_t_e_r_a_t_o_r_._h_h │ │ │ │ │ +_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:1122 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00713.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: albertaheader.hh File Reference │ │ │ │ +dune-grid: macrodata.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,122 +70,37 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -Macros
│ │ │ │ -
albertaheader.hh File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
macrodata.cc File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <alberta/alberta.h>
│ │ │ │ -
│ │ │ │ -

Go to the source code of this file.

│ │ │ │ -

│ │ │ │ Namespaces

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

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

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

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

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

│ │ │ │ +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 {} │ │ │ │ │ @@ -1,39 +1,26 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ -_G_o_ _t_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 │ │ │ │ │ +_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 <_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 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00716.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: treeiterator.hh File Reference │ │ │ │ +dune-grid: geometryreference.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,41 +72,41 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
treeiterator.hh File Reference
│ │ │ │ +
geometryreference.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>
│ │ │ │ + │ │ │ │ +

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.

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

│ │ │ │ Classes

class  Dune::AlbertaMarkerVector< dim, dimworld >
 marker assigning subentities to one element containing them More...
 
struct  Dune::AlbertaMarkerVector< dim, dimworld >::MarkSubEntities< bool >::Codim< codim >
class  Dune::GeometryReference< Implementation >
 
class  Dune::AlbertaGridTreeIterator< codim, GridImp, leafIterator >
class  Dune::LocalGeometryReference< mydim, cdim, Grid >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

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

Detailed Description

│ │ │ │ +

Wrapper and interface classes for element geometries.

│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── 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 │ │ │ │ │ -treeiterator.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +geometryreference.hh File Reference │ │ │ │ │ +Wrapper and interface classes for element geometries. _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> │ │ │ │ │ +#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_:_:_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_ _> │ │ │ │ │ -  marker assigning subentities to one element containing them _M_o_r_e_._._. │ │ │ │ │ +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_ _> │ │ │ │ │   │ │ │ │ │ -struct   _D_u_n_e_:_:_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_ _>_:_:_M_a_r_k_S_u_b_E_n_t_i_t_i_e_s_<_ _b_o_o_l_ _>_:_: │ │ │ │ │ - _C_o_d_i_m_<_ _c_o_d_i_m_ _> │ │ │ │ │ -  │ │ │ │ │ - class   _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_,_ _l_e_a_f_I_t_e_r_a_t_o_r_ _> │ │ │ │ │ +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. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00716_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: treeiterator.hh Source File │ │ │ │ +dune-grid: geometryreference.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,647 +74,225 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
treeiterator.hh
│ │ │ │ +
geometryreference.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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>
│ │ │ │ +
5#ifndef DUNE_GRID_ALBERTAGRID_GEOMETRYREFERENCE_HH
│ │ │ │ +
6#define DUNE_GRID_ALBERTAGRID_GEOMETRYREFERENCE_HH
│ │ │ │ +
7
│ │ │ │
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 {
│ │ │ │ - │ │ │ │ +
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;
│ │ │ │
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 }
│ │ │ │ -
│ │ │ │ +
38 typedef typename Implementation::JacobianInverseTransposed JacobianInverseTransposed;
│ │ │ │ +
39 typedef typename Implementation::JacobianTransposed JacobianTransposed;
│ │ │ │ +
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
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ -
93
│ │ │ │ -
│ │ │ │ -
95 bool up2Date () const
│ │ │ │ -
96 {
│ │ │ │ -
97 return (marker_[ dimension ] != 0);
│ │ │ │ -
98 }
│ │ │ │ +
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(); }
│ │ │ │ +
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 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 ];
│ │ │ │ -
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 }
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
101 {
│ │ │ │ +
102 return impl().jacobianTransposed( local );
│ │ │ │ +
103 }
│ │ │ │ +
│ │ │ │ +
104
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
106 {
│ │ │ │ +
107 return impl().jacobianInverseTransposed( local );
│ │ │ │ +
108 }
│ │ │ │
│ │ │ │ -
154 };
│ │ │ │ +
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
│ │ │ │ +
149
│ │ │ │ +
150 // Definitions of GeometryReference
│ │ │ │ +
151 // --------------------------------
│ │ │ │ +
152
│ │ │ │ +
153 template< class Implementation >
│ │ │ │ + │ │ │ │
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 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 // -----------------------
│ │ │ │ -
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
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ -
235
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
238 {
│ │ │ │ -
239 return entity_;
│ │ │ │ -
240 }
│ │ │ │ -
│ │ │ │ -
241
│ │ │ │ -
│ │ │ │ -
243 int level () const
│ │ │ │ -
244 {
│ │ │ │ -
245 return entity_.impl().level();
│ │ │ │ -
246 }
│ │ │ │ -
│ │ │ │ -
247
│ │ │ │ -
│ │ │ │ -
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 );
│ │ │ │ -
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 };
│ │ │ │ -
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 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
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
provides a wrapper for ALBERTA's mesh structure
│ │ │ │ -
provides a wrapper for ALBERTA's el_info structure
│ │ │ │ -
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ │ +
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 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:1122
│ │ │ │ +
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,690 +1,277 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ +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 © 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 │ │ │ │ │ +5#ifndef DUNE_GRID_ALBERTAGRID_GEOMETRYREFERENCE_HH │ │ │ │ │ +6#define DUNE_GRID_ALBERTAGRID_GEOMETRYREFERENCE_HH │ │ │ │ │ +7 │ │ │ │ │ 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; │ │ │ │ │ +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; │ │ │ │ │ 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 } │ │ │ │ │ +_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 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 _~_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; │ │ │ │ │ +_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(); } │ │ │ │ │ +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 } │ │ │ │ │ -93 │ │ │ │ │ -_9_5 bool _u_p_2_D_a_t_e () const │ │ │ │ │ -96 { │ │ │ │ │ -97 return (marker_[ dimension ] != 0); │ │ │ │ │ -98 } │ │ │ │ │ +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_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 │ │ │ │ │ +_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 │ │ │ │ │ -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 │ │ │ │ │ +_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 │ │ │ │ │ -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[ 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 }; │ │ │ │ │ +_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 │ │ │ │ │ +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< 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 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 // ----------------------- │ │ │ │ │ -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_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 } │ │ │ │ │ -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 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 ); │ │ │ │ │ -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_; │ │ │ │ │ -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 │ │ │ │ │ -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 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 │ │ │ │ │ -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 │ │ │ │ │ -_A_L_B_E_R_T_A │ │ │ │ │ -#define ALBERTA │ │ │ │ │ -DDeeffiinniittiioonn albertaheader.hh:29 │ │ │ │ │ +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_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_:_:_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 │ │ │ │ │ -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:1122 │ │ │ │ │ +_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/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 © 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
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
identitygridentityseed.hh
│ │ │ │ +
identitygridleveliterator.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_IDENTITYGRIDLEVELITERATOR_HH
│ │ │ │ +
6#define DUNE_IDENTITYGRIDLEVELITERATOR_HH
│ │ │ │
7
│ │ │ │ + │ │ │ │ +
9
│ │ │ │
14namespace Dune {
│ │ │ │
15
│ │ │ │ -
16
│ │ │ │ -
22 template<int codim, class GridImp>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
24 {
│ │ │ │ -
25 protected:
│ │ │ │ +
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 public:
│ │ │ │
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;
│ │ │ │ +
27 constexpr static int codimension = codim;
│ │ │ │ +
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 {}
│ │ │ │ +
│ │ │ │
36
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
41 {}
│ │ │ │ -
│ │ │ │ -
42
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
50 hostEntitySeed_(hostEntity.seed())
│ │ │ │ -
51 {}
│ │ │ │ -
│ │ │ │ -
52
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
57 {
│ │ │ │ -
58 return hostEntitySeed_;
│ │ │ │ -
59 }
│ │ │ │ -
│ │ │ │ -
60
│ │ │ │ -
│ │ │ │ -
64 bool isValid() const
│ │ │ │ -
65 {
│ │ │ │ -
66 return hostEntitySeed_.isValid();
│ │ │ │ -
67 }
│ │ │ │ +
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 };
│ │ │ │
│ │ │ │ -
68 private:
│ │ │ │
69
│ │ │ │ -
70 HostEntitySeed hostEntitySeed_;
│ │ │ │ -
71 };
│ │ │ │ -
│ │ │ │ +
70
│ │ │ │ +
71} // namespace Dune
│ │ │ │
72
│ │ │ │ -
73} // namespace Dune
│ │ │ │ -
74
│ │ │ │ -
75#endif // #define DUNE_IDENTITY_GRID_ENTITY_SEED_HH
│ │ │ │ +
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:788
│ │ │ │
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
│ │ │ │ +
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,96 +1,112 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ +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 © 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_IDENTITYGRIDLEVELITERATOR_HH │ │ │ │ │ +6#define DUNE_IDENTITYGRIDLEVELITERATOR_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 │ │ │ │ │ -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: │ │ │ │ │ +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 public: │ │ │ │ │ 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; │ │ │ │ │ +_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 │ │ │ │ │ +_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 │ │ │ │ │ -_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: │ │ │ │ │ +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 _H_o_s_t_E_n_t_i_t_y_S_e_e_d hostEntitySeed_; │ │ │ │ │ -71 }; │ │ │ │ │ +70 │ │ │ │ │ +71} // namespace Dune │ │ │ │ │ 72 │ │ │ │ │ -73} // namespace Dune │ │ │ │ │ -74 │ │ │ │ │ -75#endif // #define DUNE_IDENTITY_GRID_ENTITY_SEED_HH │ │ │ │ │ +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:788 │ │ │ │ │ _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 │ │ │ │ │ +_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 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 │ │ │ │ │ +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/a00740.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/a00740_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 © 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:805
│ │ │ │ +
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.10 │ │ │ │ │ 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 © 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:805 │ │ │ │ │ +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/a00743.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/a00743_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 © DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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:96
│ │ │ │ +
Definition identitygridindexsets.hh:185
│ │ │ │ +
Definition identitygridindexsets.hh:237
│ │ │ │ +
Different resources needed by all grid implementations.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,500 +1,620 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 © DUNE Project contributors, see file │ │ │ │ │ +1// SPDX-FileCopyrightText: Copyright © 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:96 │ │ │ │ │ +_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:185 │ │ │ │ │ +_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:237 │ │ │ │ │ +_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/a00746.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: identitygridintersectioniterator.hh File Reference │ │ │ │ +dune-grid: identitygridintersections.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,42 +72,41 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
identitygridintersectioniterator.hh File Reference
│ │ │ │ +
identitygridintersections.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

The IdentityGridLeafIntersectionIterator and IdentityGridLevelIntersectionIterator classes. │ │ │ │ +

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

│ │ │ │ -
#include "identitygridintersections.hh"
│ │ │ │ -#include "identitygridentity.hh"
│ │ │ │ -#include <dune/grid/common/intersection.hh>
│ │ │ │ +
#include "identitygridleafiterator.hh"
│ │ │ │ +#include <dune/grid/identitygrid/identitygridentity.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::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::IdentityGridLevelIntersectionIterator< GridImp >
class  Dune::IdentityGridLevelIntersection< GridImp >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │

Detailed Description

│ │ │ │ -

The IdentityGridLeafIntersectionIterator and IdentityGridLevelIntersectionIterator classes.

│ │ │ │ +

The IdentityGridLeafIntersection and IdentityGridLevelIntersection classes.

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,34 +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 │ │ │ │ │ -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> │ │ │ │ │ +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_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_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_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_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 IdentityGridLeafIntersectionIterator and │ │ │ │ │ -IdentityGridLevelIntersectionIterator classes. │ │ │ │ │ +The IdentityGridLeafIntersection and IdentityGridLevelIntersection classes. │ │ │ │ │ =============================================================================== │ │ │ │ │ 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: identitygridintersectioniterator.hh Source File │ │ │ │ +dune-grid: identitygridintersections.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,177 +74,435 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
identitygridintersectioniterator.hh
│ │ │ │ +
identitygridintersections.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_IDENTITYGRID_INTERSECTIONS_HH
│ │ │ │ +
6#define DUNE_IDENTITYGRID_INTERSECTIONS_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │
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;
│ │ │ │ +
15namespace Dune {
│ │ │ │ +
16
│ │ │ │ +
17
│ │ │ │ +
18 // External forward declarations
│ │ │ │ +
19 template< class Grid >
│ │ │ │ +
20 struct HostGridAccess;
│ │ │ │ +
21
│ │ │ │ +
22
│ │ │ │ +
31 template<class GridImp>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
33 {
│ │ │ │
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
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
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 }
│ │ │ │ +
35 friend class IdentityGridLeafIntersectionIterator<GridImp>;
│ │ │ │ +
36
│ │ │ │ +
37 friend struct HostGridAccess< typename std::remove_const< GridImp >::type >;
│ │ │ │ +
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
│ │ │ │ -
│ │ │ │ -
60 void increment() {
│ │ │ │ -
61 ++hostIterator_;
│ │ │ │ -
62 }
│ │ │ │ +
│ │ │ │ +
58 IdentityGridLeafIntersection(const GridImp* identityGrid,
│ │ │ │ +
59 const HostLeafIntersection& hostIntersection)
│ │ │ │ +
60 : identityGrid_(identityGrid)
│ │ │ │ +
61 , hostIntersection_(hostIntersection)
│ │ │ │ +
62 {}
│ │ │ │
│ │ │ │
63
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
66 return IdentityGridLeafIntersection<GridImp>(identityGrid_,*hostIterator_);
│ │ │ │ -
67 }
│ │ │ │ -
│ │ │ │ -
68
│ │ │ │ -
69 private:
│ │ │ │ -
70 //**********************************************************
│ │ │ │ -
71 // private data
│ │ │ │ -
72 //**********************************************************
│ │ │ │ -
73
│ │ │ │ -
74 const GridImp* identityGrid_ = nullptr;
│ │ │ │ -
75 HostLeafIntersectionIterator hostIterator_ = {};
│ │ │ │ -
76 };
│ │ │ │ -
│ │ │ │ -
77
│ │ │ │ -
78
│ │ │ │ -
79
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
82 template<class GridImp>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
84 {
│ │ │ │ -
85 constexpr static int dim = GridImp::dimension;
│ │ │ │ -
86
│ │ │ │ -
87 constexpr static int dimworld = GridImp::dimensionworld;
│ │ │ │ +
81
│ │ │ │ +
│ │ │ │ +
84 Entity outside() const {
│ │ │ │ +
85 return IdentityGridEntity<0,dim,GridImp>(identityGrid_,hostIntersection_.outside());
│ │ │ │ +
86 }
│ │ │ │ +
│ │ │ │ +
87
│ │ │ │
88
│ │ │ │ -
89 // The type used to store coordinates
│ │ │ │ -
90 typedef typename GridImp::ctype ctype;
│ │ │ │ -
91
│ │ │ │ -
92 typedef typename GridImp::HostGridType::LevelGridView::IntersectionIterator HostLevelIntersectionIterator;
│ │ │ │ +
│ │ │ │ +
90 bool boundary () const {
│ │ │ │ +
91 return hostIntersection_.boundary();
│ │ │ │ +
92 }
│ │ │ │ +
│ │ │ │
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 }
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
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 void increment() {
│ │ │ │ -
115 ++hostIterator_;
│ │ │ │ +
114 bool conforming () const {
│ │ │ │ +
115 return hostIntersection_.conforming();
│ │ │ │
116 }
│ │ │ │
│ │ │ │
117
│ │ │ │
│ │ │ │ - │ │ │ │ -
120 return IdentityGridLevelIntersection<GridImp>(identityGrid_,*hostIterator_);
│ │ │ │ +
119 GeometryType type () const {
│ │ │ │ +
120 return hostIntersection_.type();
│ │ │ │
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.
│ │ │ │ +
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
│ │ │ │ -
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition common/intersection.hh:164
│ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ +
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,208 +1,500 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ +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 © DUNE Project contributors, see file │ │ │ │ │ +_1// SPDX-FileCopyrightText: Copyright © 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_IDENTITYGRID_INTERSECTIONS_HH │ │ │ │ │ +6#define DUNE_IDENTITYGRID_INTERSECTIONS_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" │ │ │ │ │ +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 │ │ │ │ │ -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; │ │ │ │ │ +15namespace _D_u_n_e { │ │ │ │ │ +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; │ │ │ │ │ +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 // 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; │ │ │ │ │ -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 } │ │ │ │ │ +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 >; │ │ │ │ │ +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 │ │ │ │ │ -58 │ │ │ │ │ -_6_0 void _i_n_c_r_e_m_e_n_t() { │ │ │ │ │ -61 ++hostIterator_; │ │ │ │ │ -62 } │ │ │ │ │ +_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_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 //********************************************************** │ │ │ │ │ -73 │ │ │ │ │ -74 const GridImp* identityGrid_ = nullptr; │ │ │ │ │ -75 HostLeafIntersectionIterator hostIterator_ = {}; │ │ │ │ │ -76 }; │ │ │ │ │ -77 │ │ │ │ │ -78 │ │ │ │ │ -79 │ │ │ │ │ +_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 │ │ │ │ │ -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; │ │ │ │ │ +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 │ │ │ │ │ -89 // The type used to store coordinates │ │ │ │ │ -90 typedef typename GridImp::ctype ctype; │ │ │ │ │ -91 │ │ │ │ │ -92 typedef typename GridImp::HostGridType::LevelGridView::IntersectionIterator │ │ │ │ │ -HostLevelIntersectionIterator; │ │ │ │ │ +_9_0 bool _b_o_u_n_d_a_r_y () const { │ │ │ │ │ +91 return hostIntersection_.boundary(); │ │ │ │ │ +92 } │ │ │ │ │ 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 │ │ │ │ │ +_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 void _i_n_c_r_e_m_e_n_t() { │ │ │ │ │ -115 ++hostIterator_; │ │ │ │ │ +_1_1_4 bool _c_o_n_f_o_r_m_i_n_g () const { │ │ │ │ │ +115 return hostIntersection_.conforming(); │ │ │ │ │ 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_); │ │ │ │ │ +_1_1_9 GeometryType _t_y_p_e () const { │ │ │ │ │ +120 return hostIntersection_.type(); │ │ │ │ │ 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. │ │ │ │ │ +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_:_:_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_:_:_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_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 │ │ │ │ │ -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_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 │ │ │ │ │ +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 │ │ │ │ │ -_i_n_t_e_r_s_e_c_t_i_o_n_._h_h │ │ │ │ │ +_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/a00749.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: identitygridleveliterator.hh File Reference │ │ │ │ +dune-grid: identitygridintersectioniterator.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,38 +72,42 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
identitygridleveliterator.hh File Reference
│ │ │ │ +
identitygridintersectioniterator.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

The IdentityGridLevelIterator class. │ │ │ │ +

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

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

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::IdentityGridLevelIterator< codim, pitype, GridImp >
 Iterator over all entities of a given codimension and level of a grid. More...
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 >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │

Detailed Description

│ │ │ │ -

The IdentityGridLevelIterator class.

│ │ │ │ +

The IdentityGridLeafIntersectionIterator and IdentityGridLevelIntersectionIterator classes.

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,24 +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 │ │ │ │ │ -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> │ │ │ │ │ +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_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_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_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -The IdentityGridLevelIterator 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/a00749_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: identitygridleveliterator.hh Source File │ │ │ │ +dune-grid: identitygridintersectioniterator.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,97 +74,177 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
identitygridleveliterator.hh
│ │ │ │ +
identitygridintersectioniterator.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_IDENTITYGRID_INTERSECTIONITERATOR_HH
│ │ │ │ +
6#define DUNE_IDENTITYGRID_INTERSECTIONITERATOR_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ -
9
│ │ │ │ -
14namespace Dune {
│ │ │ │ -
15
│ │ │ │ -
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 public:
│ │ │ │ -
26
│ │ │ │ -
27 constexpr static int codimension = codim;
│ │ │ │ -
28
│ │ │ │ -
29 typedef typename GridImp::template Codim<codim>::Entity Entity;
│ │ │ │ + │ │ │ │ + │ │ │ │ +
10
│ │ │ │ + │ │ │ │ +
12
│ │ │ │ +
17namespace Dune {
│ │ │ │ +
18
│ │ │ │ +
27 template<class GridImp>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
29 {
│ │ │ │
30
│ │ │ │ -
│ │ │ │ -
32 explicit IdentityGridLevelIterator(const GridImp* identityGrid, int level)
│ │ │ │ -
33 : identityGrid_(identityGrid),
│ │ │ │ -
34 hostLevelIterator_(identityGrid->hostgrid_->levelGridView(level).template begin<codim,pitype>())
│ │ │ │ -
35 {}
│ │ │ │ -
│ │ │ │ -
36
│ │ │ │ +
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
│ │ │ │ -
│ │ │ │ -
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 }
│ │ │ │ +
38 typedef typename GridImp::HostGridType::LeafGridView::IntersectionIterator HostLeafIntersectionIterator;
│ │ │ │ +
39
│ │ │ │ +
40 public:
│ │ │ │ +
41
│ │ │ │ + │ │ │ │ +
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 bool equals(const IdentityGridLevelIterator& i) const {
│ │ │ │ -
61 return hostLevelIterator_ == i.hostLevelIterator_;
│ │ │ │ +
60 void increment() {
│ │ │ │ +
61 ++hostIterator_;
│ │ │ │
62 }
│ │ │ │
│ │ │ │
63
│ │ │ │ -
64 private:
│ │ │ │ -
65 const GridImp* identityGrid_;
│ │ │ │ -
66
│ │ │ │ -
67 HostGridLevelIterator hostLevelIterator_;
│ │ │ │ -
68 };
│ │ │ │ -
│ │ │ │ -
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:788
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
66 return IdentityGridLeafIntersection<GridImp>(identityGrid_,*hostIterator_);
│ │ │ │ +
67 }
│ │ │ │ +
│ │ │ │ +
68
│ │ │ │ +
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 // 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 IdentityGridEntity class.
│ │ │ │ +
The IdentityGridLeafIntersection and IdentityGridLevelIntersection classes.
│ │ │ │
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
│ │ │ │ +
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,112 +1,208 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ +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 © 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_IDENTITYGRID_INTERSECTIONITERATOR_HH │ │ │ │ │ +6#define DUNE_IDENTITYGRID_INTERSECTIONITERATOR_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 │ │ │ │ │ -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 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; │ │ │ │ │ +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 │ │ │ │ │ -_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 │ │ │ │ │ +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 │ │ │ │ │ -_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 } │ │ │ │ │ +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; │ │ │ │ │ +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 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_; │ │ │ │ │ +_6_0 void _i_n_c_r_e_m_e_n_t() { │ │ │ │ │ +61 ++hostIterator_; │ │ │ │ │ 62 } │ │ │ │ │ 63 │ │ │ │ │ -64 private: │ │ │ │ │ -65 const GridImp* identityGrid_; │ │ │ │ │ -66 │ │ │ │ │ -67 HostGridLevelIterator hostLevelIterator_; │ │ │ │ │ -68 }; │ │ │ │ │ -69 │ │ │ │ │ -70 │ │ │ │ │ -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:788 │ │ │ │ │ +_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 //********************************************************** │ │ │ │ │ +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_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_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 │ │ │ │ │ +_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 │ │ │ │ │ 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 │ │ │ │ │ +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 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 │ │ │ │ │ +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 identitygridleveliterator.hh:55 │ │ │ │ │ +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/a00752.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: identitygridentity.hh File Reference │ │ │ │ +dune-grid: identitygridindexsets.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,41 +72,44 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
identitygridentity.hh File Reference
│ │ │ │ +
identitygridindexsets.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

The IdentityGridEntity class. │ │ │ │ +

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

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

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::IdentityGridLevelIndexSet< GridImp >
 
class  Dune::IdentityGridEntity< 0, dim, GridImp >
 Specialization for codim-0-entities. More...
class  Dune::IdentityGridLeafIndexSet< GridImp >
 
class  Dune::IdentityGridGlobalIdSet< GridImp >
 
class  Dune::IdentityGridLocalIdSet< GridImp >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │

Detailed Description

│ │ │ │ -

The IdentityGridEntity class.

│ │ │ │ +

The index and id sets for the IdentityGrid class.

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,26 +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 │ │ │ │ │ -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> │ │ │ │ │ +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_<_ _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_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_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_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 IdentityGridEntity 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/a00752_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: identitygridentity.hh Source File │ │ │ │ +dune-grid: identitygridindexsets.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,542 +74,364 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
identitygridentity.hh
│ │ │ │ +
identitygridindexsets.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_IDENTITYGRID_INDEXSETS_HH
│ │ │ │ +
6#define DUNE_IDENTITYGRID_INDEXSETS_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ + │ │ │ │
13
│ │ │ │ -
14namespace Dune {
│ │ │ │ +
14#include <vector>
│ │ │ │
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;
│ │ │ │ -
24
│ │ │ │ -
25 template<class GridImp>
│ │ │ │ -
26 class IdentityGridLevelIntersectionIterator;
│ │ │ │ -
27
│ │ │ │ -
28 template<class GridImp>
│ │ │ │ -
29 class IdentityGridLeafIntersectionIterator;
│ │ │ │ -
30
│ │ │ │ -
31 template<class GridImp>
│ │ │ │ -
32 class IdentityGridHierarchicIterator;
│ │ │ │ +
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
│ │ │ │ -
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 >;
│ │ │ │ -
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;
│ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ +
61
│ │ │ │ +
│ │ │ │ +
63 Types types (int codim) const
│ │ │ │ +
64 {
│ │ │ │ +
65 return grid_->hostgrid_->levelIndexSet(level_).types(codim);
│ │ │ │ +
66 }
│ │ │ │ +
│ │ │ │ +
67
│ │ │ │ +
69 template<class EntityType>
│ │ │ │ +
│ │ │ │ +
70 bool contains (const EntityType& e) const
│ │ │ │ +
71 {
│ │ │ │ +
72 return grid_->hostgrid_->levelIndexSet(level_).contains(grid_->template getHostEntity<EntityType::codimension>(e));
│ │ │ │ +
73 }
│ │ │ │ +
│ │ │ │ +
74
│ │ │ │ +
│ │ │ │ +
76 void update(const GridImp& grid, int level)
│ │ │ │ +
77 {
│ │ │ │ +
78 grid_ = &grid;
│ │ │ │ +
79 level_ = level;
│ │ │ │ +
80 }
│ │ │ │ +
│ │ │ │
81
│ │ │ │
82
│ │ │ │ -
83 public:
│ │ │ │ +
83 GridImp* grid_;
│ │ │ │
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 {}
│ │ │ │ +
85 int level_;
│ │ │ │ +
86 };
│ │ │ │
│ │ │ │ +
87
│ │ │ │ +
88
│ │ │ │ +
89 template<class GridImp>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
91 public IndexSet<GridImp,
│ │ │ │ +
92 IdentityGridLeafIndexSet<GridImp>,
│ │ │ │ +
93 typename std::remove_const<GridImp>::type::HostGridType::LeafGridView::IndexSet::IndexType,
│ │ │ │ +
94 typename std::remove_const<GridImp>::type::HostGridType::LeafGridView::IndexSet::Types
│ │ │ │ +
95 >
│ │ │ │ +
96 {
│ │ │ │ +
97 typedef typename std::remove_const<GridImp>::type::HostGridType HostGrid;
│ │ │ │
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 {}
│ │ │ │ -
│ │ │ │ +
99 public:
│ │ │ │ +
100
│ │ │ │ +
101 typedef typename HostGrid::LevelGridView::IndexSet::Types Types;
│ │ │ │ +
102
│ │ │ │ +
103 /*
│ │ │ │ +
104 * We use the remove_const to extract the Type from the mutable class,
│ │ │ │ +
105 * because the const class is not instantiated yet.
│ │ │ │ +
106 */
│ │ │ │ +
107 constexpr static int dim = std::remove_const<GridImp>::type::dimension;
│ │ │ │ +
108
│ │ │ │
109
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
111 : hostEntity_(std::move(original.hostEntity_))
│ │ │ │ -
112 , identityGrid_(original.identityGrid_)
│ │ │ │ +
│ │ │ │ +
111 IdentityGridLeafIndexSet (const GridImp& grid)
│ │ │ │ +
112 : grid_(&grid)
│ │ │ │
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 }
│ │ │ │ +
115
│ │ │ │ +
117 /*
│ │ │ │ +
118 We use the RemoveConst to extract the Type from the mutable class,
│ │ │ │ +
119 because the const class is not instantiated yet.
│ │ │ │ +
120 */
│ │ │ │ +
121 template<int codim>
│ │ │ │ +
│ │ │ │ +
122 int index (const typename std::remove_const<GridImp>::type::template Codim<codim>::Entity& e) const
│ │ │ │ +
123 {
│ │ │ │ +
124 return grid_->hostgrid_->leafIndexSet().template index<codim>(grid_->template getHostEntity<codim>(e));
│ │ │ │ +
125 }
│ │ │ │ +
│ │ │ │ +
126
│ │ │ │ +
127
│ │ │ │ +
129 /*
│ │ │ │ +
130 We use the RemoveConst to extract the Type from the mutable class,
│ │ │ │ +
131 because the const class is not instantiated yet.
│ │ │ │ +
132 */
│ │ │ │ +
133 template<int cc>
│ │ │ │ +
│ │ │ │ +
134 int subIndex (const typename std::remove_const<GridImp>::type::Traits::template Codim<cc>::Entity& e, int i, int codim) const
│ │ │ │ +
135 {
│ │ │ │ +
136 return grid_->hostgrid_->leafIndexSet().subIndex(grid_->template getHostEntity<cc>(e),i, codim);
│ │ │ │ +
137 }
│ │ │ │ +
│ │ │ │ +
138
│ │ │ │ +
139
│ │ │ │ +
│ │ │ │ +
141 std::size_t size (GeometryType type) const
│ │ │ │ +
142 {
│ │ │ │ +
143 return grid_->hostgrid_->leafIndexSet().size(type);
│ │ │ │ +
144 }
│ │ │ │
│ │ │ │ +
145
│ │ │ │
146
│ │ │ │
│ │ │ │ - │ │ │ │ +
148 std::size_t size (int codim) const
│ │ │ │
149 {
│ │ │ │ -
150 return EntitySeed(hostEntity_);
│ │ │ │ +
150 return grid_->hostgrid_->leafIndexSet().size(codim);
│ │ │ │
151 }
│ │ │ │
│ │ │ │
152
│ │ │ │
│ │ │ │ -
154 int level () const {
│ │ │ │ -
155 return hostEntity_.level();
│ │ │ │ -
156 }
│ │ │ │ +
154 Types types (int codim) const
│ │ │ │ +
155 {
│ │ │ │ +
156 return grid_->hostgrid_->leafIndexSet().types(codim);
│ │ │ │ +
157 }
│ │ │ │
│ │ │ │ -
157
│ │ │ │
158
│ │ │ │ +
160 template<class EntityType>
│ │ │ │
│ │ │ │ - │ │ │ │ -
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 }
│ │ │ │ +
161 bool contains (const EntityType& e) const
│ │ │ │ +
162 {
│ │ │ │ +
163 return grid_->hostgrid_->leafIndexSet().contains(grid_->template getHostEntity<EntityType::codimension>(e));
│ │ │ │ +
164 }
│ │ │ │ +
│ │ │ │ +
165
│ │ │ │ +
166
│ │ │ │ +
167
│ │ │ │ +
│ │ │ │ +
169 void update(const GridImp& grid)
│ │ │ │ +
170 {
│ │ │ │ +
171 grid_ = &grid;
│ │ │ │ +
172 }
│ │ │ │ +
│ │ │ │ +
173
│ │ │ │ +
174
│ │ │ │ +
175 GridImp* grid_;
│ │ │ │ +
176 };
│ │ │ │
│ │ │ │
177
│ │ │ │
178
│ │ │ │ -
179 HostGridEntity hostEntity_;
│ │ │ │ +
179
│ │ │ │
180
│ │ │ │ -
181 private:
│ │ │ │ -
182
│ │ │ │ -
183 const GridImp* identityGrid_;
│ │ │ │ -
184
│ │ │ │ -
185 };
│ │ │ │ -
│ │ │ │ +
181 template <class GridImp>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
183 public IdSet<GridImp,IdentityGridGlobalIdSet<GridImp>,
│ │ │ │ +
184 typename std::remove_const<GridImp>::type::HostGridType::Traits::GlobalIdSet::IdType>
│ │ │ │ +
185 {
│ │ │ │
186
│ │ │ │ -
187
│ │ │ │ +
187 typedef typename std::remove_const<GridImp>::type::HostGridType HostGrid;
│ │ │ │
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:
│ │ │ │ +
190 public:
│ │ │ │ +
192 IdentityGridGlobalIdSet (const GridImp& g) : grid_(&g) {}
│ │ │ │ +
193
│ │ │ │ +
195 typedef typename HostGrid::Traits::GlobalIdSet::IdType IdType;
│ │ │ │ +
196
│ │ │ │ +
197
│ │ │ │ +
199 /*
│ │ │ │ +
200 We use the remove_const to extract the Type from the mutable class,
│ │ │ │ +
201 because the const class is not instantiated yet.
│ │ │ │ +
202 */
│ │ │ │ +
203 template<int cd>
│ │ │ │ +
│ │ │ │ +
204 IdType id (const typename std::remove_const<GridImp>::type::Traits::template Codim<cd>::Entity& e) const
│ │ │ │ +
205 {
│ │ │ │ +
206 // Return id of the host entity
│ │ │ │ +
207 return grid_->hostgrid_->globalIdSet().id(e.impl().hostEntity_);
│ │ │ │ +
208 }
│ │ │ │ +
│ │ │ │
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
│ │ │ │ - │ │ │ │ +
210
│ │ │ │ +
212 /*
│ │ │ │ +
213 We use the remove_const to extract the Type from the mutable class,
│ │ │ │ +
214 because the const class is not instantiated yet.
│ │ │ │ +
215 */
│ │ │ │ +
│ │ │ │ +
216 IdType subId (const typename std::remove_const<GridImp>::type::Traits::template Codim<0>::Entity& e, int i, int codim) const
│ │ │ │ +
217 {
│ │ │ │ +
218 // Return sub id of the host entity
│ │ │ │ +
219 return grid_->hostgrid_->globalIdSet().subId(e.impl().hostEntity_,i, codim);
│ │ │ │ +
220 }
│ │ │ │ +
│ │ │ │ +
221
│ │ │ │
222
│ │ │ │ - │ │ │ │ +
224 void update() {}
│ │ │ │
225
│ │ │ │ - │ │ │ │ -
228
│ │ │ │ -
230 typedef typename GridImp::template Codim<0>::EntitySeed EntitySeed;
│ │ │ │ +
226
│ │ │ │ +
227 const GridImp* grid_;
│ │ │ │ +
228 };
│ │ │ │ +
│ │ │ │ +
229
│ │ │ │ +
230
│ │ │ │
231
│ │ │ │
232
│ │ │ │ -
233
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
235 : identityGrid_(nullptr)
│ │ │ │ -
236 {}
│ │ │ │ -
│ │ │ │ -
237
│ │ │ │ -
│ │ │ │ -
238 IdentityGridEntity(const GridImp* identityGrid, const HostGridEntity& hostEntity)
│ │ │ │ -
239 : hostEntity_(hostEntity)
│ │ │ │ -
240 , identityGrid_(identityGrid)
│ │ │ │ -
241 {}
│ │ │ │ -
│ │ │ │ +
233 template<class GridImp>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
235 public IdSet<GridImp,IdentityGridLocalIdSet<GridImp>,
│ │ │ │ +
236 typename std::remove_const<GridImp>::type::HostGridType::Traits::LocalIdSet::IdType>
│ │ │ │ +
237 {
│ │ │ │ +
238 private:
│ │ │ │ +
239
│ │ │ │ +
240 typedef typename std::remove_const<GridImp>::type::HostGridType HostGrid;
│ │ │ │ +
241
│ │ │ │
242
│ │ │ │ -
│ │ │ │ -
243 IdentityGridEntity(const GridImp* identityGrid, HostGridEntity&& hostEntity)
│ │ │ │ -
244 : hostEntity_(std::move(hostEntity))
│ │ │ │ -
245 , identityGrid_(identityGrid)
│ │ │ │ -
246 {}
│ │ │ │ -
│ │ │ │ +
243 public:
│ │ │ │ +
245 typedef typename HostGrid::Traits::LocalIdSet::IdType IdType;
│ │ │ │ +
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 }
│ │ │ │ -
│ │ │ │ +
249 IdentityGridLocalIdSet (const GridImp& g) : grid_(&g) {}
│ │ │ │ +
250
│ │ │ │ +
251
│ │ │ │ +
253 /*
│ │ │ │ +
254 We use the remove_const to extract the Type from the mutable class,
│ │ │ │ +
255 because the const class is not instantiated yet.
│ │ │ │ +
256 */
│ │ │ │ +
257 template<int cd>
│ │ │ │ +
│ │ │ │ +
258 IdType id (const typename std::remove_const<GridImp>::type::Traits::template Codim<cd>::Entity& e) const
│ │ │ │ +
259 {
│ │ │ │ +
260 // Return id of the host entity
│ │ │ │ +
261 return grid_->hostgrid_->localIdSet().id(e.impl().hostEntity_);
│ │ │ │ +
262 }
│ │ │ │ +
│ │ │ │ +
263
│ │ │ │ +
264
│ │ │ │ +
266 /*
│ │ │ │ +
267 * We use the remove_const to extract the Type from the mutable class,
│ │ │ │ +
268 * because the const class is not instantiated yet.
│ │ │ │ +
269 */
│ │ │ │ +
│ │ │ │ +
270 IdType subId (const typename std::remove_const<GridImp>::type::template Codim<0>::Entity& e, int i, int codim) const
│ │ │ │ +
271 {
│ │ │ │ +
272 // Return sub id of the host entity
│ │ │ │ +
273 return grid_->hostgrid_->localIdSet().subId(e.impl().hostEntity_,i,codim);
│ │ │ │ +
274 }
│ │ │ │ +
│ │ │ │ +
275
│ │ │ │ +
276
│ │ │ │ +
278 void update() {}
│ │ │ │ +
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.
│ │ │ │ +
281 const GridImp* grid_;
│ │ │ │ +
282 };
│ │ │ │ +
│ │ │ │ +
283
│ │ │ │ +
284
│ │ │ │ +
285} // namespace Dune
│ │ │ │ +
286
│ │ │ │ +
287
│ │ │ │ +
288#endif
│ │ │ │
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
│ │ │ │ +
Index Set Interface base class.
Definition common/indexidset.hh:78
│ │ │ │ +
Id Set Interface.
Definition common/indexidset.hh:447
│ │ │ │
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:70
│ │ │ │ +
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:83
│ │ │ │ +
std::remove_const< GridImp >::type::HostGridType HostGrid
Definition identitygridindexsets.hh:29
│ │ │ │ +
Types types(int codim) const
Deliver all geometry types used in this grid.
Definition identitygridindexsets.hh:63
│ │ │ │ +
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:85
│ │ │ │ +
void update(const GridImp &grid, int level)
Set up the index set.
Definition identitygridindexsets.hh:76
│ │ │ │
Definition identitygridindexsets.hh:96
│ │ │ │ +
IdentityGridLeafIndexSet(const GridImp &grid)
constructor stores reference to a grid and level
Definition identitygridindexsets.hh:111
│ │ │ │ +
static constexpr int dim
Definition identitygridindexsets.hh:107
│ │ │ │ +
std::size_t size(int codim) const
get number of entities of given codim
Definition identitygridindexsets.hh:148
│ │ │ │ +
bool contains(const EntityType &e) const
Return true if the given entity is contained in the index set.
Definition identitygridindexsets.hh:161
│ │ │ │ +
std::size_t size(GeometryType type) const
get number of entities of given type
Definition identitygridindexsets.hh:141
│ │ │ │ +
HostGrid::LevelGridView::IndexSet::Types Types
Definition identitygridindexsets.hh:101
│ │ │ │ +
int index(const typename std::remove_const< GridImp >::type::template Codim< codim >::Entity &e) const
get index of an entity
Definition identitygridindexsets.hh:122
│ │ │ │ +
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:134
│ │ │ │ +
Types types(int codim) const
Deliver all geometry types used in this grid.
Definition identitygridindexsets.hh:154
│ │ │ │ +
GridImp * grid_
Definition identitygridindexsets.hh:175
│ │ │ │ +
void update(const GridImp &grid)
Definition identitygridindexsets.hh:169
│ │ │ │
Definition identitygridindexsets.hh:185
│ │ │ │ +
IdentityGridGlobalIdSet(const GridImp &g)
constructor stores reference to a grid
Definition identitygridindexsets.hh:192
│ │ │ │ +
void update()
Definition identitygridindexsets.hh:224
│ │ │ │ +
const GridImp * grid_
Definition identitygridindexsets.hh:227
│ │ │ │ +
HostGrid::Traits::GlobalIdSet::IdType IdType
define the type used for persistent indices
Definition identitygridindexsets.hh:195
│ │ │ │ +
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:216
│ │ │ │ +
IdType id(const typename std::remove_const< GridImp >::type::Traits::template Codim< cd >::Entity &e) const
get id of an entity
Definition identitygridindexsets.hh:204
│ │ │ │
Definition identitygridindexsets.hh:237
│ │ │ │ -
Different resources needed by all grid implementations.
│ │ │ │ +
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:270
│ │ │ │ +
IdentityGridLocalIdSet(const GridImp &g)
constructor stores reference to a grid
Definition identitygridindexsets.hh:249
│ │ │ │ +
const GridImp * grid_
Definition identitygridindexsets.hh:281
│ │ │ │ +
void update()
Definition identitygridindexsets.hh:278
│ │ │ │ +
IdType id(const typename std::remove_const< GridImp >::type::Traits::template Codim< cd >::Entity &e) const
get id of an entity
Definition identitygridindexsets.hh:258
│ │ │ │ +
HostGrid::Traits::LocalIdSet::IdType IdType
define the type used for persistent local ids
Definition identitygridindexsets.hh:245
│ │ │ │ +
Provides base classes for index and id sets.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,620 +1,445 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ +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 © 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_IDENTITYGRID_INDEXSETS_HH │ │ │ │ │ +6#define DUNE_IDENTITYGRID_INDEXSETS_HH │ │ │ │ │ 7 │ │ │ │ │ -12#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_._h_h> │ │ │ │ │ +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 │ │ │ │ │ -14namespace _D_u_n_e { │ │ │ │ │ +14#include │ │ │ │ │ 15 │ │ │ │ │ -16 │ │ │ │ │ -17 // Forward declarations │ │ │ │ │ -18 │ │ │ │ │ -19 template │ │ │ │ │ -20 class IdentityGridEntity; │ │ │ │ │ -21 │ │ │ │ │ -22 template │ │ │ │ │ -23 class IdentityGridLevelIterator; │ │ │ │ │ -24 │ │ │ │ │ -25 template │ │ │ │ │ -26 class IdentityGridLevelIntersectionIterator; │ │ │ │ │ -27 │ │ │ │ │ -28 template │ │ │ │ │ -29 class IdentityGridLeafIntersectionIterator; │ │ │ │ │ -30 │ │ │ │ │ -31 template │ │ │ │ │ -32 class IdentityGridHierarchicIterator; │ │ │ │ │ +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 │ │ │ │ │ -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 >; │ │ │ │ │ -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; │ │ │ │ │ +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 │ │ │ │ │ +_6_3 _T_y_p_e_s _t_y_p_e_s (int codim) const │ │ │ │ │ +64 { │ │ │ │ │ +65 return _g_r_i_d__->hostgrid_->levelIndexSet(_l_e_v_e_l__).types(codim); │ │ │ │ │ +66 } │ │ │ │ │ +67 │ │ │ │ │ +69 template │ │ │ │ │ +_7_0 bool _c_o_n_t_a_i_n_s (const EntityType& e) const │ │ │ │ │ +71 { │ │ │ │ │ +72 return _g_r_i_d__->hostgrid_->levelIndexSet(_l_e_v_e_l__).contains(_g_r_i_d__->template │ │ │ │ │ +getHostEntity(e)); │ │ │ │ │ +73 } │ │ │ │ │ +74 │ │ │ │ │ +_7_6 void _u_p_d_a_t_e(const GridImp& grid, int level) │ │ │ │ │ +77 { │ │ │ │ │ +78 _g_r_i_d__ = &grid; │ │ │ │ │ +79 _l_e_v_e_l__ = level; │ │ │ │ │ +80 } │ │ │ │ │ 81 │ │ │ │ │ 82 │ │ │ │ │ -83 public: │ │ │ │ │ +_8_3 GridImp* _g_r_i_d__; │ │ │ │ │ 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 {} │ │ │ │ │ +_8_5 int _l_e_v_e_l__; │ │ │ │ │ +86 }; │ │ │ │ │ +87 │ │ │ │ │ +88 │ │ │ │ │ +89 template │ │ │ │ │ +_9_0 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 : │ │ │ │ │ +91 public _I_n_d_e_x_S_e_t, │ │ │ │ │ +93 typename std::remove_const::type::HostGridType::LeafGridView:: │ │ │ │ │ +IndexSet::IndexType, │ │ │ │ │ +94 typename std::remove_const::type::HostGridType::LeafGridView:: │ │ │ │ │ +IndexSet::Types │ │ │ │ │ +95 > │ │ │ │ │ +96 { │ │ │ │ │ +97 typedef typename std::remove_const::type::HostGridType HostGrid; │ │ │ │ │ 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 {} │ │ │ │ │ +99 public: │ │ │ │ │ +100 │ │ │ │ │ +_1_0_1 typedef typename HostGrid::LevelGridView::IndexSet::Types _T_y_p_e_s; │ │ │ │ │ +102 │ │ │ │ │ +103 /* │ │ │ │ │ +104 * We use the remove_const to extract the Type from the mutable class, │ │ │ │ │ +105 * because the const class is not instantiated yet. │ │ │ │ │ +106 */ │ │ │ │ │ +_1_0_7 constexpr static int _d_i_m = std::remove_const::type::dimension; │ │ │ │ │ +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_) │ │ │ │ │ +_1_1_1 _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) │ │ │ │ │ +112 : _g_r_i_d__(&grid) │ │ │ │ │ 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 } │ │ │ │ │ +115 │ │ │ │ │ +117 /* │ │ │ │ │ +118 We use the RemoveConst to extract the Type from the mutable class, │ │ │ │ │ +119 because the const class is not instantiated yet. │ │ │ │ │ +120 */ │ │ │ │ │ +121 template │ │ │ │ │ +_1_2_2 int _i_n_d_e_x (const typename std::remove_const::type::template │ │ │ │ │ +Codim::Entity& e) const │ │ │ │ │ +123 { │ │ │ │ │ +124 return _g_r_i_d__->hostgrid_->leafIndexSet().template index(_g_r_i_d__- │ │ │ │ │ +>template getHostEntity(e)); │ │ │ │ │ +125 } │ │ │ │ │ +126 │ │ │ │ │ +127 │ │ │ │ │ +129 /* │ │ │ │ │ +130 We use the RemoveConst to extract the Type from the mutable class, │ │ │ │ │ +131 because the const class is not instantiated yet. │ │ │ │ │ +132 */ │ │ │ │ │ +133 template │ │ │ │ │ +_1_3_4 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 │ │ │ │ │ +135 { │ │ │ │ │ +136 return _g_r_i_d__->hostgrid_->leafIndexSet().subIndex(_g_r_i_d__->template │ │ │ │ │ +getHostEntity(e),i, codim); │ │ │ │ │ +137 } │ │ │ │ │ +138 │ │ │ │ │ +139 │ │ │ │ │ +_1_4_1 std::size_t _s_i_z_e (GeometryType type) const │ │ │ │ │ +142 { │ │ │ │ │ +143 return _g_r_i_d__->hostgrid_->leafIndexSet().size(type); │ │ │ │ │ +144 } │ │ │ │ │ +145 │ │ │ │ │ 146 │ │ │ │ │ -_1_4_8 _E_n_t_i_t_y_S_e_e_d _s_e_e_d () const │ │ │ │ │ +_1_4_8 std::size_t _s_i_z_e (int codim) const │ │ │ │ │ 149 { │ │ │ │ │ -150 return _E_n_t_i_t_y_S_e_e_d(_h_o_s_t_E_n_t_i_t_y__); │ │ │ │ │ +150 return _g_r_i_d__->hostgrid_->leafIndexSet().size(codim); │ │ │ │ │ 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 │ │ │ │ │ +_1_5_4 _T_y_p_e_s _t_y_p_e_s (int codim) const │ │ │ │ │ +155 { │ │ │ │ │ +156 return _g_r_i_d__->hostgrid_->leafIndexSet().types(codim); │ │ │ │ │ +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 } │ │ │ │ │ +160 template │ │ │ │ │ +_1_6_1 bool _c_o_n_t_a_i_n_s (const EntityType& e) const │ │ │ │ │ +162 { │ │ │ │ │ +163 return _g_r_i_d__->hostgrid_->leafIndexSet().contains(_g_r_i_d__->template │ │ │ │ │ +getHostEntity(e)); │ │ │ │ │ +164 } │ │ │ │ │ +165 │ │ │ │ │ +166 │ │ │ │ │ +167 │ │ │ │ │ +_1_6_9 void _u_p_d_a_t_e(const GridImp& grid) │ │ │ │ │ +170 { │ │ │ │ │ +171 _g_r_i_d__ = &grid; │ │ │ │ │ +172 } │ │ │ │ │ +173 │ │ │ │ │ +174 │ │ │ │ │ +_1_7_5 GridImp* _g_r_i_d__; │ │ │ │ │ +176 }; │ │ │ │ │ 177 │ │ │ │ │ 178 │ │ │ │ │ -_1_7_9 HostGridEntity _h_o_s_t_E_n_t_i_t_y__; │ │ │ │ │ +179 │ │ │ │ │ 180 │ │ │ │ │ -181 private: │ │ │ │ │ -182 │ │ │ │ │ -_1_8_3 const GridImp* identityGrid_; │ │ │ │ │ -184 │ │ │ │ │ -185 }; │ │ │ │ │ +181 template │ │ │ │ │ +_1_8_2 class _I_d_e_n_t_i_t_y_G_r_i_d_G_l_o_b_a_l_I_d_S_e_t : │ │ │ │ │ +183 public _I_d_S_e_t, │ │ │ │ │ +184 typename std::remove_const::type::HostGridType::Traits:: │ │ │ │ │ +GlobalIdSet::IdType> │ │ │ │ │ +185 { │ │ │ │ │ 186 │ │ │ │ │ -187 │ │ │ │ │ +187 typedef typename std::remove_const::type::HostGridType HostGrid; │ │ │ │ │ 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> │ │ │ │ │ +190 public: │ │ │ │ │ +_1_9_2 _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) {} │ │ │ │ │ +193 │ │ │ │ │ +_1_9_5 typedef typename HostGrid::Traits::GlobalIdSet::IdType _I_d_T_y_p_e; │ │ │ │ │ +196 │ │ │ │ │ +197 │ │ │ │ │ +199 /* │ │ │ │ │ +200 We use the remove_const to extract the Type from the mutable class, │ │ │ │ │ +201 because the const class is not instantiated yet. │ │ │ │ │ +202 */ │ │ │ │ │ +203 template │ │ │ │ │ +_2_0_4 _I_d_T_y_p_e _i_d (const typename std::remove_const::type::Traits:: │ │ │ │ │ +template Codim::Entity& e) const │ │ │ │ │ 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: │ │ │ │ │ +206 // Return id of the host entity │ │ │ │ │ +207 return _g_r_i_d__->hostgrid_->globalIdSet().id(e.impl().hostEntity_); │ │ │ │ │ +208 } │ │ │ │ │ 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; │ │ │ │ │ +210 │ │ │ │ │ +212 /* │ │ │ │ │ +213 We use the remove_const to extract the Type from the mutable class, │ │ │ │ │ +214 because the const class is not instantiated yet. │ │ │ │ │ +215 */ │ │ │ │ │ +_2_1_6 _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 │ │ │ │ │ +217 { │ │ │ │ │ +218 // Return sub id of the host entity │ │ │ │ │ +219 return _g_r_i_d__->hostgrid_->globalIdSet().subId(e.impl().hostEntity_,i, │ │ │ │ │ +codim); │ │ │ │ │ +220 } │ │ │ │ │ +221 │ │ │ │ │ 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; │ │ │ │ │ +_2_2_4 void _u_p_d_a_t_e() {} │ │ │ │ │ 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; │ │ │ │ │ +226 │ │ │ │ │ +_2_2_7 const GridImp* _g_r_i_d__; │ │ │ │ │ +228 }; │ │ │ │ │ +229 │ │ │ │ │ +230 │ │ │ │ │ 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 {} │ │ │ │ │ +233 template │ │ │ │ │ +_2_3_4 class _I_d_e_n_t_i_t_y_G_r_i_d_L_o_c_a_l_I_d_S_e_t : │ │ │ │ │ +235 public _I_d_S_e_t, │ │ │ │ │ +236 typename std::remove_const::type::HostGridType::Traits:: │ │ │ │ │ +LocalIdSet::IdType> │ │ │ │ │ +237 { │ │ │ │ │ +238 private: │ │ │ │ │ +239 │ │ │ │ │ +240 typedef typename std::remove_const::type::HostGridType HostGrid; │ │ │ │ │ +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 {} │ │ │ │ │ +243 public: │ │ │ │ │ +_2_4_5 typedef typename HostGrid::Traits::LocalIdSet::IdType _I_d_T_y_p_e; │ │ │ │ │ +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 } │ │ │ │ │ +_2_4_9 _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) {} │ │ │ │ │ +250 │ │ │ │ │ +251 │ │ │ │ │ +253 /* │ │ │ │ │ +254 We use the remove_const to extract the Type from the mutable class, │ │ │ │ │ +255 because the const class is not instantiated yet. │ │ │ │ │ +256 */ │ │ │ │ │ +257 template │ │ │ │ │ +_2_5_8 _I_d_T_y_p_e _i_d (const typename std::remove_const::type::Traits:: │ │ │ │ │ +template Codim::Entity& e) const │ │ │ │ │ +259 { │ │ │ │ │ +260 // Return id of the host entity │ │ │ │ │ +261 return _g_r_i_d__->hostgrid_->localIdSet().id(e.impl().hostEntity_); │ │ │ │ │ +262 } │ │ │ │ │ +263 │ │ │ │ │ +264 │ │ │ │ │ +266 /* │ │ │ │ │ +267 * We use the remove_const to extract the Type from the mutable class, │ │ │ │ │ +268 * because the const class is not instantiated yet. │ │ │ │ │ +269 */ │ │ │ │ │ +_2_7_0 _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 │ │ │ │ │ +271 { │ │ │ │ │ +272 // Return sub id of the host entity │ │ │ │ │ +273 return _g_r_i_d__->hostgrid_->localIdSet().subId(e.impl().hostEntity_,i,codim); │ │ │ │ │ +274 } │ │ │ │ │ +275 │ │ │ │ │ +276 │ │ │ │ │ +_2_7_8 void _u_p_d_a_t_e() {} │ │ │ │ │ +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. │ │ │ │ │ +_2_8_1 const GridImp* _g_r_i_d__; │ │ │ │ │ +282 }; │ │ │ │ │ +283 │ │ │ │ │ +284 │ │ │ │ │ +285} // namespace Dune │ │ │ │ │ +286 │ │ │ │ │ +287 │ │ │ │ │ +288#endif │ │ │ │ │ _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_n_d_e_x_S_e_t │ │ │ │ │ +Index Set Interface base class. │ │ │ │ │ +DDeeffiinniittiioonn common/indexidset.hh:78 │ │ │ │ │ +_D_u_n_e_:_:_I_d_S_e_t │ │ │ │ │ +Id Set Interface. │ │ │ │ │ +DDeeffiinniittiioonn common/indexidset.hh:447 │ │ │ │ │ _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: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_:_:_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:83 │ │ │ │ │ +_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_:_:_t_y_p_e_s │ │ │ │ │ +Types types(int codim) const │ │ │ │ │ +Deliver all geometry types used in this grid. │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:63 │ │ │ │ │ +_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:85 │ │ │ │ │ +_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:76 │ │ │ │ │ _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:96 │ │ │ │ │ +_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:111 │ │ │ │ │ +_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:107 │ │ │ │ │ +_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: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_:_:_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:161 │ │ │ │ │ +_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: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 │ │ │ │ │ +HostGrid::LevelGridView::IndexSet::Types Types │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:101 │ │ │ │ │ +_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:122 │ │ │ │ │ +_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:134 │ │ │ │ │ +_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:154 │ │ │ │ │ +_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: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_:_:_u_p_d_a_t_e │ │ │ │ │ +void update(const GridImp &grid) │ │ │ │ │ +DDeeffiinniittiioonn identitygridindexsets.hh:169 │ │ │ │ │ _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:185 │ │ │ │ │ +_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:192 │ │ │ │ │ +_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:224 │ │ │ │ │ +_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:227 │ │ │ │ │ +_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:195 │ │ │ │ │ +_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:216 │ │ │ │ │ +_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:204 │ │ │ │ │ _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:237 │ │ │ │ │ -_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_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:270 │ │ │ │ │ +_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:249 │ │ │ │ │ +_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:281 │ │ │ │ │ +_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:278 │ │ │ │ │ +_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:258 │ │ │ │ │ +_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:245 │ │ │ │ │ +_i_n_d_e_x_i_d_s_e_t_._h_h │ │ │ │ │ +Provides base classes for index and id sets. │ │ │ │ │ =============================================================================== │ │ │ │ │ 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: identitygridindexsets.hh File Reference │ │ │ │ +dune-grid: identitygridleafiterator.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,44 +72,38 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
identitygridindexsets.hh File Reference
│ │ │ │ +
identitygridleafiterator.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

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

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

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

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::IdentityGridLevelIndexSet< GridImp >
 
class  Dune::IdentityGridLeafIndexSet< GridImp >
 
class  Dune::IdentityGridGlobalIdSet< GridImp >
 
class  Dune::IdentityGridLocalIdSet< GridImp >
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 index and id sets for the IdentityGrid class.

│ │ │ │ +

The IdentityGridLeafIterator class.

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,29 +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 │ │ │ │ │ -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 │ │ │ │ │ +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_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_ _> │ │ │ │ │ +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 index and id sets for the IdentityGrid class. │ │ │ │ │ +The IdentityGridLeafIterator class. │ │ │ │ │ =============================================================================== │ │ │ │ │ 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: identitygridindexsets.hh Source File │ │ │ │ +dune-grid: identitygridleafiterator.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,364 +74,100 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
identitygridindexsets.hh
│ │ │ │ +
identitygridleafiterator.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_IDENTITYGRIDLEAFITERATOR_HH
│ │ │ │ +
6#define DUNE_IDENTITYGRIDLEAFITERATOR_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ -
13
│ │ │ │ -
14#include <vector>
│ │ │ │ + │ │ │ │ +
9
│ │ │ │ +
14namespace Dune {
│ │ │ │
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;
│ │ │ │ +
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:
│ │ │ │ +
29
│ │ │ │ +
30 constexpr static int codimension = codim;
│ │ │ │
31
│ │ │ │ -
32 constexpr static int dim = GridImp::dimension;
│ │ │ │ +
32 typedef typename GridImp::template Codim<codim>::Entity Entity;
│ │ │ │
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>
│ │ │ │ +
│ │ │ │ +
35 explicit IdentityGridLeafIterator(const GridImp* identityGrid) :
│ │ │ │ +
36 identityGrid_(identityGrid),
│ │ │ │ +
37 hostLeafIterator_(identityGrid->hostgrid_->leafGridView().template begin<codim,pitype>())
│ │ │ │ +
38 {}
│ │ │ │ +
│ │ │ │ +
39
│ │ │ │
│ │ │ │ -
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 }
│ │ │ │ +
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 std::size_t size (int codim) const {
│ │ │ │ -
52 return grid_->hostgrid_->levelIndexSet(level_).size(codim);
│ │ │ │ +
51 void increment() {
│ │ │ │ +
52 ++hostLeafIterator_;
│ │ │ │
53 }
│ │ │ │
│ │ │ │
54
│ │ │ │ -
55
│ │ │ │ -
│ │ │ │ -
57 std::size_t size (GeometryType type) const
│ │ │ │ -
58 {
│ │ │ │ -
59 return grid_->hostgrid_->levelIndexSet(level_).size(type);
│ │ │ │ -
60 }
│ │ │ │ -
│ │ │ │ -
61
│ │ │ │ -
│ │ │ │ -
63 Types types (int codim) const
│ │ │ │ -
64 {
│ │ │ │ -
65 return grid_->hostgrid_->levelIndexSet(level_).types(codim);
│ │ │ │ -
66 }
│ │ │ │ -
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
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
│ │ │ │ -
69 template<class EntityType>
│ │ │ │ -
│ │ │ │ -
70 bool contains (const EntityType& e) const
│ │ │ │ -
71 {
│ │ │ │ -
72 return grid_->hostgrid_->levelIndexSet(level_).contains(grid_->template getHostEntity<EntityType::codimension>(e));
│ │ │ │ -
73 }
│ │ │ │ -
│ │ │ │ +
68 HostGridLeafIterator hostLeafIterator_;
│ │ │ │ +
69
│ │ │ │ +
70 };
│ │ │ │ +
│ │ │ │ +
71
│ │ │ │ +
72
│ │ │ │ +
73} // namespace Dune
│ │ │ │
74
│ │ │ │ -
│ │ │ │ -
76 void update(const GridImp& grid, int level)
│ │ │ │ -
77 {
│ │ │ │ -
78 grid_ = &grid;
│ │ │ │ -
79 level_ = level;
│ │ │ │ -
80 }
│ │ │ │ -
│ │ │ │ -
81
│ │ │ │ -
82
│ │ │ │ -
83 GridImp* grid_;
│ │ │ │ -
84
│ │ │ │ -
85 int level_;
│ │ │ │ -
86 };
│ │ │ │ -
│ │ │ │ -
87
│ │ │ │ -
88
│ │ │ │ -
89 template<class GridImp>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
91 public IndexSet<GridImp,
│ │ │ │ -
92 IdentityGridLeafIndexSet<GridImp>,
│ │ │ │ -
93 typename std::remove_const<GridImp>::type::HostGridType::LeafGridView::IndexSet::IndexType,
│ │ │ │ -
94 typename std::remove_const<GridImp>::type::HostGridType::LeafGridView::IndexSet::Types
│ │ │ │ -
95 >
│ │ │ │ -
96 {
│ │ │ │ -
97 typedef typename std::remove_const<GridImp>::type::HostGridType HostGrid;
│ │ │ │ -
98
│ │ │ │ -
99 public:
│ │ │ │ -
100
│ │ │ │ -
101 typedef typename HostGrid::LevelGridView::IndexSet::Types Types;
│ │ │ │ -
102
│ │ │ │ -
103 /*
│ │ │ │ -
104 * We use the remove_const to extract the Type from the mutable class,
│ │ │ │ -
105 * because the const class is not instantiated yet.
│ │ │ │ -
106 */
│ │ │ │ -
107 constexpr static int dim = std::remove_const<GridImp>::type::dimension;
│ │ │ │ -
108
│ │ │ │ -
109
│ │ │ │ -
│ │ │ │ -
111 IdentityGridLeafIndexSet (const GridImp& grid)
│ │ │ │ -
112 : grid_(&grid)
│ │ │ │ -
113 {}
│ │ │ │ -
│ │ │ │ -
114
│ │ │ │ -
115
│ │ │ │ -
117 /*
│ │ │ │ -
118 We use the RemoveConst to extract the Type from the mutable class,
│ │ │ │ -
119 because the const class is not instantiated yet.
│ │ │ │ -
120 */
│ │ │ │ -
121 template<int codim>
│ │ │ │ -
│ │ │ │ -
122 int index (const typename std::remove_const<GridImp>::type::template Codim<codim>::Entity& e) const
│ │ │ │ -
123 {
│ │ │ │ -
124 return grid_->hostgrid_->leafIndexSet().template index<codim>(grid_->template getHostEntity<codim>(e));
│ │ │ │ -
125 }
│ │ │ │ -
│ │ │ │ -
126
│ │ │ │ -
127
│ │ │ │ -
129 /*
│ │ │ │ -
130 We use the RemoveConst to extract the Type from the mutable class,
│ │ │ │ -
131 because the const class is not instantiated yet.
│ │ │ │ -
132 */
│ │ │ │ -
133 template<int cc>
│ │ │ │ -
│ │ │ │ -
134 int subIndex (const typename std::remove_const<GridImp>::type::Traits::template Codim<cc>::Entity& e, int i, int codim) const
│ │ │ │ -
135 {
│ │ │ │ -
136 return grid_->hostgrid_->leafIndexSet().subIndex(grid_->template getHostEntity<cc>(e),i, codim);
│ │ │ │ -
137 }
│ │ │ │ -
│ │ │ │ -
138
│ │ │ │ -
139
│ │ │ │ -
│ │ │ │ -
141 std::size_t size (GeometryType type) const
│ │ │ │ -
142 {
│ │ │ │ -
143 return grid_->hostgrid_->leafIndexSet().size(type);
│ │ │ │ -
144 }
│ │ │ │ -
│ │ │ │ -
145
│ │ │ │ -
146
│ │ │ │ -
│ │ │ │ -
148 std::size_t size (int codim) const
│ │ │ │ -
149 {
│ │ │ │ -
150 return grid_->hostgrid_->leafIndexSet().size(codim);
│ │ │ │ -
151 }
│ │ │ │ -
│ │ │ │ -
152
│ │ │ │ -
│ │ │ │ -
154 Types types (int codim) const
│ │ │ │ -
155 {
│ │ │ │ -
156 return grid_->hostgrid_->leafIndexSet().types(codim);
│ │ │ │ -
157 }
│ │ │ │ -
│ │ │ │ -
158
│ │ │ │ -
160 template<class EntityType>
│ │ │ │ -
│ │ │ │ -
161 bool contains (const EntityType& e) const
│ │ │ │ -
162 {
│ │ │ │ -
163 return grid_->hostgrid_->leafIndexSet().contains(grid_->template getHostEntity<EntityType::codimension>(e));
│ │ │ │ -
164 }
│ │ │ │ -
│ │ │ │ -
165
│ │ │ │ -
166
│ │ │ │ -
167
│ │ │ │ -
│ │ │ │ -
169 void update(const GridImp& grid)
│ │ │ │ -
170 {
│ │ │ │ -
171 grid_ = &grid;
│ │ │ │ -
172 }
│ │ │ │ -
│ │ │ │ -
173
│ │ │ │ -
174
│ │ │ │ -
175 GridImp* grid_;
│ │ │ │ -
176 };
│ │ │ │ -
│ │ │ │ -
177
│ │ │ │ -
178
│ │ │ │ -
179
│ │ │ │ -
180
│ │ │ │ -
181 template <class GridImp>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
183 public IdSet<GridImp,IdentityGridGlobalIdSet<GridImp>,
│ │ │ │ -
184 typename std::remove_const<GridImp>::type::HostGridType::Traits::GlobalIdSet::IdType>
│ │ │ │ -
185 {
│ │ │ │ -
186
│ │ │ │ -
187 typedef typename std::remove_const<GridImp>::type::HostGridType HostGrid;
│ │ │ │ -
188
│ │ │ │ -
189
│ │ │ │ -
190 public:
│ │ │ │ -
192 IdentityGridGlobalIdSet (const GridImp& g) : grid_(&g) {}
│ │ │ │ -
193
│ │ │ │ -
195 typedef typename HostGrid::Traits::GlobalIdSet::IdType IdType;
│ │ │ │ -
196
│ │ │ │ -
197
│ │ │ │ -
199 /*
│ │ │ │ -
200 We use the remove_const to extract the Type from the mutable class,
│ │ │ │ -
201 because the const class is not instantiated yet.
│ │ │ │ -
202 */
│ │ │ │ -
203 template<int cd>
│ │ │ │ -
│ │ │ │ -
204 IdType id (const typename std::remove_const<GridImp>::type::Traits::template Codim<cd>::Entity& e) const
│ │ │ │ -
205 {
│ │ │ │ -
206 // Return id of the host entity
│ │ │ │ -
207 return grid_->hostgrid_->globalIdSet().id(e.impl().hostEntity_);
│ │ │ │ -
208 }
│ │ │ │ -
│ │ │ │ -
209
│ │ │ │ -
210
│ │ │ │ -
212 /*
│ │ │ │ -
213 We use the remove_const to extract the Type from the mutable class,
│ │ │ │ -
214 because the const class is not instantiated yet.
│ │ │ │ -
215 */
│ │ │ │ -
│ │ │ │ -
216 IdType subId (const typename std::remove_const<GridImp>::type::Traits::template Codim<0>::Entity& e, int i, int codim) const
│ │ │ │ -
217 {
│ │ │ │ -
218 // Return sub id of the host entity
│ │ │ │ -
219 return grid_->hostgrid_->globalIdSet().subId(e.impl().hostEntity_,i, codim);
│ │ │ │ -
220 }
│ │ │ │ -
│ │ │ │ -
221
│ │ │ │ -
222
│ │ │ │ -
224 void update() {}
│ │ │ │ -
225
│ │ │ │ -
226
│ │ │ │ -
227 const GridImp* grid_;
│ │ │ │ -
228 };
│ │ │ │ -
│ │ │ │ -
229
│ │ │ │ -
230
│ │ │ │ -
231
│ │ │ │ -
232
│ │ │ │ -
233 template<class GridImp>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
235 public IdSet<GridImp,IdentityGridLocalIdSet<GridImp>,
│ │ │ │ -
236 typename std::remove_const<GridImp>::type::HostGridType::Traits::LocalIdSet::IdType>
│ │ │ │ -
237 {
│ │ │ │ -
238 private:
│ │ │ │ -
239
│ │ │ │ -
240 typedef typename std::remove_const<GridImp>::type::HostGridType HostGrid;
│ │ │ │ -
241
│ │ │ │ -
242
│ │ │ │ -
243 public:
│ │ │ │ -
245 typedef typename HostGrid::Traits::LocalIdSet::IdType IdType;
│ │ │ │ -
246
│ │ │ │ -
247
│ │ │ │ -
249 IdentityGridLocalIdSet (const GridImp& g) : grid_(&g) {}
│ │ │ │ -
250
│ │ │ │ -
251
│ │ │ │ -
253 /*
│ │ │ │ -
254 We use the remove_const to extract the Type from the mutable class,
│ │ │ │ -
255 because the const class is not instantiated yet.
│ │ │ │ -
256 */
│ │ │ │ -
257 template<int cd>
│ │ │ │ -
│ │ │ │ -
258 IdType id (const typename std::remove_const<GridImp>::type::Traits::template Codim<cd>::Entity& e) const
│ │ │ │ -
259 {
│ │ │ │ -
260 // Return id of the host entity
│ │ │ │ -
261 return grid_->hostgrid_->localIdSet().id(e.impl().hostEntity_);
│ │ │ │ -
262 }
│ │ │ │ -
│ │ │ │ -
263
│ │ │ │ -
264
│ │ │ │ -
266 /*
│ │ │ │ -
267 * We use the remove_const to extract the Type from the mutable class,
│ │ │ │ -
268 * because the const class is not instantiated yet.
│ │ │ │ -
269 */
│ │ │ │ -
│ │ │ │ -
270 IdType subId (const typename std::remove_const<GridImp>::type::template Codim<0>::Entity& e, int i, int codim) const
│ │ │ │ -
271 {
│ │ │ │ -
272 // Return sub id of the host entity
│ │ │ │ -
273 return grid_->hostgrid_->localIdSet().subId(e.impl().hostEntity_,i,codim);
│ │ │ │ -
274 }
│ │ │ │ -
│ │ │ │ -
275
│ │ │ │ -
276
│ │ │ │ -
278 void update() {}
│ │ │ │ -
279
│ │ │ │ -
280
│ │ │ │ -
281 const GridImp* grid_;
│ │ │ │ -
282 };
│ │ │ │ -
│ │ │ │ -
283
│ │ │ │ -
284
│ │ │ │ -
285} // namespace Dune
│ │ │ │ -
286
│ │ │ │ -
287
│ │ │ │ -
288#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:805
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Index Set Interface base class.
Definition common/indexidset.hh:78
│ │ │ │ -
Id Set Interface.
Definition common/indexidset.hh:447
│ │ │ │ -
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:70
│ │ │ │ -
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:83
│ │ │ │ -
std::remove_const< GridImp >::type::HostGridType HostGrid
Definition identitygridindexsets.hh:29
│ │ │ │ -
Types types(int codim) const
Deliver all geometry types used in this grid.
Definition identitygridindexsets.hh:63
│ │ │ │ -
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:85
│ │ │ │ -
void update(const GridImp &grid, int level)
Set up the index set.
Definition identitygridindexsets.hh:76
│ │ │ │ -
Definition identitygridindexsets.hh:96
│ │ │ │ -
IdentityGridLeafIndexSet(const GridImp &grid)
constructor stores reference to a grid and level
Definition identitygridindexsets.hh:111
│ │ │ │ -
static constexpr int dim
Definition identitygridindexsets.hh:107
│ │ │ │ -
std::size_t size(int codim) const
get number of entities of given codim
Definition identitygridindexsets.hh:148
│ │ │ │ -
bool contains(const EntityType &e) const
Return true if the given entity is contained in the index set.
Definition identitygridindexsets.hh:161
│ │ │ │ -
std::size_t size(GeometryType type) const
get number of entities of given type
Definition identitygridindexsets.hh:141
│ │ │ │ -
HostGrid::LevelGridView::IndexSet::Types Types
Definition identitygridindexsets.hh:101
│ │ │ │ -
int index(const typename std::remove_const< GridImp >::type::template Codim< codim >::Entity &e) const
get index of an entity
Definition identitygridindexsets.hh:122
│ │ │ │ -
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:134
│ │ │ │ -
Types types(int codim) const
Deliver all geometry types used in this grid.
Definition identitygridindexsets.hh:154
│ │ │ │ -
GridImp * grid_
Definition identitygridindexsets.hh:175
│ │ │ │ -
void update(const GridImp &grid)
Definition identitygridindexsets.hh:169
│ │ │ │ -
Definition identitygridindexsets.hh:185
│ │ │ │ -
IdentityGridGlobalIdSet(const GridImp &g)
constructor stores reference to a grid
Definition identitygridindexsets.hh:192
│ │ │ │ -
void update()
Definition identitygridindexsets.hh:224
│ │ │ │ -
const GridImp * grid_
Definition identitygridindexsets.hh:227
│ │ │ │ -
HostGrid::Traits::GlobalIdSet::IdType IdType
define the type used for persistent indices
Definition identitygridindexsets.hh:195
│ │ │ │ -
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:216
│ │ │ │ -
IdType id(const typename std::remove_const< GridImp >::type::Traits::template Codim< cd >::Entity &e) const
get id of an entity
Definition identitygridindexsets.hh:204
│ │ │ │ -
Definition identitygridindexsets.hh:237
│ │ │ │ -
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:270
│ │ │ │ -
IdentityGridLocalIdSet(const GridImp &g)
constructor stores reference to a grid
Definition identitygridindexsets.hh:249
│ │ │ │ -
const GridImp * grid_
Definition identitygridindexsets.hh:281
│ │ │ │ -
void update()
Definition identitygridindexsets.hh:278
│ │ │ │ -
IdType id(const typename std::remove_const< GridImp >::type::Traits::template Codim< cd >::Entity &e) const
get id of an entity
Definition identitygridindexsets.hh:258
│ │ │ │ -
HostGrid::Traits::LocalIdSet::IdType IdType
define the type used for persistent local ids
Definition identitygridindexsets.hh:245
│ │ │ │ -
Provides base classes for index and id sets.
│ │ │ │ +
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,445 +1,113 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ +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 © 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_IDENTITYGRIDLEAFITERATOR_HH │ │ │ │ │ +6#define DUNE_IDENTITYGRIDLEAFITERATOR_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 │ │ │ │ │ +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 │ │ │ │ │ -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; │ │ │ │ │ +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: │ │ │ │ │ +29 │ │ │ │ │ +_3_0 constexpr static int _c_o_d_i_m_e_n_s_i_o_n = codim; │ │ │ │ │ 31 │ │ │ │ │ -_3_2 constexpr static int _d_i_m = GridImp::dimension; │ │ │ │ │ +_3_2 typedef typename GridImp::template Codim::Entity _E_n_t_i_t_y; │ │ │ │ │ 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 } │ │ │ │ │ +_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 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); │ │ │ │ │ +_5_1 void _i_n_c_r_e_m_e_n_t() { │ │ │ │ │ +52 ++hostLeafIterator_; │ │ │ │ │ 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 │ │ │ │ │ -_6_3 _T_y_p_e_s _t_y_p_e_s (int codim) const │ │ │ │ │ -64 { │ │ │ │ │ -65 return _g_r_i_d__->hostgrid_->levelIndexSet(_l_e_v_e_l__).types(codim); │ │ │ │ │ -66 } │ │ │ │ │ +_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 │ │ │ │ │ -69 template │ │ │ │ │ -_7_0 bool _c_o_n_t_a_i_n_s (const EntityType& e) const │ │ │ │ │ -71 { │ │ │ │ │ -72 return _g_r_i_d__->hostgrid_->levelIndexSet(_l_e_v_e_l__).contains(_g_r_i_d__->template │ │ │ │ │ -getHostEntity(e)); │ │ │ │ │ -73 } │ │ │ │ │ +68 HostGridLeafIterator hostLeafIterator_; │ │ │ │ │ +69 │ │ │ │ │ +70 }; │ │ │ │ │ +71 │ │ │ │ │ +72 │ │ │ │ │ +73} // namespace Dune │ │ │ │ │ 74 │ │ │ │ │ -_7_6 void _u_p_d_a_t_e(const GridImp& grid, int level) │ │ │ │ │ -77 { │ │ │ │ │ -78 _g_r_i_d__ = &grid; │ │ │ │ │ -79 _l_e_v_e_l__ = level; │ │ │ │ │ -80 } │ │ │ │ │ -81 │ │ │ │ │ -82 │ │ │ │ │ -_8_3 GridImp* _g_r_i_d__; │ │ │ │ │ -84 │ │ │ │ │ -_8_5 int _l_e_v_e_l__; │ │ │ │ │ -86 }; │ │ │ │ │ -87 │ │ │ │ │ -88 │ │ │ │ │ -89 template │ │ │ │ │ -_9_0 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 : │ │ │ │ │ -91 public _I_n_d_e_x_S_e_t, │ │ │ │ │ -93 typename std::remove_const::type::HostGridType::LeafGridView:: │ │ │ │ │ -IndexSet::IndexType, │ │ │ │ │ -94 typename std::remove_const::type::HostGridType::LeafGridView:: │ │ │ │ │ -IndexSet::Types │ │ │ │ │ -95 > │ │ │ │ │ -96 { │ │ │ │ │ -97 typedef typename std::remove_const::type::HostGridType HostGrid; │ │ │ │ │ -98 │ │ │ │ │ -99 public: │ │ │ │ │ -100 │ │ │ │ │ -_1_0_1 typedef typename HostGrid::LevelGridView::IndexSet::Types _T_y_p_e_s; │ │ │ │ │ -102 │ │ │ │ │ -103 /* │ │ │ │ │ -104 * We use the remove_const to extract the Type from the mutable class, │ │ │ │ │ -105 * because the const class is not instantiated yet. │ │ │ │ │ -106 */ │ │ │ │ │ -_1_0_7 constexpr static int _d_i_m = std::remove_const::type::dimension; │ │ │ │ │ -108 │ │ │ │ │ -109 │ │ │ │ │ -_1_1_1 _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) │ │ │ │ │ -112 : _g_r_i_d__(&grid) │ │ │ │ │ -113 {} │ │ │ │ │ -114 │ │ │ │ │ -115 │ │ │ │ │ -117 /* │ │ │ │ │ -118 We use the RemoveConst to extract the Type from the mutable class, │ │ │ │ │ -119 because the const class is not instantiated yet. │ │ │ │ │ -120 */ │ │ │ │ │ -121 template │ │ │ │ │ -_1_2_2 int _i_n_d_e_x (const typename std::remove_const::type::template │ │ │ │ │ -Codim::Entity& e) const │ │ │ │ │ -123 { │ │ │ │ │ -124 return _g_r_i_d__->hostgrid_->leafIndexSet().template index(_g_r_i_d__- │ │ │ │ │ ->template getHostEntity(e)); │ │ │ │ │ -125 } │ │ │ │ │ -126 │ │ │ │ │ -127 │ │ │ │ │ -129 /* │ │ │ │ │ -130 We use the RemoveConst to extract the Type from the mutable class, │ │ │ │ │ -131 because the const class is not instantiated yet. │ │ │ │ │ -132 */ │ │ │ │ │ -133 template │ │ │ │ │ -_1_3_4 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 │ │ │ │ │ -135 { │ │ │ │ │ -136 return _g_r_i_d__->hostgrid_->leafIndexSet().subIndex(_g_r_i_d__->template │ │ │ │ │ -getHostEntity(e),i, codim); │ │ │ │ │ -137 } │ │ │ │ │ -138 │ │ │ │ │ -139 │ │ │ │ │ -_1_4_1 std::size_t _s_i_z_e (GeometryType type) const │ │ │ │ │ -142 { │ │ │ │ │ -143 return _g_r_i_d__->hostgrid_->leafIndexSet().size(type); │ │ │ │ │ -144 } │ │ │ │ │ -145 │ │ │ │ │ -146 │ │ │ │ │ -_1_4_8 std::size_t _s_i_z_e (int codim) const │ │ │ │ │ -149 { │ │ │ │ │ -150 return _g_r_i_d__->hostgrid_->leafIndexSet().size(codim); │ │ │ │ │ -151 } │ │ │ │ │ -152 │ │ │ │ │ -_1_5_4 _T_y_p_e_s _t_y_p_e_s (int codim) const │ │ │ │ │ -155 { │ │ │ │ │ -156 return _g_r_i_d__->hostgrid_->leafIndexSet().types(codim); │ │ │ │ │ -157 } │ │ │ │ │ -158 │ │ │ │ │ -160 template │ │ │ │ │ -_1_6_1 bool _c_o_n_t_a_i_n_s (const EntityType& e) const │ │ │ │ │ -162 { │ │ │ │ │ -163 return _g_r_i_d__->hostgrid_->leafIndexSet().contains(_g_r_i_d__->template │ │ │ │ │ -getHostEntity(e)); │ │ │ │ │ -164 } │ │ │ │ │ -165 │ │ │ │ │ -166 │ │ │ │ │ -167 │ │ │ │ │ -_1_6_9 void _u_p_d_a_t_e(const GridImp& grid) │ │ │ │ │ -170 { │ │ │ │ │ -171 _g_r_i_d__ = &grid; │ │ │ │ │ -172 } │ │ │ │ │ -173 │ │ │ │ │ -174 │ │ │ │ │ -_1_7_5 GridImp* _g_r_i_d__; │ │ │ │ │ -176 }; │ │ │ │ │ -177 │ │ │ │ │ -178 │ │ │ │ │ -179 │ │ │ │ │ -180 │ │ │ │ │ -181 template │ │ │ │ │ -_1_8_2 class _I_d_e_n_t_i_t_y_G_r_i_d_G_l_o_b_a_l_I_d_S_e_t : │ │ │ │ │ -183 public _I_d_S_e_t, │ │ │ │ │ -184 typename std::remove_const::type::HostGridType::Traits:: │ │ │ │ │ -GlobalIdSet::IdType> │ │ │ │ │ -185 { │ │ │ │ │ -186 │ │ │ │ │ -187 typedef typename std::remove_const::type::HostGridType HostGrid; │ │ │ │ │ -188 │ │ │ │ │ -189 │ │ │ │ │ -190 public: │ │ │ │ │ -_1_9_2 _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) {} │ │ │ │ │ -193 │ │ │ │ │ -_1_9_5 typedef typename HostGrid::Traits::GlobalIdSet::IdType _I_d_T_y_p_e; │ │ │ │ │ -196 │ │ │ │ │ -197 │ │ │ │ │ -199 /* │ │ │ │ │ -200 We use the remove_const to extract the Type from the mutable class, │ │ │ │ │ -201 because the const class is not instantiated yet. │ │ │ │ │ -202 */ │ │ │ │ │ -203 template │ │ │ │ │ -_2_0_4 _I_d_T_y_p_e _i_d (const typename std::remove_const::type::Traits:: │ │ │ │ │ -template Codim::Entity& e) const │ │ │ │ │ -205 { │ │ │ │ │ -206 // Return id of the host entity │ │ │ │ │ -207 return _g_r_i_d__->hostgrid_->globalIdSet().id(e.impl().hostEntity_); │ │ │ │ │ -208 } │ │ │ │ │ -209 │ │ │ │ │ -210 │ │ │ │ │ -212 /* │ │ │ │ │ -213 We use the remove_const to extract the Type from the mutable class, │ │ │ │ │ -214 because the const class is not instantiated yet. │ │ │ │ │ -215 */ │ │ │ │ │ -_2_1_6 _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 │ │ │ │ │ -217 { │ │ │ │ │ -218 // Return sub id of the host entity │ │ │ │ │ -219 return _g_r_i_d__->hostgrid_->globalIdSet().subId(e.impl().hostEntity_,i, │ │ │ │ │ -codim); │ │ │ │ │ -220 } │ │ │ │ │ -221 │ │ │ │ │ -222 │ │ │ │ │ -_2_2_4 void _u_p_d_a_t_e() {} │ │ │ │ │ -225 │ │ │ │ │ -226 │ │ │ │ │ -_2_2_7 const GridImp* _g_r_i_d__; │ │ │ │ │ -228 }; │ │ │ │ │ -229 │ │ │ │ │ -230 │ │ │ │ │ -231 │ │ │ │ │ -232 │ │ │ │ │ -233 template │ │ │ │ │ -_2_3_4 class _I_d_e_n_t_i_t_y_G_r_i_d_L_o_c_a_l_I_d_S_e_t : │ │ │ │ │ -235 public _I_d_S_e_t, │ │ │ │ │ -236 typename std::remove_const::type::HostGridType::Traits:: │ │ │ │ │ -LocalIdSet::IdType> │ │ │ │ │ -237 { │ │ │ │ │ -238 private: │ │ │ │ │ -239 │ │ │ │ │ -240 typedef typename std::remove_const::type::HostGridType HostGrid; │ │ │ │ │ -241 │ │ │ │ │ -242 │ │ │ │ │ -243 public: │ │ │ │ │ -_2_4_5 typedef typename HostGrid::Traits::LocalIdSet::IdType _I_d_T_y_p_e; │ │ │ │ │ -246 │ │ │ │ │ -247 │ │ │ │ │ -_2_4_9 _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) {} │ │ │ │ │ -250 │ │ │ │ │ -251 │ │ │ │ │ -253 /* │ │ │ │ │ -254 We use the remove_const to extract the Type from the mutable class, │ │ │ │ │ -255 because the const class is not instantiated yet. │ │ │ │ │ -256 */ │ │ │ │ │ -257 template │ │ │ │ │ -_2_5_8 _I_d_T_y_p_e _i_d (const typename std::remove_const::type::Traits:: │ │ │ │ │ -template Codim::Entity& e) const │ │ │ │ │ -259 { │ │ │ │ │ -260 // Return id of the host entity │ │ │ │ │ -261 return _g_r_i_d__->hostgrid_->localIdSet().id(e.impl().hostEntity_); │ │ │ │ │ -262 } │ │ │ │ │ -263 │ │ │ │ │ -264 │ │ │ │ │ -266 /* │ │ │ │ │ -267 * We use the remove_const to extract the Type from the mutable class, │ │ │ │ │ -268 * because the const class is not instantiated yet. │ │ │ │ │ -269 */ │ │ │ │ │ -_2_7_0 _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 │ │ │ │ │ -271 { │ │ │ │ │ -272 // Return sub id of the host entity │ │ │ │ │ -273 return _g_r_i_d__->hostgrid_->localIdSet().subId(e.impl().hostEntity_,i,codim); │ │ │ │ │ -274 } │ │ │ │ │ -275 │ │ │ │ │ -276 │ │ │ │ │ -_2_7_8 void _u_p_d_a_t_e() {} │ │ │ │ │ -279 │ │ │ │ │ -280 │ │ │ │ │ -_2_8_1 const GridImp* _g_r_i_d__; │ │ │ │ │ -282 }; │ │ │ │ │ -283 │ │ │ │ │ -284 │ │ │ │ │ -285} // namespace Dune │ │ │ │ │ -286 │ │ │ │ │ -287 │ │ │ │ │ -288#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:805 │ │ │ │ │ _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 common/indexidset.hh:78 │ │ │ │ │ -_D_u_n_e_:_:_I_d_S_e_t │ │ │ │ │ -Id Set Interface. │ │ │ │ │ -DDeeffiinniittiioonn common/indexidset.hh:447 │ │ │ │ │ -_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: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_:_:_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:83 │ │ │ │ │ -_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_:_:_t_y_p_e_s │ │ │ │ │ -Types types(int codim) const │ │ │ │ │ -Deliver all geometry types used in this grid. │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:63 │ │ │ │ │ -_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:85 │ │ │ │ │ -_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:76 │ │ │ │ │ -_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:96 │ │ │ │ │ -_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:111 │ │ │ │ │ -_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:107 │ │ │ │ │ -_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: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_:_:_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:161 │ │ │ │ │ -_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: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 │ │ │ │ │ -HostGrid::LevelGridView::IndexSet::Types Types │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:101 │ │ │ │ │ -_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:122 │ │ │ │ │ -_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:134 │ │ │ │ │ -_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:154 │ │ │ │ │ -_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: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_:_:_u_p_d_a_t_e │ │ │ │ │ -void update(const GridImp &grid) │ │ │ │ │ -DDeeffiinniittiioonn identitygridindexsets.hh:169 │ │ │ │ │ -_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:185 │ │ │ │ │ -_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:192 │ │ │ │ │ -_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:224 │ │ │ │ │ -_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:227 │ │ │ │ │ -_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:195 │ │ │ │ │ -_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:216 │ │ │ │ │ -_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:204 │ │ │ │ │ -_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:237 │ │ │ │ │ -_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:270 │ │ │ │ │ -_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:249 │ │ │ │ │ -_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:281 │ │ │ │ │ -_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:278 │ │ │ │ │ -_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:258 │ │ │ │ │ -_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:245 │ │ │ │ │ -_i_n_d_e_x_i_d_s_e_t_._h_h │ │ │ │ │ -Provides base classes for index and id sets. │ │ │ │ │ +_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 │ │ │ │ │ +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/a00761.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: gnuplot.cc File Reference │ │ │ │ +dune-grid: common.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,39 +65,136 @@ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -Namespaces
│ │ │ │ -
gnuplot.cc File Reference
│ │ │ │ +Classes | │ │ │ │ +Namespaces | │ │ │ │ +Enumerations | │ │ │ │ +Functions
│ │ │ │ +
common.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

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

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

│ │ │ │ -
#include "../gnuplot.hh"
│ │ │ │ +
#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::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

│ │ │ │ -

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

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

Common stuff for the VTKWriter.

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

This file contains common stuff for all instances of VTKWriter.

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,23 +2,94 @@ │ │ │ │ │ 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" │ │ │ │ │ + * _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_:_:_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 ********** │ │ │ │ │ -Implementation of gnuplot output for 1D and 2D grids. │ │ │ │ │ +Common stuff for the VTKWriter. │ │ │ │ │ Author │ │ │ │ │ - Christian Engwer │ │ │ │ │ + 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/a00761_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: gnuplot.cc Source File │ │ │ │ +dune-grid: common.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,136 +70,384 @@ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
gnuplot.cc
│ │ │ │ +
common.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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 {
│ │ │ │ +
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
│ │ │ │ -
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) {
│ │ │ │ +
14#include <dune/common/exceptions.hh>
│ │ │ │ +
15#include <dune/geometry/type.hh>
│ │ │ │ +
16#include <dune/common/typetraits.hh>
│ │ │ │ +
17
│ │ │ │ +
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
│ │ │ │ + │ │ │ │ +
75
│ │ │ │ + │ │ │ │ +
82 };
│ │ │ │ +
│ │ │ │ +
83
│ │ │ │ +
85 //
│ │ │ │ +
86 // PrintType
│ │ │ │ +
87 //
│ │ │ │ +
88
│ │ │ │ +
90
│ │ │ │ +
94 template<typename T>
│ │ │ │ +
│ │ │ │ +
95 struct PrintType {
│ │ │ │ +
97 typedef T Type;
│ │ │ │ +
98 };
│ │ │ │ +
│ │ │ │
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 }
│ │ │ │ +
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 }
│ │ │ │ -
118
│ │ │ │ -
119}
│ │ │ │ +
118 //
│ │ │ │ +
119 // VTK::GeometryType related stuff
│ │ │ │ +
120 //
│ │ │ │ +
121
│ │ │ │ +
123
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
134 line = 3,
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
140 prism = 13,
│ │ │ │ + │ │ │ │ +
142 polyhedron = 42
│ │ │ │ +
143 };
│ │ │ │ +
│ │ │ │ +
144
│ │ │ │ +
146
│ │ │ │ +
│ │ │ │ +
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 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 };
│ │ │ │
│ │ │ │ -
static constexpr int dimension
The dimension of the grid.
Definition common/gridview.hh:134
│ │ │ │ +
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
│ │ │ │ -
A struct that collects all associated types of one implementation from the Traits class.
Definition common/gridview.hh:104
│ │ │ │ -
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
│ │ │ │ +
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
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,139 +2,452 @@ │ │ │ │ │ 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 │ │ │ │ │ + * _v_t_k │ │ │ │ │ +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 © 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 { │ │ │ │ │ +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 │ │ │ │ │ -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) { │ │ │ │ │ +14#include │ │ │ │ │ +15#include │ │ │ │ │ +16#include │ │ │ │ │ +17 │ │ │ │ │ +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_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 // 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 } │ │ │ │ │ +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 } │ │ │ │ │ -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:134 │ │ │ │ │ +118 // │ │ │ │ │ +119 // VTK::GeometryType related stuff │ │ │ │ │ +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) │ │ │ │ │ +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 │ │ │ │ │ +_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_:_:_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:104 │ │ │ │ │ -_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_:_:_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 │ │ │ │ │ =============================================================================== │ │ │ │ │ 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: volumeiterators.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,39 +65,46 @@ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
dgfexception.hh File Reference
│ │ │ │ +
volumeiterators.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/common/exceptions.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::DGFException
 exception class for IO errors in the DGF parser More...
class  Dune::VTK::ConformingVolumeIteratorFactory< GV >
 
class  Dune::VTK::NonConformingVolumeIteratorFactory< GV >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::VTK
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,22 +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 │ │ │ │ │ + * _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 │ │ │ │ │ +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_:_:_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_:_:_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_:_:_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: volumeiterators.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,44 +70,240 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dgfexception.hh
│ │ │ │ +
volumeiterators.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_VOLUMEITERATORS_HH
│ │ │ │ +
7#define DUNE_GRID_IO_FILE_VTK_VOLUMEITERATORS_HH
│ │ │ │ +
8
│ │ │ │ + │ │ │ │ +
10
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
15
│ │ │ │ +
16namespace Dune {
│ │ │ │
19
│ │ │ │ -
20#endif
│ │ │ │ +
20 namespace VTK {
│ │ │ │ +
21
│ │ │ │ +
22 template<typename GV>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
24 const GV& gv;
│ │ │ │ +
25
│ │ │ │ +
26 typedef typename GV::IndexSet IndexSet;
│ │ │ │ +
27 const IndexSet& indexSet() const { return gv.indexSet(); }
│ │ │ │ + │ │ │ │ + │ │ │ │ +
30
│ │ │ │ +
31 public:
│ │ │ │ +
32 static const unsigned dimCell = GV::dimension;
│ │ │ │ +
33
│ │ │ │ +
34 typedef typename GV::template Codim<0>::Entity Cell;
│ │ │ │ +
35 typedef typename GV::template Codim<0>::
│ │ │ │ +
36 template Partition<InteriorBorder_Partition>::Iterator CellIterator;
│ │ │ │ +
37
│ │ │ │ + │ │ │ │ + │ │ │ │ +
40
│ │ │ │ + │ │ │ │ + │ │ │ │ +
43 typename GV::IndexSet> PointIterator;
│ │ │ │ +
44
│ │ │ │ + │ │ │ │ + │ │ │ │ +
47 typedef typename GV::Communication Communication;
│ │ │ │ +
48
│ │ │ │ +
│ │ │ │ +
49 explicit ConformingVolumeIteratorFactory(const GV& gv_)
│ │ │ │ +
50 : gv(gv_)
│ │ │ │ +
51 { }
│ │ │ │ +
│ │ │ │ +
52
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
54 return gv.template begin<0, InteriorBorder_Partition>();
│ │ │ │ +
55 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
57 return gv.template end<0, InteriorBorder_Partition>();
│ │ │ │ +
58 }
│ │ │ │ +
│ │ │ │ +
59
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
62 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
64 return CornerIterator(endCells());
│ │ │ │ +
65 }
│ │ │ │ +
│ │ │ │ +
66
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
68 return PointIterator(beginCells(), endCells(), gv.indexSet());
│ │ │ │ +
69 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
71 return PointIterator(endCells());
│ │ │ │ +
72 }
│ │ │ │ +
│ │ │ │ +
73
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
75 return ConnectivityWriter(*this);
│ │ │ │ +
76 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
77 const Communication& comm() const {
│ │ │ │ +
78 return gv.comm();
│ │ │ │ +
79 }
│ │ │ │ +
│ │ │ │ +
80 };
│ │ │ │ +
│ │ │ │ +
81
│ │ │ │ +
82 template<typename GV>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
84 const GV& gv;
│ │ │ │ +
85
│ │ │ │ +
86 public:
│ │ │ │ +
87 static const unsigned dimCell = GV::dimension;
│ │ │ │ +
88
│ │ │ │ +
89 typedef typename GV::template Codim<0>::Entity Cell;
│ │ │ │ +
90 typedef typename GV::template Codim<0>::
│ │ │ │ +
91 template Partition<InteriorBorder_Partition>::Iterator CellIterator;
│ │ │ │ +
92
│ │ │ │ + │ │ │ │ + │ │ │ │ +
95
│ │ │ │ +
96 typedef Corner Point;
│ │ │ │ + │ │ │ │ +
98
│ │ │ │ + │ │ │ │ +
100 typedef typename GV::Communication Communication;
│ │ │ │ +
101
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
103 : gv(gv_)
│ │ │ │ +
104 { }
│ │ │ │ +
│ │ │ │ +
105
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
107 return gv.template begin<0, InteriorBorder_Partition>();
│ │ │ │ +
108 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
110 return gv.template end<0, InteriorBorder_Partition>();
│ │ │ │ +
111 }
│ │ │ │ +
│ │ │ │ +
112
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
115 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
117 return CornerIterator(endCells());
│ │ │ │ +
118 }
│ │ │ │ +
│ │ │ │ +
119
│ │ │ │ + │ │ │ │ +
121 PointIterator endPoints() const { return endCorners(); }
│ │ │ │ +
122
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
124 return ConnectivityWriter();
│ │ │ │ +
125 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
126 const Communication& comm() const {
│ │ │ │ +
127 return gv.comm();
│ │ │ │ +
128 }
│ │ │ │ +
│ │ │ │ +
129 };
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
exception class for IO errors in the DGF parser
Definition dgfexception.hh:16
│ │ │ │ +
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
│ │ │ │ +
CornerIterator endCorners() const
Definition volumeiterators.hh:63
│ │ │ │ +
VTK::CornerIterator< CellIterator > CornerIterator
Definition volumeiterators.hh:39
│ │ │ │ +
VTK::Corner< Cell > Corner
Definition volumeiterators.hh:38
│ │ │ │ +
CellIterator endCells() const
Definition volumeiterators.hh:56
│ │ │ │ +
GV::Communication Communication
Definition volumeiterators.hh:47
│ │ │ │ +
VTK::PointIterator< CellIterator, typename GV::IndexSet > PointIterator
Definition volumeiterators.hh:43
│ │ │ │ +
ConformingConnectivityWriter< ConformingVolumeIteratorFactory< GV > > ConnectivityWriter
Definition volumeiterators.hh:46
│ │ │ │ +
CornerIterator beginCorners() const
Definition volumeiterators.hh:60
│ │ │ │ +
static const unsigned dimCell
Definition volumeiterators.hh:32
│ │ │ │ +
PointIterator endPoints() const
Definition volumeiterators.hh:70
│ │ │ │ +
const Communication & comm() const
Definition volumeiterators.hh:77
│ │ │ │ +
ConformingVolumeIteratorFactory(const GV &gv_)
Definition volumeiterators.hh:49
│ │ │ │ +
VTK::Corner< Cell > Point
Definition volumeiterators.hh:41
│ │ │ │ +
ConnectivityWriter makeConnectivity() const
Definition volumeiterators.hh:74
│ │ │ │ +
CellIterator beginCells() const
Definition volumeiterators.hh:53
│ │ │ │ +
GV::template Codim< 0 >::Entity Cell
Definition volumeiterators.hh:34
│ │ │ │ +
PointIterator beginPoints() const
Definition volumeiterators.hh:67
│ │ │ │ +
GV::template Codim< 0 >::template Partition< InteriorBorder_Partition >::Iterator CellIterator
Definition volumeiterators.hh:36
│ │ │ │ +
Definition volumeiterators.hh:83
│ │ │ │ +
const Communication & comm() const
Definition volumeiterators.hh:126
│ │ │ │ +
PointIterator beginPoints() const
Definition volumeiterators.hh:120
│ │ │ │ +
GV::Communication Communication
Definition volumeiterators.hh:100
│ │ │ │ +
CellIterator beginCells() const
Definition volumeiterators.hh:106
│ │ │ │ +
GV::template Codim< 0 >::Entity Cell
Definition volumeiterators.hh:89
│ │ │ │ +
NonConformingVolumeIteratorFactory(const GV &gv_)
Definition volumeiterators.hh:102
│ │ │ │ +
ConnectivityWriter makeConnectivity() const
Definition volumeiterators.hh:123
│ │ │ │ +
NonConformingConnectivityWriter< Cell > ConnectivityWriter
Definition volumeiterators.hh:99
│ │ │ │ +
static const unsigned dimCell
Definition volumeiterators.hh:87
│ │ │ │ +
CellIterator endCells() const
Definition volumeiterators.hh:109
│ │ │ │ +
CornerIterator endCorners() const
Definition volumeiterators.hh:116
│ │ │ │ +
VTK::CornerIterator< CellIterator > CornerIterator
Definition volumeiterators.hh:94
│ │ │ │ +
VTK::Corner< Cell > Corner
Definition volumeiterators.hh:93
│ │ │ │ +
CornerIterator PointIterator
Definition volumeiterators.hh:97
│ │ │ │ +
GV::template Codim< 0 >::template Partition< InteriorBorder_Partition >::Iterator CellIterator
Definition volumeiterators.hh:91
│ │ │ │ +
PointIterator endPoints() const
Definition volumeiterators.hh:121
│ │ │ │ +
Corner Point
Definition volumeiterators.hh:96
│ │ │ │ +
CornerIterator beginCorners() const
Definition volumeiterators.hh:113
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,38 +2,286 @@ │ │ │ │ │ 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 │ │ │ │ │ +volumeiterators.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 © 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_VOLUMEITERATORS_HH │ │ │ │ │ +7#define DUNE_GRID_IO_FILE_VTK_VOLUMEITERATORS_HH │ │ │ │ │ +8 │ │ │ │ │ +9#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> │ │ │ │ │ +10 │ │ │ │ │ +11#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> │ │ │ │ │ +12#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> │ │ │ │ │ +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_/_p_o_i_n_t_i_t_e_r_a_t_o_r_._h_h> │ │ │ │ │ +15 │ │ │ │ │ +16namespace _D_u_n_e { │ │ │ │ │ 19 │ │ │ │ │ -20#endif │ │ │ │ │ +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_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y { │ │ │ │ │ +24 const GV& gv; │ │ │ │ │ +25 │ │ │ │ │ +26 typedef typename GV::IndexSet IndexSet; │ │ │ │ │ +_2_7 const IndexSet& indexSet() const { return gv.indexSet(); } │ │ │ │ │ +28 friend 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< │ │ │ │ │ +29 _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 >; │ │ │ │ │ +30 │ │ │ │ │ +31 public: │ │ │ │ │ +_3_2 static const unsigned _d_i_m_C_e_l_l = GV::dimension; │ │ │ │ │ +33 │ │ │ │ │ +_3_4 typedef typename GV::template Codim<0>::Entity _C_e_l_l; │ │ │ │ │ +35 typedef typename GV::template Codim<0>:: │ │ │ │ │ +_3_6 template Partition::Iterator _C_e_l_l_I_t_e_r_a_t_o_r; │ │ │ │ │ +37 │ │ │ │ │ +_3_8 typedef _V_T_K_:_:_C_o_r_n_e_r_<_C_e_l_l_> _C_o_r_n_e_r; │ │ │ │ │ +_3_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; │ │ │ │ │ +40 │ │ │ │ │ +_4_1 typedef _V_T_K_:_:_C_o_r_n_e_r_<_C_e_l_l_> _P_o_i_n_t; │ │ │ │ │ +42 typedef _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, │ │ │ │ │ +_4_3 typename GV::IndexSet> _P_o_i_n_t_I_t_e_r_a_t_o_r; │ │ │ │ │ +44 │ │ │ │ │ +45 typedef _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_V_o_l_u_m_e_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_<_G_V_> │ │ │ │ │ +_4_6 > _C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r; │ │ │ │ │ +_4_7 typedef typename GV::Communication _C_o_m_m_u_n_i_c_a_t_i_o_n; │ │ │ │ │ +48 │ │ │ │ │ +_4_9 explicit _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(const GV& gv_) │ │ │ │ │ +50 : gv(gv_) │ │ │ │ │ +51 { } │ │ │ │ │ +52 │ │ │ │ │ +_5_3 _C_e_l_l_I_t_e_r_a_t_o_r _b_e_g_i_n_C_e_l_l_s() const { │ │ │ │ │ +54 return gv.template begin<0, InteriorBorder_Partition>(); │ │ │ │ │ +55 } │ │ │ │ │ +_5_6 _C_e_l_l_I_t_e_r_a_t_o_r _e_n_d_C_e_l_l_s() const { │ │ │ │ │ +57 return gv.template end<0, InteriorBorder_Partition>(); │ │ │ │ │ +58 } │ │ │ │ │ +59 │ │ │ │ │ +_6_0 _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 { │ │ │ │ │ +61 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()); │ │ │ │ │ +62 } │ │ │ │ │ +_6_3 _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 { │ │ │ │ │ +64 return _C_o_r_n_e_r_I_t_e_r_a_t_o_r(_e_n_d_C_e_l_l_s()); │ │ │ │ │ +65 } │ │ │ │ │ +66 │ │ │ │ │ +_6_7 _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 { │ │ │ │ │ +68 return _P_o_i_n_t_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(), gv.indexSet()); │ │ │ │ │ +69 } │ │ │ │ │ +_7_0 _P_o_i_n_t_I_t_e_r_a_t_o_r _e_n_d_P_o_i_n_t_s() const { │ │ │ │ │ +71 return _P_o_i_n_t_I_t_e_r_a_t_o_r(_e_n_d_C_e_l_l_s()); │ │ │ │ │ +72 } │ │ │ │ │ +73 │ │ │ │ │ +_7_4 _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 { │ │ │ │ │ +75 return _C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r(*this); │ │ │ │ │ +76 } │ │ │ │ │ +_7_7 const _C_o_m_m_u_n_i_c_a_t_i_o_n& _c_o_m_m() const { │ │ │ │ │ +78 return gv.comm(); │ │ │ │ │ +79 } │ │ │ │ │ +80 }; │ │ │ │ │ +81 │ │ │ │ │ +82 template │ │ │ │ │ +_8_3 class _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 { │ │ │ │ │ +84 const GV& gv; │ │ │ │ │ +85 │ │ │ │ │ +86 public: │ │ │ │ │ +_8_7 static const unsigned _d_i_m_C_e_l_l = GV::dimension; │ │ │ │ │ +88 │ │ │ │ │ +_8_9 typedef typename GV::template Codim<0>::Entity _C_e_l_l; │ │ │ │ │ +90 typedef typename GV::template Codim<0>:: │ │ │ │ │ +_9_1 template Partition::Iterator _C_e_l_l_I_t_e_r_a_t_o_r; │ │ │ │ │ +92 │ │ │ │ │ +_9_3 typedef _V_T_K_:_:_C_o_r_n_e_r_<_C_e_l_l_> _C_o_r_n_e_r; │ │ │ │ │ +_9_4 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; │ │ │ │ │ +95 │ │ │ │ │ +_9_6 typedef _C_o_r_n_e_r _P_o_i_n_t; │ │ │ │ │ +_9_7 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; │ │ │ │ │ +98 │ │ │ │ │ +_9_9 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_0_0 typedef typename GV::Communication _C_o_m_m_u_n_i_c_a_t_i_o_n; │ │ │ │ │ +101 │ │ │ │ │ +_1_0_2 explicit _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(const GV& gv_) │ │ │ │ │ +103 : gv(gv_) │ │ │ │ │ +104 { } │ │ │ │ │ +105 │ │ │ │ │ +_1_0_6 _C_e_l_l_I_t_e_r_a_t_o_r _b_e_g_i_n_C_e_l_l_s() const { │ │ │ │ │ +107 return gv.template begin<0, InteriorBorder_Partition>(); │ │ │ │ │ +108 } │ │ │ │ │ +_1_0_9 _C_e_l_l_I_t_e_r_a_t_o_r _e_n_d_C_e_l_l_s() const { │ │ │ │ │ +110 return gv.template end<0, InteriorBorder_Partition>(); │ │ │ │ │ +111 } │ │ │ │ │ +112 │ │ │ │ │ +_1_1_3 _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 { │ │ │ │ │ +114 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()); │ │ │ │ │ +115 } │ │ │ │ │ +_1_1_6 _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 { │ │ │ │ │ +117 return _C_o_r_n_e_r_I_t_e_r_a_t_o_r(_e_n_d_C_e_l_l_s()); │ │ │ │ │ +118 } │ │ │ │ │ +119 │ │ │ │ │ +_1_2_0 _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_2_1 _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(); } │ │ │ │ │ +122 │ │ │ │ │ +_1_2_3 _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 { │ │ │ │ │ +124 return _C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r(); │ │ │ │ │ +125 } │ │ │ │ │ +_1_2_6 const _C_o_m_m_u_n_i_c_a_t_i_o_n& _c_o_m_m() const { │ │ │ │ │ +127 return gv.comm(); │ │ │ │ │ +128 } │ │ │ │ │ +129 }; │ │ │ │ │ +130 │ │ │ │ │ +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 │ │ │ │ │ +_p_o_i_n_t_i_t_e_r_a_t_o_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_:_:_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_:_:_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_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_:_:_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_:_:_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_:_:_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_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 volumeiterators.hh:63 │ │ │ │ │ +_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_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r │ │ │ │ │ +VTK::CornerIterator< CellIterator > CornerIterator │ │ │ │ │ +DDeeffiinniittiioonn volumeiterators.hh:39 │ │ │ │ │ +_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_:_:_C_o_r_n_e_r │ │ │ │ │ +VTK::Corner< Cell > Corner │ │ │ │ │ +DDeeffiinniittiioonn volumeiterators.hh:38 │ │ │ │ │ +_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_:_:_e_n_d_C_e_l_l_s │ │ │ │ │ +CellIterator endCells() const │ │ │ │ │ +DDeeffiinniittiioonn volumeiterators.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_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 volumeiterators.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_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 │ │ │ │ │ +VTK::PointIterator< CellIterator, typename GV::IndexSet > PointIterator │ │ │ │ │ +DDeeffiinniittiioonn volumeiterators.hh:43 │ │ │ │ │ +_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_:_:_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r │ │ │ │ │ +ConformingConnectivityWriter< ConformingVolumeIteratorFactory< GV > > │ │ │ │ │ +ConnectivityWriter │ │ │ │ │ +DDeeffiinniittiioonn volumeiterators.hh:46 │ │ │ │ │ +_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_:_:_b_e_g_i_n_C_o_r_n_e_r_s │ │ │ │ │ +CornerIterator beginCorners() const │ │ │ │ │ +DDeeffiinniittiioonn volumeiterators.hh:60 │ │ │ │ │ +_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_:_:_d_i_m_C_e_l_l │ │ │ │ │ +static const unsigned dimCell │ │ │ │ │ +DDeeffiinniittiioonn volumeiterators.hh:32 │ │ │ │ │ +_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_:_:_e_n_d_P_o_i_n_t_s │ │ │ │ │ +PointIterator endPoints() const │ │ │ │ │ +DDeeffiinniittiioonn volumeiterators.hh:70 │ │ │ │ │ +_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_:_:_c_o_m_m │ │ │ │ │ +const Communication & comm() const │ │ │ │ │ +DDeeffiinniittiioonn volumeiterators.hh:77 │ │ │ │ │ +_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_:_:_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 │ │ │ │ │ +ConformingVolumeIteratorFactory(const GV &gv_) │ │ │ │ │ +DDeeffiinniittiioonn volumeiterators.hh:49 │ │ │ │ │ +_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_:_:_P_o_i_n_t │ │ │ │ │ +VTK::Corner< Cell > Point │ │ │ │ │ +DDeeffiinniittiioonn volumeiterators.hh:41 │ │ │ │ │ +_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_:_:_m_a_k_e_C_o_n_n_e_c_t_i_v_i_t_y │ │ │ │ │ +ConnectivityWriter makeConnectivity() const │ │ │ │ │ +DDeeffiinniittiioonn volumeiterators.hh:74 │ │ │ │ │ +_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_:_:_b_e_g_i_n_C_e_l_l_s │ │ │ │ │ +CellIterator beginCells() const │ │ │ │ │ +DDeeffiinniittiioonn volumeiterators.hh:53 │ │ │ │ │ +_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_:_:_C_e_l_l │ │ │ │ │ +GV::template Codim< 0 >::Entity Cell │ │ │ │ │ +DDeeffiinniittiioonn volumeiterators.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_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 volumeiterators.hh:67 │ │ │ │ │ +_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_:_:_C_e_l_l_I_t_e_r_a_t_o_r │ │ │ │ │ +GV::template Codim< 0 >::template Partition< InteriorBorder_Partition >:: │ │ │ │ │ +Iterator CellIterator │ │ │ │ │ +DDeeffiinniittiioonn volumeiterators.hh:36 │ │ │ │ │ +_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 │ │ │ │ │ +DDeeffiinniittiioonn volumeiterators.hh:83 │ │ │ │ │ +_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_:_:_c_o_m_m │ │ │ │ │ +const Communication & comm() const │ │ │ │ │ +DDeeffiinniittiioonn volumeiterators.hh:126 │ │ │ │ │ +_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_:_:_b_e_g_i_n_P_o_i_n_t_s │ │ │ │ │ +PointIterator beginPoints() const │ │ │ │ │ +DDeeffiinniittiioonn volumeiterators.hh:120 │ │ │ │ │ +_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_:_:_C_o_m_m_u_n_i_c_a_t_i_o_n │ │ │ │ │ +GV::Communication Communication │ │ │ │ │ +DDeeffiinniittiioonn volumeiterators.hh:100 │ │ │ │ │ +_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_:_:_b_e_g_i_n_C_e_l_l_s │ │ │ │ │ +CellIterator beginCells() const │ │ │ │ │ +DDeeffiinniittiioonn volumeiterators.hh:106 │ │ │ │ │ +_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_:_:_C_e_l_l │ │ │ │ │ +GV::template Codim< 0 >::Entity Cell │ │ │ │ │ +DDeeffiinniittiioonn volumeiterators.hh:89 │ │ │ │ │ +_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_:_: │ │ │ │ │ +_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 │ │ │ │ │ +NonConformingVolumeIteratorFactory(const GV &gv_) │ │ │ │ │ +DDeeffiinniittiioonn volumeiterators.hh:102 │ │ │ │ │ +_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_:_:_m_a_k_e_C_o_n_n_e_c_t_i_v_i_t_y │ │ │ │ │ +ConnectivityWriter makeConnectivity() const │ │ │ │ │ +DDeeffiinniittiioonn volumeiterators.hh:123 │ │ │ │ │ +_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_:_:_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r │ │ │ │ │ +NonConformingConnectivityWriter< Cell > ConnectivityWriter │ │ │ │ │ +DDeeffiinniittiioonn volumeiterators.hh:99 │ │ │ │ │ +_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_:_:_d_i_m_C_e_l_l │ │ │ │ │ +static const unsigned dimCell │ │ │ │ │ +DDeeffiinniittiioonn volumeiterators.hh:87 │ │ │ │ │ +_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_:_:_e_n_d_C_e_l_l_s │ │ │ │ │ +CellIterator endCells() const │ │ │ │ │ +DDeeffiinniittiioonn volumeiterators.hh:109 │ │ │ │ │ +_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_:_:_e_n_d_C_o_r_n_e_r_s │ │ │ │ │ +CornerIterator endCorners() const │ │ │ │ │ +DDeeffiinniittiioonn volumeiterators.hh:116 │ │ │ │ │ +_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_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r │ │ │ │ │ +VTK::CornerIterator< CellIterator > CornerIterator │ │ │ │ │ +DDeeffiinniittiioonn volumeiterators.hh:94 │ │ │ │ │ +_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_:_:_C_o_r_n_e_r │ │ │ │ │ +VTK::Corner< Cell > Corner │ │ │ │ │ +DDeeffiinniittiioonn volumeiterators.hh:93 │ │ │ │ │ +_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_:_:_P_o_i_n_t_I_t_e_r_a_t_o_r │ │ │ │ │ +CornerIterator PointIterator │ │ │ │ │ +DDeeffiinniittiioonn volumeiterators.hh:97 │ │ │ │ │ +_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_:_:_C_e_l_l_I_t_e_r_a_t_o_r │ │ │ │ │ +GV::template Codim< 0 >::template Partition< InteriorBorder_Partition >:: │ │ │ │ │ +Iterator CellIterator │ │ │ │ │ +DDeeffiinniittiioonn volumeiterators.hh:91 │ │ │ │ │ +_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_:_:_e_n_d_P_o_i_n_t_s │ │ │ │ │ +PointIterator endPoints() const │ │ │ │ │ +DDeeffiinniittiioonn volumeiterators.hh:121 │ │ │ │ │ +_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_:_:_P_o_i_n_t │ │ │ │ │ +Corner Point │ │ │ │ │ +DDeeffiinniittiioonn volumeiterators.hh:96 │ │ │ │ │ +_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_:_:_b_e_g_i_n_C_o_r_n_e_r_s │ │ │ │ │ +CornerIterator beginCorners() const │ │ │ │ │ +DDeeffiinniittiioonn volumeiterators.hh:113 │ │ │ │ │ =============================================================================== │ │ │ │ │ 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: simplexgeneration.cc File Reference │ │ │ │ +dune-grid: subsamplingvtkwriter.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,33 +65,52 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ +Classes | │ │ │ │ Namespaces
│ │ │ │ -
simplexgeneration.cc File Reference
│ │ │ │ +
subsamplingvtkwriter.hh 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...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ 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 @@ │ │ │ │ │ -us-ascii │ │ │ │ │ +utf-8 │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,20 +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 │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -simplexgeneration.cc File Reference │ │ │ │ │ -#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 │ │ │ │ │ +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_._._. │ │ │ │ │ +  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │ -  │ │ │ │ │ +********** 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/a00770.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: boundaryseg.hh File Reference │ │ │ │ +dune-grid: basicwriter.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,45 +65,52 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
boundaryseg.hh File Reference
│ │ │ │ +
basicwriter.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <cassert>
│ │ │ │ -#include <iostream>
│ │ │ │ +
#include <fstream>
│ │ │ │ +#include <iomanip>
│ │ │ │ +#include <iterator>
│ │ │ │ +#include <list>
│ │ │ │ +#include <memory>
│ │ │ │ +#include <sstream>
│ │ │ │ #include <string>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <map>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/parser.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │ │ +#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::dgf::BoundarySegBlock
class  Dune::VTK::BasicWriter< IteratorFactory >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
namespace  Dune::VTK
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,30 +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 │ │ │ │ │ + * _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 │ │ │ │ │ +basicwriter.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_/_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 │ │ │ │ │ +#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_:_:_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_:_:_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/a00770_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: boundaryseg.hh Source File │ │ │ │ +dune-grid: basicwriter.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,122 +70,494 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
boundaryseg.hh
│ │ │ │ +
basicwriter.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │ - │ │ │ │ - │ │ │ │ +
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
│ │ │ │ -
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;
│ │ │ │ +
17#include <dune/common/parallel/mpiguard.hh>
│ │ │ │ +
18#include <dune/common/path.hh>
│ │ │ │ +
19
│ │ │ │ +
20#include <dune/geometry/referenceelements.hh>
│ │ │ │ +
21
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
26
│ │ │ │ +
27namespace Dune
│ │ │ │ +
28{
│ │ │ │ +
31
│ │ │ │ +
│ │ │ │ +
32 namespace VTK {
│ │ │ │
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 );
│ │ │ │ +
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 // 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 }
│ │ │ │ -
│ │ │ │ +
42 public:
│ │ │ │ + │ │ │ │ +
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
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
54 {
│ │ │ │ -
55 return noflines();
│ │ │ │ -
56 }
│ │ │ │ -
│ │ │ │ +
53 static const FileType fileType = celldim == 1
│ │ │ │ + │ │ │ │ +
55
│ │ │ │ +
56 const IteratorFactory& factory;
│ │ │ │
57
│ │ │ │ -
58 private:
│ │ │ │ -
59 bool next();
│ │ │ │ +
58 WriterList cellData;
│ │ │ │ +
59 WriterList pointData;
│ │ │ │
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} // end namespace Dune
│ │ │ │ -
80
│ │ │ │ -
81#endif
│ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ +
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 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 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();
│ │ │ │ +
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 static std::string getFirstScalar(const WriterList& data) {
│ │ │ │ +
139 for(auto&& d : data)
│ │ │ │ +
140 if (d->ncomps() == 1)
│ │ │ │ +
141 return d->name();
│ │ │ │ +
142 return "";
│ │ │ │ +
143 }
│ │ │ │ +
│ │ │ │ +
144
│ │ │ │ +
│ │ │ │ +
145 static std::string getFirstVector(const WriterList& data) {
│ │ │ │ +
146 for(auto&& d : data)
│ │ │ │ +
147 if (d->ncomps() == 3)
│ │ │ │ +
148 return d->name();
│ │ │ │ +
149 return "";
│ │ │ │ +
150 }
│ │ │ │ +
│ │ │ │ +
151
│ │ │ │ +
│ │ │ │ +
152 void writeCellData(VTUWriter& vtuWriter, unsigned ncells) const {
│ │ │ │ +
153 if(cellData.empty()) return;
│ │ │ │ +
154
│ │ │ │ +
155 vtuWriter.beginCellData(getFirstScalar(cellData),
│ │ │ │ +
156 getFirstVector(cellData));
│ │ │ │ +
157
│ │ │ │ +
158 for (auto&& cD : cellData)
│ │ │ │ +
159 writeCellFunction(vtuWriter, *cD, ncells);
│ │ │ │ +
160 vtuWriter.endCellData();
│ │ │ │ +
161 }
│ │ │ │ +
│ │ │ │ +
162
│ │ │ │ +
│ │ │ │ +
163 void writePointData(VTUWriter& vtuWriter, unsigned npoints) const {
│ │ │ │ +
164 if(pointData.empty()) return;
│ │ │ │ +
165
│ │ │ │ +
166 vtuWriter.beginPointData(getFirstScalar(pointData),
│ │ │ │ +
167 getFirstVector(pointData));
│ │ │ │ +
168
│ │ │ │ +
169 for (auto&& pD : pointData)
│ │ │ │ +
170 writePointFunction(vtuWriter, *pD, npoints);
│ │ │ │ +
171 vtuWriter.endPointData();
│ │ │ │ +
172 }
│ │ │ │ +
│ │ │ │ +
173
│ │ │ │ +
│ │ │ │ +
174 void writeGrid(VTUWriter& vtuWriter, unsigned ncells, unsigned npoints,
│ │ │ │ +
175 unsigned ncorners) {
│ │ │ │ +
176 vtuWriter.beginPoints();
│ │ │ │ +
177 writePointFunction(vtuWriter, coords, npoints);
│ │ │ │ +
178 vtuWriter.endPoints();
│ │ │ │ +
179
│ │ │ │ +
180 vtuWriter.beginCells();
│ │ │ │ +
181 writeCornerFunction(vtuWriter, connectivity, ncorners);
│ │ │ │ +
182 writeCellFunction(vtuWriter, offsets, ncells);
│ │ │ │ +
183 if(fileType != polyData)
│ │ │ │ +
184 writeCellFunction(vtuWriter, types, ncells);
│ │ │ │ +
185 vtuWriter.endCells();
│ │ │ │ +
186 }
│ │ │ │ +
│ │ │ │ +
187
│ │ │ │ +
│ │ │ │ +
188 void writeAll(VTUWriter& vtuWriter, unsigned ncells, unsigned npoints,
│ │ │ │ +
189 unsigned ncorners) {
│ │ │ │ +
190 writeCellData(vtuWriter, ncells);
│ │ │ │ +
191 writePointData(vtuWriter, npoints);
│ │ │ │ +
192 writeGrid(vtuWriter, ncells, npoints, ncorners);
│ │ │ │ +
193 }
│ │ │ │ +
│ │ │ │ +
194
│ │ │ │ +
195 public:
│ │ │ │ +
│ │ │ │ +
196 void writePiece(const std::string& filename, OutputType outputType) {
│ │ │ │ +
197 std::ofstream stream;
│ │ │ │ +
198 stream.exceptions(std::ios_base::badbit | std::ios_base::failbit |
│ │ │ │ +
199 std::ios_base::eofbit);
│ │ │ │ +
200 stream.open(filename.c_str(), std::ios::binary);
│ │ │ │ +
201
│ │ │ │ +
202 VTUWriter vtuWriter(stream, outputType, fileType);
│ │ │ │ +
203
│ │ │ │ +
204 unsigned ncells = std::distance(factory.beginCells(),
│ │ │ │ +
205 factory.endCells());
│ │ │ │ +
206 unsigned npoints = std::distance(factory.beginPoints(),
│ │ │ │ +
207 factory.endPoints());
│ │ │ │ +
208 unsigned ncorners = std::distance(factory.beginCorners(),
│ │ │ │ +
209 factory.endCorners());
│ │ │ │ +
210
│ │ │ │ +
211 vtuWriter.beginMain(ncells, npoints);
│ │ │ │ +
212 writeAll(vtuWriter, ncells, npoints, ncorners);
│ │ │ │ +
213 vtuWriter.endMain();
│ │ │ │ +
214
│ │ │ │ +
215 if(vtuWriter.beginAppended())
│ │ │ │ +
216 writeAll(vtuWriter, ncells, npoints, ncorners);
│ │ │ │ +
217 vtuWriter.endAppended();
│ │ │ │ +
218
│ │ │ │ +
219 }
│ │ │ │ +
│ │ │ │ +
220
│ │ │ │ +
222
│ │ │ │ +
│ │ │ │ +
238 void writeCollection(const std::string name,
│ │ │ │ +
239 const std::string& piecename,
│ │ │ │ +
240 const std::string& piecepath)
│ │ │ │ +
241 {
│ │ │ │ +
242 std::ofstream stream;
│ │ │ │ +
243 stream.exceptions(std::ios_base::badbit | std::ios_base::failbit |
│ │ │ │ +
244 std::ios_base::eofbit);
│ │ │ │ +
245 stream.open(name.c_str(), std::ios::binary);
│ │ │ │ +
246
│ │ │ │ +
247 PVTUWriter writer(stream, fileType);
│ │ │ │ +
248
│ │ │ │ +
249 writer.beginMain();
│ │ │ │ +
250
│ │ │ │ +
251 // PPointData
│ │ │ │ +
252 writer.beginPointData(getFirstScalar(pointData),
│ │ │ │ +
253 getFirstVector(pointData));
│ │ │ │ +
254 for(WIterator it=pointData.begin(); it!=pointData.end(); ++it)
│ │ │ │ +
255 (*it)->addArray(writer);
│ │ │ │ +
256 writer.endPointData();
│ │ │ │ +
257
│ │ │ │ +
258 // PCellData
│ │ │ │ +
259 writer.beginCellData(getFirstScalar(cellData),
│ │ │ │ +
260 getFirstVector(cellData));
│ │ │ │ +
261 for(WIterator it=cellData.begin(); it!=cellData.end(); ++it)
│ │ │ │ +
262 (*it)->addArray(writer);
│ │ │ │ +
263 writer.endCellData();
│ │ │ │ +
264
│ │ │ │ +
265 // PPoints
│ │ │ │ +
266 writer.beginPoints();
│ │ │ │ +
267 coords.addArray(writer);
│ │ │ │ +
268 writer.endPoints();
│ │ │ │ +
269
│ │ │ │ +
270 // Pieces
│ │ │ │ +
271 for( int i = 0; i < factory.comm().size(); ++i )
│ │ │ │ +
272 writer.addPiece(getParallelPieceName(piecename, piecepath, i));
│ │ │ │ +
273
│ │ │ │ +
274 writer.endMain();
│ │ │ │ +
275 }
│ │ │ │ +
│ │ │ │ +
276
│ │ │ │ +
278 //
│ │ │ │ +
279 // Filename generators
│ │ │ │ +
280 //
│ │ │ │ +
281
│ │ │ │ +
283
│ │ │ │ +
│ │ │ │ +
293 std::string getParallelPieceName(const std::string& name,
│ │ │ │ +
294 const std::string& path, int rank) const
│ │ │ │ +
295 {
│ │ │ │ +
296 std::ostringstream s;
│ │ │ │ +
297 if(path.size() > 0) {
│ │ │ │ +
298 s << path;
│ │ │ │ +
299 if(path[path.size()-1] != '/')
│ │ │ │ +
300 s << '/';
│ │ │ │ +
301 }
│ │ │ │ +
302 s << 's' << std::setw(4) << std::setfill('0') << factory.comm().size()
│ │ │ │ +
303 << ':';
│ │ │ │ +
304 s << 'p' << std::setw(4) << std::setfill('0') << rank << ':';
│ │ │ │ +
305 s << name;
│ │ │ │ +
306 switch(fileType) {
│ │ │ │ +
307 case polyData : s << ".vtp"; break;
│ │ │ │ +
308 case unstructuredGrid : s << ".vtu"; break;
│ │ │ │ +
309 }
│ │ │ │ +
310 return s.str();
│ │ │ │ +
311 }
│ │ │ │ +
│ │ │ │ +
312
│ │ │ │ +
314
│ │ │ │ +
│ │ │ │ +
323 std::string getParallelHeaderName(const std::string& name,
│ │ │ │ +
324 const std::string& path) const
│ │ │ │ +
325 {
│ │ │ │ +
326 std::ostringstream s;
│ │ │ │ +
327 if(path.size() > 0) {
│ │ │ │ +
328 s << path;
│ │ │ │ +
329 if(path[path.size()-1] != '/')
│ │ │ │ +
330 s << '/';
│ │ │ │ +
331 }
│ │ │ │ +
332 s << 's' << std::setw(4) << std::setfill('0') << factory.comm().size()
│ │ │ │ +
333 << ':';
│ │ │ │ +
334 s << name;
│ │ │ │ +
335 switch(fileType) {
│ │ │ │ +
336 case polyData : s << ".pvtp"; break;
│ │ │ │ +
337 case unstructuredGrid : s << ".pvtu"; break;
│ │ │ │ +
338 }
│ │ │ │ +
339 return s.str();
│ │ │ │ +
340 }
│ │ │ │ +
│ │ │ │ +
341
│ │ │ │ +
343
│ │ │ │ +
│ │ │ │ +
355 std::string getSerialPieceName(const std::string& name,
│ │ │ │ +
356 const std::string& path) const
│ │ │ │ +
357 {
│ │ │ │ +
358 switch(fileType) {
│ │ │ │ +
359 case polyData : return concatPaths(path, name+".vtp");
│ │ │ │ +
360 case unstructuredGrid : return concatPaths(path, name+".vtu");
│ │ │ │ +
361 }
│ │ │ │ +
362 return concatPaths(path, name); // unknown fileType
│ │ │ │ +
363 }
│ │ │ │ +
│ │ │ │ +
364
│ │ │ │ +
366 //
│ │ │ │ +
367 // User interface functions for writing
│ │ │ │ +
368 //
│ │ │ │ +
369
│ │ │ │ +
371
│ │ │ │ +
│ │ │ │ +
393 std::string pwrite(const std::string& name, const std::string& path,
│ │ │ │ +
394 const std::string& extendpath, OutputType outputType)
│ │ │ │ +
395 {
│ │ │ │ +
396 MPIGuard guard(factory.comm());
│ │ │ │ +
397
│ │ │ │ +
398 // do some magic because paraview can only cope with relative paths to
│ │ │ │ +
399 // piece files
│ │ │ │ +
400 std::ofstream file;
│ │ │ │ +
401 file.exceptions(std::ios_base::badbit | std::ios_base::failbit |
│ │ │ │ +
402 std::ios_base::eofbit);
│ │ │ │ +
403 std::string piecepath = concatPaths(path, extendpath);
│ │ │ │ +
404 std::string relpiecepath = relativePath(path, piecepath);
│ │ │ │ +
405
│ │ │ │ +
406 // write this processes .vtu/.vtp piece file
│ │ │ │ +
407 std::string fullname = getParallelPieceName(name, piecepath,
│ │ │ │ +
408 factory.comm().rank());
│ │ │ │ +
409 writePiece(fullname, outputType);
│ │ │ │ +
410
│ │ │ │ +
411 // if we are rank 0, write .pvtu/.pvtp parallel header
│ │ │ │ +
412 fullname = getParallelHeaderName(name, path);
│ │ │ │ +
413 if(factory.comm().rank() == 0)
│ │ │ │ +
414 writeCollection(fullname, name, relpiecepath);
│ │ │ │ +
415
│ │ │ │ +
416 guard.finalize();
│ │ │ │ +
417
│ │ │ │ +
418 return fullname;
│ │ │ │ +
419 }
│ │ │ │ +
│ │ │ │ +
420
│ │ │ │ +
│ │ │ │ +
434 std::string write(const std::string &name, OutputType outputType)
│ │ │ │ +
435 {
│ │ │ │ +
436 // in the parallel case, just use pwrite, it has all the necessary
│ │ │ │ +
437 // stuff, so we don't need to reimplement it here.
│ │ │ │ +
438 if(factory.comm().size() > 1)
│ │ │ │ +
439 return pwrite(name, "", "", outputType);
│ │ │ │ +
440
│ │ │ │ +
441 // generate filename for process data
│ │ │ │ +
442 std::string pieceName = getSerialPieceName(name, "");
│ │ │ │ +
443
│ │ │ │ +
444 writePiece(pieceName, outputType);
│ │ │ │ +
445
│ │ │ │ +
446 return pieceName;
│ │ │ │ +
447 }
│ │ │ │ +
│ │ │ │ +
448
│ │ │ │ +
449 };
│ │ │ │ +
│ │ │ │ +
450
│ │ │ │ +
451 } // namespace VTK
│ │ │ │ +
│ │ │ │ +
452
│ │ │ │ +
454
│ │ │ │ +
455} // namespace Dune
│ │ │ │ +
456
│ │ │ │ +
457#endif // DUNE_GRID_IO_FILE_VTK_BASICWRITER_HH
│ │ │ │ +
Common stuff for the VTKWriter.
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
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:34
│ │ │ │ -
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
│ │ │ │ +
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:152
│ │ │ │ +
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:355
│ │ │ │ +
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:238
│ │ │ │ +
void writeGrid(VTUWriter &vtuWriter, unsigned ncells, unsigned npoints, unsigned ncorners)
Definition basicwriter.hh:174
│ │ │ │ +
void writeAll(VTUWriter &vtuWriter, unsigned ncells, unsigned npoints, unsigned ncorners)
Definition basicwriter.hh:188
│ │ │ │ +
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:393
│ │ │ │ +
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:323
│ │ │ │ +
void writePointData(VTUWriter &vtuWriter, unsigned npoints) const
Definition basicwriter.hh:163
│ │ │ │ +
static std::string getFirstVector(const WriterList &data)
Definition basicwriter.hh:145
│ │ │ │ +
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:196
│ │ │ │ +
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:293
│ │ │ │ +
std::string write(const std::string &name, OutputType outputType)
write output (interface might change later)
Definition basicwriter.hh:434
│ │ │ │ +
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 {} │ │ │ │ │ @@ -2,132 +2,605 @@ │ │ │ │ │ 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 │ │ │ │ │ +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 © 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> │ │ │ │ │ +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 │ │ │ │ │ -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; │ │ │ │ │ +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> │ │ │ │ │ +26 │ │ │ │ │ +27namespace _D_u_n_e │ │ │ │ │ +28{ │ │ │ │ │ +31 │ │ │ │ │ +_3_2 namespace VTK { │ │ │ │ │ 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 ); │ │ │ │ │ +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 // 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 } │ │ │ │ │ +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 │ │ │ │ │ +49 typedef typename Cell::Geometry::ctype ctype; │ │ │ │ │ +50 static const unsigned celldim = Cell::mydimension; │ │ │ │ │ +51 typedef ReferenceElements Refelems; │ │ │ │ │ 52 │ │ │ │ │ -_5_3 int _n_o_f_b_o_u_n_d() │ │ │ │ │ -54 { │ │ │ │ │ -55 return _n_o_f_l_i_n_e_s(); │ │ │ │ │ -56 } │ │ │ │ │ +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 private: │ │ │ │ │ -59 bool next(); │ │ │ │ │ +58 WriterList cellData; │ │ │ │ │ +59 WriterList pointData; │ │ │ │ │ 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 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 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 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 │ │ │ │ │ +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 │ │ │ │ │ +_1_3_8 static std::string _g_e_t_F_i_r_s_t_S_c_a_l_a_r(const WriterList& data) { │ │ │ │ │ +139 for(auto&& d : data) │ │ │ │ │ +140 if (d->ncomps() == 1) │ │ │ │ │ +141 return d->name(); │ │ │ │ │ +142 return ""; │ │ │ │ │ +143 } │ │ │ │ │ +144 │ │ │ │ │ +_1_4_5 static std::string _g_e_t_F_i_r_s_t_V_e_c_t_o_r(const WriterList& data) { │ │ │ │ │ +146 for(auto&& d : data) │ │ │ │ │ +147 if (d->ncomps() == 3) │ │ │ │ │ +148 return d->name(); │ │ │ │ │ +149 return ""; │ │ │ │ │ +150 } │ │ │ │ │ +151 │ │ │ │ │ +_1_5_2 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 { │ │ │ │ │ +153 if(cellData.empty()) return; │ │ │ │ │ +154 │ │ │ │ │ +155 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), │ │ │ │ │ +156 _g_e_t_F_i_r_s_t_V_e_c_t_o_r(cellData)); │ │ │ │ │ +157 │ │ │ │ │ +158 for (auto&& cD : cellData) │ │ │ │ │ +159 _w_r_i_t_e_C_e_l_l_F_u_n_c_t_i_o_n(vtuWriter, *cD, ncells); │ │ │ │ │ +160 vtuWriter._e_n_d_C_e_l_l_D_a_t_a(); │ │ │ │ │ +161 } │ │ │ │ │ +162 │ │ │ │ │ +_1_6_3 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 { │ │ │ │ │ +164 if(pointData.empty()) return; │ │ │ │ │ +165 │ │ │ │ │ +166 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), │ │ │ │ │ +167 _g_e_t_F_i_r_s_t_V_e_c_t_o_r(pointData)); │ │ │ │ │ +168 │ │ │ │ │ +169 for (auto&& pD : pointData) │ │ │ │ │ +170 _w_r_i_t_e_P_o_i_n_t_F_u_n_c_t_i_o_n(vtuWriter, *pD, npoints); │ │ │ │ │ +171 vtuWriter._e_n_d_P_o_i_n_t_D_a_t_a(); │ │ │ │ │ +172 } │ │ │ │ │ +173 │ │ │ │ │ +_1_7_4 void _w_r_i_t_e_G_r_i_d(_V_T_U_W_r_i_t_e_r& vtuWriter, unsigned ncells, unsigned npoints, │ │ │ │ │ +175 unsigned ncorners) { │ │ │ │ │ +176 vtuWriter._b_e_g_i_n_P_o_i_n_t_s(); │ │ │ │ │ +177 _w_r_i_t_e_P_o_i_n_t_F_u_n_c_t_i_o_n(vtuWriter, coords, npoints); │ │ │ │ │ +178 vtuWriter._e_n_d_P_o_i_n_t_s(); │ │ │ │ │ +179 │ │ │ │ │ +180 vtuWriter._b_e_g_i_n_C_e_l_l_s(); │ │ │ │ │ +181 _w_r_i_t_e_C_o_r_n_e_r_F_u_n_c_t_i_o_n(vtuWriter, connectivity, ncorners); │ │ │ │ │ +182 _w_r_i_t_e_C_e_l_l_F_u_n_c_t_i_o_n(vtuWriter, offsets, ncells); │ │ │ │ │ +183 if(fileType != _p_o_l_y_D_a_t_a) │ │ │ │ │ +184 _w_r_i_t_e_C_e_l_l_F_u_n_c_t_i_o_n(vtuWriter, types, ncells); │ │ │ │ │ +185 vtuWriter._e_n_d_C_e_l_l_s(); │ │ │ │ │ +186 } │ │ │ │ │ +187 │ │ │ │ │ +_1_8_8 void _w_r_i_t_e_A_l_l(_V_T_U_W_r_i_t_e_r& vtuWriter, unsigned ncells, unsigned npoints, │ │ │ │ │ +189 unsigned ncorners) { │ │ │ │ │ +190 _w_r_i_t_e_C_e_l_l_D_a_t_a(vtuWriter, ncells); │ │ │ │ │ +191 _w_r_i_t_e_P_o_i_n_t_D_a_t_a(vtuWriter, npoints); │ │ │ │ │ +192 _w_r_i_t_e_G_r_i_d(vtuWriter, ncells, npoints, ncorners); │ │ │ │ │ +193 } │ │ │ │ │ +194 │ │ │ │ │ +195 public: │ │ │ │ │ +_1_9_6 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) { │ │ │ │ │ +197 std::ofstream stream; │ │ │ │ │ +198 stream.exceptions(std::ios_base::badbit | std::ios_base::failbit | │ │ │ │ │ +199 std::ios_base::eofbit); │ │ │ │ │ +200 stream.open(filename.c_str(), std::ios::binary); │ │ │ │ │ +201 │ │ │ │ │ +202 _V_T_U_W_r_i_t_e_r vtuWriter(stream, outputType, fileType); │ │ │ │ │ +203 │ │ │ │ │ +204 unsigned ncells = std::distance(factory.beginCells(), │ │ │ │ │ +205 factory.endCells()); │ │ │ │ │ +206 unsigned npoints = std::distance(factory.beginPoints(), │ │ │ │ │ +207 factory.endPoints()); │ │ │ │ │ +208 unsigned ncorners = std::distance(factory.beginCorners(), │ │ │ │ │ +209 factory.endCorners()); │ │ │ │ │ +210 │ │ │ │ │ +211 vtuWriter._b_e_g_i_n_M_a_i_n(ncells, npoints); │ │ │ │ │ +212 _w_r_i_t_e_A_l_l(vtuWriter, ncells, npoints, ncorners); │ │ │ │ │ +213 vtuWriter._e_n_d_M_a_i_n(); │ │ │ │ │ +214 │ │ │ │ │ +215 if(vtuWriter._b_e_g_i_n_A_p_p_e_n_d_e_d()) │ │ │ │ │ +216 _w_r_i_t_e_A_l_l(vtuWriter, ncells, npoints, ncorners); │ │ │ │ │ +217 vtuWriter._e_n_d_A_p_p_e_n_d_e_d(); │ │ │ │ │ +218 │ │ │ │ │ +219 } │ │ │ │ │ +220 │ │ │ │ │ +222 │ │ │ │ │ +_2_3_8 void _w_r_i_t_e_C_o_l_l_e_c_t_i_o_n(const std::string name, │ │ │ │ │ +239 const std::string& piecename, │ │ │ │ │ +240 const std::string& piecepath) │ │ │ │ │ +241 { │ │ │ │ │ +242 std::ofstream stream; │ │ │ │ │ +243 stream.exceptions(std::ios_base::badbit | std::ios_base::failbit | │ │ │ │ │ +244 std::ios_base::eofbit); │ │ │ │ │ +245 stream.open(name.c_str(), std::ios::binary); │ │ │ │ │ +246 │ │ │ │ │ +247 _P_V_T_U_W_r_i_t_e_r writer(stream, fileType); │ │ │ │ │ +248 │ │ │ │ │ +249 writer._b_e_g_i_n_M_a_i_n(); │ │ │ │ │ +250 │ │ │ │ │ +251 // PPointData │ │ │ │ │ +252 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), │ │ │ │ │ +253 _g_e_t_F_i_r_s_t_V_e_c_t_o_r(pointData)); │ │ │ │ │ +254 for(WIterator it=pointData.begin(); it!=pointData.end(); ++it) │ │ │ │ │ +255 (*it)->addArray(writer); │ │ │ │ │ +256 writer._e_n_d_P_o_i_n_t_D_a_t_a(); │ │ │ │ │ +257 │ │ │ │ │ +258 // PCellData │ │ │ │ │ +259 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), │ │ │ │ │ +260 _g_e_t_F_i_r_s_t_V_e_c_t_o_r(cellData)); │ │ │ │ │ +261 for(WIterator it=cellData.begin(); it!=cellData.end(); ++it) │ │ │ │ │ +262 (*it)->addArray(writer); │ │ │ │ │ +263 writer._e_n_d_C_e_l_l_D_a_t_a(); │ │ │ │ │ +264 │ │ │ │ │ +265 // PPoints │ │ │ │ │ +266 writer._b_e_g_i_n_P_o_i_n_t_s(); │ │ │ │ │ +267 coords._a_d_d_A_r_r_a_y(writer); │ │ │ │ │ +268 writer._e_n_d_P_o_i_n_t_s(); │ │ │ │ │ +269 │ │ │ │ │ +270 // Pieces │ │ │ │ │ +271 for( int i = 0; i < factory.comm().size(); ++i ) │ │ │ │ │ +272 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)); │ │ │ │ │ +273 │ │ │ │ │ +274 writer._e_n_d_M_a_i_n(); │ │ │ │ │ +275 } │ │ │ │ │ +276 │ │ │ │ │ +278 // │ │ │ │ │ +279 // Filename generators │ │ │ │ │ +280 // │ │ │ │ │ +281 │ │ │ │ │ +283 │ │ │ │ │ +_2_9_3 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, │ │ │ │ │ +294 const std::string& path, int rank) const │ │ │ │ │ +295 { │ │ │ │ │ +296 std::ostringstream s; │ │ │ │ │ +297 if(path.size() > 0) { │ │ │ │ │ +298 s << path; │ │ │ │ │ +299 if(path[path.size()-1] != '/') │ │ │ │ │ +300 s << '/'; │ │ │ │ │ +301 } │ │ │ │ │ +302 s << 's' << std::setw(4) << std::setfill('0') << factory.comm().size() │ │ │ │ │ +303 << ':'; │ │ │ │ │ +304 s << 'p' << std::setw(4) << std::setfill('0') << rank << ':'; │ │ │ │ │ +305 s << name; │ │ │ │ │ +306 switch(fileType) { │ │ │ │ │ +307 case _p_o_l_y_D_a_t_a : s << ".vtp"; break; │ │ │ │ │ +308 case _u_n_s_t_r_u_c_t_u_r_e_d_G_r_i_d : s << ".vtu"; break; │ │ │ │ │ +309 } │ │ │ │ │ +310 return s.str(); │ │ │ │ │ +311 } │ │ │ │ │ +312 │ │ │ │ │ +314 │ │ │ │ │ +_3_2_3 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, │ │ │ │ │ +324 const std::string& path) const │ │ │ │ │ +325 { │ │ │ │ │ +326 std::ostringstream s; │ │ │ │ │ +327 if(path.size() > 0) { │ │ │ │ │ +328 s << path; │ │ │ │ │ +329 if(path[path.size()-1] != '/') │ │ │ │ │ +330 s << '/'; │ │ │ │ │ +331 } │ │ │ │ │ +332 s << 's' << std::setw(4) << std::setfill('0') << factory.comm().size() │ │ │ │ │ +333 << ':'; │ │ │ │ │ +334 s << name; │ │ │ │ │ +335 switch(fileType) { │ │ │ │ │ +336 case _p_o_l_y_D_a_t_a : s << ".pvtp"; break; │ │ │ │ │ +337 case _u_n_s_t_r_u_c_t_u_r_e_d_G_r_i_d : s << ".pvtu"; break; │ │ │ │ │ +338 } │ │ │ │ │ +339 return s.str(); │ │ │ │ │ +340 } │ │ │ │ │ +341 │ │ │ │ │ +343 │ │ │ │ │ +_3_5_5 std::string _g_e_t_S_e_r_i_a_l_P_i_e_c_e_N_a_m_e(const std::string& name, │ │ │ │ │ +356 const std::string& path) const │ │ │ │ │ +357 { │ │ │ │ │ +358 switch(fileType) { │ │ │ │ │ +359 case _p_o_l_y_D_a_t_a : return concatPaths(path, name+".vtp"); │ │ │ │ │ +360 case _u_n_s_t_r_u_c_t_u_r_e_d_G_r_i_d : return concatPaths(path, name+".vtu"); │ │ │ │ │ +361 } │ │ │ │ │ +362 return concatPaths(path, name); // unknown fileType │ │ │ │ │ +363 } │ │ │ │ │ +364 │ │ │ │ │ +366 // │ │ │ │ │ +367 // User interface functions for writing │ │ │ │ │ +368 // │ │ │ │ │ +369 │ │ │ │ │ +371 │ │ │ │ │ +_3_9_3 std::string _p_w_r_i_t_e(const std::string& name, const std::string& path, │ │ │ │ │ +394 const std::string& extendpath, _O_u_t_p_u_t_T_y_p_e outputType) │ │ │ │ │ +395 { │ │ │ │ │ +396 MPIGuard guard(factory.comm()); │ │ │ │ │ +397 │ │ │ │ │ +398 // do some magic because paraview can only cope with relative paths to │ │ │ │ │ +399 // piece files │ │ │ │ │ +400 std::ofstream file; │ │ │ │ │ +401 file.exceptions(std::ios_base::badbit | std::ios_base::failbit | │ │ │ │ │ +402 std::ios_base::eofbit); │ │ │ │ │ +403 std::string piecepath = concatPaths(path, extendpath); │ │ │ │ │ +404 std::string relpiecepath = relativePath(path, piecepath); │ │ │ │ │ +405 │ │ │ │ │ +406 // write this processes .vtu/.vtp piece file │ │ │ │ │ +407 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, │ │ │ │ │ +408 factory.comm().rank()); │ │ │ │ │ +409 _w_r_i_t_e_P_i_e_c_e(fullname, outputType); │ │ │ │ │ +410 │ │ │ │ │ +411 // if we are rank 0, write .pvtu/.pvtp parallel header │ │ │ │ │ +412 fullname = _g_e_t_P_a_r_a_l_l_e_l_H_e_a_d_e_r_N_a_m_e(name, path); │ │ │ │ │ +413 if(factory.comm().rank() == 0) │ │ │ │ │ +414 _w_r_i_t_e_C_o_l_l_e_c_t_i_o_n(fullname, name, relpiecepath); │ │ │ │ │ +415 │ │ │ │ │ +416 guard.finalize(); │ │ │ │ │ +417 │ │ │ │ │ +418 return fullname; │ │ │ │ │ +419 } │ │ │ │ │ +420 │ │ │ │ │ +_4_3_4 std::string _w_r_i_t_e(const std::string &name, _O_u_t_p_u_t_T_y_p_e outputType) │ │ │ │ │ +435 { │ │ │ │ │ +436 // in the parallel case, just use pwrite, it has all the necessary │ │ │ │ │ +437 // stuff, so we don't need to reimplement it here. │ │ │ │ │ +438 if(factory.comm().size() > 1) │ │ │ │ │ +439 return _p_w_r_i_t_e(name, "", "", outputType); │ │ │ │ │ +440 │ │ │ │ │ +441 // generate filename for process data │ │ │ │ │ +442 std::string pieceName = _g_e_t_S_e_r_i_a_l_P_i_e_c_e_N_a_m_e(name, ""); │ │ │ │ │ +443 │ │ │ │ │ +444 _w_r_i_t_e_P_i_e_c_e(pieceName, outputType); │ │ │ │ │ +445 │ │ │ │ │ +446 return pieceName; │ │ │ │ │ +447 } │ │ │ │ │ +448 │ │ │ │ │ +449 }; │ │ │ │ │ +450 │ │ │ │ │ +451 } // namespace VTK │ │ │ │ │ +452 │ │ │ │ │ +454 │ │ │ │ │ +455} // namespace Dune │ │ │ │ │ +456 │ │ │ │ │ +457#endif // DUNE_GRID_IO_FILE_VTK_BASICWRITER_HH │ │ │ │ │ +_c_o_m_m_o_n_._h_h │ │ │ │ │ +Common stuff for the VTKWriter. │ │ │ │ │ +_v_t_u_w_r_i_t_e_r_._h_h │ │ │ │ │ +_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 │ │ │ │ │ _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:34 │ │ │ │ │ -_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_:_:_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:152 │ │ │ │ │ +_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:355 │ │ │ │ │ +_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:238 │ │ │ │ │ +_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:174 │ │ │ │ │ +_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:188 │ │ │ │ │ +_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:393 │ │ │ │ │ +_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:323 │ │ │ │ │ +_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:163 │ │ │ │ │ +_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:145 │ │ │ │ │ +_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:196 │ │ │ │ │ +_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:293 │ │ │ │ │ +_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:434 │ │ │ │ │ +_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/a00773.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: polyhedron.hh File Reference │ │ │ │ +dune-grid: corner.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,40 +65,40 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
polyhedron.hh File Reference
│ │ │ │ +
corner.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <algorithm>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/polygon.hh>
│ │ │ │ +
#include <dune/grid/io/file/vtk/common.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

struct  Dune::dgf::PolyhedronBlock
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 │ │ │ │ │ -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> │ │ │ │ │ +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 │ │ │ │ │ -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_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/a00773_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: polyhedron.hh Source File │ │ │ │ +dune-grid: corner.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,109 +70,87 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
polyhedron.hh
│ │ │ │ +
corner.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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 {
│ │ │ │ +
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 {
│ │ │ │
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 }
│ │ │ │ +
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() { }
│ │ │ │
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
│ │ │ │ +
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#endif // #ifndef DUNE_POLYHEDRON_HH
│ │ │ │ - │ │ │ │ +
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
│ │ │ │ -
void reset()
Definition basic.hh:51
│ │ │ │ -
bool getnextline()
Definition basic.cc:93
│ │ │ │ -
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
│ │ │ │ +
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,115 +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 │ │ │ │ │ -polyhedron.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 © 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 { │ │ │ │ │ +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 { │ │ │ │ │ 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 } │ │ │ │ │ +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() { } │ │ │ │ │ 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; itype(), 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#endif // #ifndef DUNE_POLYHEDRON_HH │ │ │ │ │ -_p_o_l_y_g_o_n_._h_h │ │ │ │ │ +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_:_:_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:93 │ │ │ │ │ -_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_:_:_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/a00776.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: basic.cc File Reference │ │ │ │ +dune-grid: dataarraywriter.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,33 +65,78 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ +Classes | │ │ │ │ Namespaces
│ │ │ │ -
basic.cc File Reference
│ │ │ │ +
dataarraywriter.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#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::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,20 +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 │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -basic.cc File Reference │ │ │ │ │ -#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 │ │ │ │ │ +dataarraywriter.hh File Reference │ │ │ │ │ +Data array writers for the VTKWriter. _M_o_r_e_._._. │ │ │ │ │ +#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> │ │ │ │ │ +_G_o_ _t_o_ _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_._._. │ │ │ │ │ +  │ │ │ │ │ +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/a00779.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: interval.cc File Reference │ │ │ │ +dune-grid: pointiterator.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,31 +65,45 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ +Classes | │ │ │ │ Namespaces
│ │ │ │ -
interval.cc File Reference
│ │ │ │ +
pointiterator.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ +
#include <iterator>
│ │ │ │ +#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>
│ │ │ │ +
│ │ │ │ +

Go to the source code of this file.

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

│ │ │ │ +Classes

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,20 +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 <_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 │ │ │ │ │ +pointiterator.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> │ │ │ │ │ +#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_:_:_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/a00782.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: projection.cc File Reference │ │ │ │ +dune-grid: vtuwriter.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,75 +65,46 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces | │ │ │ │ -Functions
│ │ │ │ -
projection.cc File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
vtuwriter.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/common/math.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/projection.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

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::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
 
namespace  Dune::dgf::Expr
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ -Functions

std::ostream & Dune::dgf::operator<< (std::ostream &out, const ProjectionBlock::Token &token)
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,58 +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 │ │ │ │ │ -_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 <_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> │ │ │ │ │ + * _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 │ │ │ │ │ +#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 │ │ │ │ │ -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_:_:_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_:_:_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) │ │ │ │ │ +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.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: simplexgeneration.hh File Reference │ │ │ │ +dune-grid: boundarywriter.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,40 +65,43 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
simplexgeneration.hh File Reference
│ │ │ │ +
boundarywriter.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <iostream>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/basic.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::dgf::SimplexGenerationBlock
class  Dune::VTK::NonConformingBoundaryWriter< 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 │ │ │ │ │ -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> │ │ │ │ │ +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_:_:_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_:_:_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_:_:_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: simplexgeneration.hh Source File │ │ │ │ +dune-grid: boundarywriter.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,156 +70,116 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
simplexgeneration.hh
│ │ │ │ +
boundarywriter.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │ - │ │ │ │ +
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
│ │ │ │ -
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 }
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
15
│ │ │ │ +
16namespace Dune {
│ │ │ │ +
19
│ │ │ │ +
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 }
│ │ │ │
│ │ │ │ -
45
│ │ │ │ +
44
│ │ │ │ +
45 template<typename Func>
│ │ │ │
│ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ +
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 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
│ │ │ │ - │ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ +
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,151 +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 │ │ │ │ │ - * _b_l_o_c_k_s │ │ │ │ │ -simplexgeneration.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 © 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> │ │ │ │ │ +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 │ │ │ │ │ -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 } │ │ │ │ │ +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 { │ │ │ │ │ +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 │ │ │ │ │ -_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 │ │ │ │ │ +71#endif // DUNE_GRID_IO_FILE_VTK_BOUNDARYWRITER_HH │ │ │ │ │ +_b_a_s_i_c_w_r_i_t_e_r_._h_h │ │ │ │ │ +_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. │ │ │ │ │ _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_:_:_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/a00788.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: boundarydom.hh File Reference │ │ │ │ +dune-grid: vtksequencewriter.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,48 +65,42 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
boundarydom.hh File Reference
│ │ │ │ +
vtksequencewriter.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 <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

struct  Dune::dgf::DomainData
 
struct  Dune::dgf::Domain
 
class  Dune::dgf::BoundaryDomBlock
class  Dune::VTKSequenceWriter< GridView >
 Writer for the output of grid functions in the vtk format. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,32 +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 │ │ │ │ │ + * _v_t_k │ │ │ │ │ _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> │ │ │ │ │ +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 │ │ │ │ │ -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_:_:_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 output 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/a00788_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: boundarydom.hh Source File │ │ │ │ +dune-grid: vtksequencewriter.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,419 +70,102 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
boundarydom.hh
│ │ │ │ +
vtksequencewriter.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │ -
7
│ │ │ │ -
8#include <iostream>
│ │ │ │ -
9#include <string>
│ │ │ │ -
10#include <vector>
│ │ │ │ -
11
│ │ │ │ - │ │ │ │ - │ │ │ │ -
14
│ │ │ │ +
5
│ │ │ │ +
6#ifndef DUNE_VTKSEQUENCE_HH
│ │ │ │ +
7#define DUNE_VTKSEQUENCE_HH
│ │ │ │ +
8
│ │ │ │ +
9#include <memory>
│ │ │ │ +
10
│ │ │ │ + │ │ │ │ +
12
│ │ │ │ + │ │ │ │ + │ │ │ │
15
│ │ │ │ -
16namespace Dune
│ │ │ │ -
17{
│ │ │ │ -
18
│ │ │ │ -
19 namespace dgf
│ │ │ │ -
20 {
│ │ │ │ -
21
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
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 // return id
│ │ │ │ +
16namespace Dune {
│ │ │ │ +
17
│ │ │ │ +
26 template< class GridView >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
28 public VTKSequenceWriterBase<GridView>
│ │ │ │ +
29 {
│ │ │ │ +
30 public:
│ │ │ │
│ │ │ │ -
42 int id () const
│ │ │ │ -
43 {
│ │ │ │ -
44 return id_;
│ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ -
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 }
│ │ │ │ + │ │ │ │ +
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
│ │ │ │ -
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 whether 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
│ │ │ │ - │ │ │ │ - │ │ │ │ +
│ │ │ │ +
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.
│ │ │ │
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:137
│ │ │ │ -
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
│ │ │ │ +
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 output 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 output of grid functions in the vtk format.
Definition vtkwriter.hh:95
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,437 +2,121 @@ │ │ │ │ │ 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 │ │ │ │ │ -boundarydom.hh │ │ │ │ │ + * _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 © 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 │ │ │ │ │ -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 │ │ │ │ │ +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{ │ │ │ │ │ -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 { } │ │ │ │ │ -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 │ │ │ │ │ -43 { │ │ │ │ │ -44 return id_; │ │ │ │ │ -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 } │ │ │ │ │ -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 } │ │ │ │ │ +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 │ │ │ │ │ -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 whether 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 │ │ │ │ │ -_b_a_s_i_c_._h_h │ │ │ │ │ -_p_a_r_s_e_r_._h_h │ │ │ │ │ +_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. │ │ │ │ │ _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:137 │ │ │ │ │ -_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_:_:_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 output 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 output 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/a00791.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: vertex.cc File Reference │ │ │ │ +dune-grid: streams.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,32 +65,43 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ +Classes | │ │ │ │ Namespaces
│ │ │ │ -
vertex.cc File Reference
│ │ │ │ +
streams.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ +
#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.
 
namespace  Dune::dgf
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,20 +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 │ │ │ │ │ - * _b_l_o_c_k_s │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -vertex.cc File Reference │ │ │ │ │ -#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> │ │ │ │ │ + * _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. │ │ │ │ │   │ │ │ │ │ -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/a00794.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: periodicfacetrans.hh File Reference │ │ │ │ +dune-grid: vtkwriter.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,53 +65,95 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces | │ │ │ │ -Functions
│ │ │ │ -
periodicfacetrans.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 <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::PeriodicFaceTransformationBlock
class  Dune::VTKWriter< GridView >
 Writer for the output 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...
 
class  Dune::dgf::PeriodicFaceTransformationBlock::Matrix< T >
struct  Dune::VTKWriter< GridView >::VTKLocalFunction::VTKFunctionWrapper
 Type erasure implementation for legacy VTKFunctions. More...
 
struct  Dune::dgf::PeriodicFaceTransformationBlock::AffineTransformation
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 PeriodicFaceTransformationBlock::AffineTransformation &trafo)
 
│ │ │ │ -
│ │ │ │ +

Detailed Description

│ │ │ │ +

Provides file i/o for the visualization toolkit.

│ │ │ │ +
Author
Peter Bastian, Christian Engwer
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,34 +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 │ │ │ │ │ -periodicfacetrans.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 <_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_:_:_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_:_:_V_T_K_W_r_i_t_e_r_<_ _G_r_i_d_V_i_e_w_ _> │ │ │ │ │ +  Writer for the output of grid functions in the vtk format. _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_ _> │ │ │ │ │ + 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_:_:_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 │ │ │ │ │ +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 │ │ │ │ │ - _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 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/a00794_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: periodicfacetrans.hh Source File │ │ │ │ +dune-grid: vtkwriter.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,183 +70,1661 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
periodicfacetrans.hh
│ │ │ │ +
vtkwriter.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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 {
│ │ │ │ -
29 int rows_;
│ │ │ │ -
30 int cols_;
│ │ │ │ -
31 std::vector< T > fields_;
│ │ │ │ -
32
│ │ │ │ -
33 public:
│ │ │ │ -
│ │ │ │ -
34 Matrix ( int rows, int cols )
│ │ │ │ -
35 : rows_( rows ),
│ │ │ │ -
36 cols_( cols ),
│ │ │ │ -
37 fields_( rows * cols )
│ │ │ │ -
38 {}
│ │ │ │ -
│ │ │ │ -
39
│ │ │ │ -
│ │ │ │ -
40 const T &operator() ( int i, int j ) const
│ │ │ │ -
41 {
│ │ │ │ -
42 return fields_[ i * cols_ + j ];
│ │ │ │ -
43 }
│ │ │ │ -
│ │ │ │ -
44
│ │ │ │ -
│ │ │ │ -
45 T &operator() ( int i, int j )
│ │ │ │ -
46 {
│ │ │ │ -
47 return fields_[ i * cols_ + j ];
│ │ │ │ -
48 }
│ │ │ │ -
│ │ │ │ -
49
│ │ │ │ -
│ │ │ │ -
50 int rows () const
│ │ │ │ -
51 {
│ │ │ │ -
52 return rows_;
│ │ │ │ -
53 }
│ │ │ │ -
│ │ │ │ -
54
│ │ │ │ -
│ │ │ │ -
55 int cols () const
│ │ │ │ -
56 {
│ │ │ │ -
57 return cols_;
│ │ │ │ -
58 }
│ │ │ │ -
│ │ │ │ -
59 };
│ │ │ │ -
│ │ │ │ +
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
│ │ │ │ +
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
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
62 {
│ │ │ │ - │ │ │ │ -
64 std::vector< double > shift;
│ │ │ │ -
65
│ │ │ │ -
│ │ │ │ -
66 explicit AffineTransformation ( int dimworld )
│ │ │ │ -
67 : matrix( dimworld, dimworld ),
│ │ │ │ -
68 shift( dimworld )
│ │ │ │ -
69 {}
│ │ │ │ -
│ │ │ │ -
70 };
│ │ │ │ -
│ │ │ │ -
71
│ │ │ │ -
72 private:
│ │ │ │ -
73 std::vector< AffineTransformation > transformations_;
│ │ │ │ -
74
│ │ │ │ -
75 // copy not implemented
│ │ │ │ - │ │ │ │ +
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 public:
│ │ │ │ -
79 // initialize block and get dimension of world
│ │ │ │ -
80 PeriodicFaceTransformationBlock ( std::istream &in, int dimworld );
│ │ │ │ -
81
│ │ │ │ -
│ │ │ │ -
82 const AffineTransformation &transformation ( int i ) const
│ │ │ │ -
83 {
│ │ │ │ -
84 assert( i < numTransformations() );
│ │ │ │ -
85 return transformations_[ i ];
│ │ │ │ -
86 }
│ │ │ │ -
│ │ │ │ -
87
│ │ │ │ -
│ │ │ │ -
88 int numTransformations () const
│ │ │ │ -
89 {
│ │ │ │ -
90 return transformations_.size();
│ │ │ │ -
91 }
│ │ │ │ -
│ │ │ │ -
92
│ │ │ │ -
93 private:
│ │ │ │ -
94 void match ( char what );
│ │ │ │ -
95 };
│ │ │ │ -
│ │ │ │ +
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
│ │ │ │ -
98
│ │ │ │ -
99 // PeriodicFaceTransformationBlock::AffineTransformation
│ │ │ │ -
100 // -----------------------------------------------------
│ │ │ │ -
101
│ │ │ │ +
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 inline std::ostream &
│ │ │ │ - │ │ │ │ -
105 {
│ │ │ │ -
106 for( int i = 0; i < trafo.matrix.rows(); ++i )
│ │ │ │ -
107 {
│ │ │ │ -
108 out << (i > 0 ? ", " : "");
│ │ │ │ -
109 for( int j = 0; j < trafo.matrix.cols(); ++j )
│ │ │ │ -
110 out << (j > 0 ? " " : "") << trafo.matrix( i, j );
│ │ │ │ -
111 }
│ │ │ │ -
112 out << " +";
│ │ │ │ -
113 for( unsigned int i = 0; i < trafo.shift.size(); ++i )
│ │ │ │ -
114 out << " " << trafo.shift[ i ];
│ │ │ │ -
115 return out;
│ │ │ │ -
116 }
│ │ │ │ -
│ │ │ │ +
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 static const PartitionIteratorType VTK_Partition = InteriorBorder_Partition;
│ │ │ │ +
116 //static const PartitionIteratorType VTK_Partition = All_Partition;
│ │ │ │
117
│ │ │ │ -
118 } // end namespace dgf
│ │ │ │ -
119
│ │ │ │ -
120} // end namespace Dune
│ │ │ │ -
121
│ │ │ │ -
122#endif
│ │ │ │ - │ │ │ │ +
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 // for 2d vector fields should be written as 3d vector fields
│ │ │ │ +
1131 if(it->fieldInfo().type() == VTK::FieldInfo::Type::vector && writecomps == 2)
│ │ │ │ +
1132 writecomps = 3;
│ │ │ │ +
1133 writer.addArray(it->name(), writecomps, it->fieldInfo().precision());
│ │ │ │ +
1134 }
│ │ │ │ +
1135 writer.endPointData();
│ │ │ │ +
1136
│ │ │ │ +
1137 // PCellData
│ │ │ │ +
1138 {
│ │ │ │ +
1139 std::string scalars, vectors;
│ │ │ │ +
1140 std::tie(scalars,vectors) = getDataNames(celldata);
│ │ │ │ +
1141 writer.beginCellData(scalars, vectors);
│ │ │ │ +
1142 }
│ │ │ │ +
1143 for (auto it = celldata.begin(),
│ │ │ │ +
1144 end = celldata.end();
│ │ │ │ +
1145 it != end;
│ │ │ │ +
1146 ++it)
│ │ │ │ +
1147 {
│ │ │ │ +
1148 unsigned writecomps = it->fieldInfo().size();
│ │ │ │ +
1149 // for 2d vector fields should be written as 3d vector fields
│ │ │ │ +
1150 if(it->fieldInfo().type() == VTK::FieldInfo::Type::vector && writecomps == 2)
│ │ │ │ +
1151 writecomps = 3;
│ │ │ │ +
1152 writer.addArray(it->name(), writecomps, it->fieldInfo().precision());
│ │ │ │ +
1153 }
│ │ │ │ +
1154 writer.endCellData();
│ │ │ │ +
1155
│ │ │ │ +
1156 // PPoints
│ │ │ │ +
1157 writer.beginPoints();
│ │ │ │ +
1158 writer.addArray("Coordinates", 3, coordPrec);
│ │ │ │ +
1159 writer.endPoints();
│ │ │ │ +
1160
│ │ │ │ +
1161 // Pieces
│ │ │ │ +
1162 for( int i = 0; i < commSize; ++i )
│ │ │ │ +
1163 {
│ │ │ │ +
1164 const std::string& fullname = getParallelPieceName(piecename,
│ │ │ │ +
1165 piecepath, i,
│ │ │ │ +
1166 commSize);
│ │ │ │ +
1167 writer.addPiece(fullname);
│ │ │ │ +
1168 }
│ │ │ │ +
1169
│ │ │ │ +
1170 writer.endMain();
│ │ │ │ +
1171 }
│ │ │ │ +
1172
│ │ │ │ +
1174 void writeDataFile (std::ostream& s)
│ │ │ │ +
1175 {
│ │ │ │ +
1176 VTK::FileType fileType =
│ │ │ │ +
1177 (n == 1) ? VTK::polyData : VTK::unstructuredGrid;
│ │ │ │ +
1178
│ │ │ │ +
1179 VTK::VTUWriter writer(s, outputtype, fileType);
│ │ │ │ +
1180
│ │ │ │ +
1181 // Grid characteristics
│ │ │ │ +
1182 vertexmapper = new VertexMapper( gridView_, mcmgVertexLayout() );
│ │ │ │ +
1183 if (datamode == VTK::conforming)
│ │ │ │ +
1184 {
│ │ │ │ +
1185 number.resize(vertexmapper->size());
│ │ │ │ +
1186 for (std::vector<int>::size_type i=0; i<number.size(); i++) number[i] = -1;
│ │ │ │ +
1187 }
│ │ │ │ + │ │ │ │ +
1189
│ │ │ │ +
1190 writer.beginMain(ncells, nvertices);
│ │ │ │ +
1191 writeAllData(writer);
│ │ │ │ +
1192 writer.endMain();
│ │ │ │ +
1193
│ │ │ │ +
1194 // write appended binary data section
│ │ │ │ +
1195 if(writer.beginAppended())
│ │ │ │ +
1196 writeAllData(writer);
│ │ │ │ +
1197 writer.endAppended();
│ │ │ │ +
1198
│ │ │ │ +
1199 delete vertexmapper; number.clear();
│ │ │ │ +
1200 }
│ │ │ │ +
1201
│ │ │ │ +
1202 void writeAllData(VTK::VTUWriter& writer) {
│ │ │ │ +
1203 // PointData
│ │ │ │ +
1204 writeVertexData(writer);
│ │ │ │ +
1205
│ │ │ │ +
1206 // CellData
│ │ │ │ +
1207 writeCellData(writer);
│ │ │ │ +
1208
│ │ │ │ +
1209 // Points
│ │ │ │ +
1210 writeGridPoints(writer);
│ │ │ │ +
1211
│ │ │ │ +
1212 // Cells
│ │ │ │ +
1213 writeGridCells(writer);
│ │ │ │ +
1214 }
│ │ │ │ +
1215
│ │ │ │ +
1216 protected:
│ │ │ │ +
│ │ │ │ +
1217 std::string getFormatString() const
│ │ │ │ +
1218 {
│ │ │ │ + │ │ │ │ +
1220 return "ascii";
│ │ │ │ + │ │ │ │ +
1222 return "binary";
│ │ │ │ + │ │ │ │ +
1224 return "appended";
│ │ │ │ + │ │ │ │ +
1226 return "appended";
│ │ │ │ +
1227 DUNE_THROW(IOError, "VTKWriter: unsupported OutputType" << outputtype);
│ │ │ │ +
1228 }
│ │ │ │ +
│ │ │ │ +
1229
│ │ │ │ +
│ │ │ │ +
1230 std::string getTypeString() const
│ │ │ │ +
1231 {
│ │ │ │ +
1232 if (n==1)
│ │ │ │ +
1233 return "PolyData";
│ │ │ │ +
1234 else
│ │ │ │ +
1235 return "UnstructuredGrid";
│ │ │ │ +
1236 }
│ │ │ │ +
│ │ │ │ +
1237
│ │ │ │ +
│ │ │ │ +
1239 virtual void countEntities(int &nvertices_, int &ncells_, int &ncorners_)
│ │ │ │ +
1240 {
│ │ │ │ +
1241 nvertices_ = 0;
│ │ │ │ +
1242 ncells_ = 0;
│ │ │ │ +
1243 ncorners_ = 0;
│ │ │ │ +
1244 for (CellIterator it=cellBegin(); it!=cellEnd(); ++it)
│ │ │ │ +
1245 {
│ │ │ │ +
1246 ncells_++;
│ │ │ │ +
1247 // because of the use of vertexmapper->map(), this iteration must be
│ │ │ │ +
1248 // in the order of Dune's numbering.
│ │ │ │ +
1249 const int subEntities = it->subEntities(n);
│ │ │ │ +
1250 for (int i=0; i<subEntities; ++i)
│ │ │ │ +
1251 {
│ │ │ │ +
1252 ncorners_++;
│ │ │ │ +
1253 if (datamode == VTK::conforming)
│ │ │ │ +
1254 {
│ │ │ │ +
1255 int alpha = vertexmapper->subIndex(*it,i,n);
│ │ │ │ +
1256 if (number[alpha]<0)
│ │ │ │ +
1257 number[alpha] = nvertices_++;
│ │ │ │ +
1258 }
│ │ │ │ +
1259 else
│ │ │ │ +
1260 {
│ │ │ │ +
1261 nvertices_++;
│ │ │ │ +
1262 }
│ │ │ │ +
1263 }
│ │ │ │ +
1264 }
│ │ │ │ +
1265 }
│ │ │ │ +
│ │ │ │ +
1266
│ │ │ │ +
1267 template<typename T>
│ │ │ │ +
│ │ │ │ +
1268 std::tuple<std::string,std::string> getDataNames(const T& data) const
│ │ │ │ +
1269 {
│ │ │ │ +
1270 std::string scalars = "";
│ │ │ │ +
1271 for (auto it = data.begin(),
│ │ │ │ +
1272 end = data.end();
│ │ │ │ +
1273 it != end;
│ │ │ │ +
1274 ++it)
│ │ │ │ +
1275 if (it->fieldInfo().type() == VTK::FieldInfo::Type::scalar)
│ │ │ │ +
1276 {
│ │ │ │ +
1277 scalars = it->name();
│ │ │ │ +
1278 break;
│ │ │ │ +
1279 }
│ │ │ │ +
1280
│ │ │ │ +
1281 std::string vectors = "";
│ │ │ │ +
1282 for (auto it = data.begin(),
│ │ │ │ +
1283 end = data.end();
│ │ │ │ +
1284 it != end;
│ │ │ │ +
1285 ++it)
│ │ │ │ +
1286 if (it->fieldInfo().type() == VTK::FieldInfo::Type::vector)
│ │ │ │ +
1287 {
│ │ │ │ +
1288 vectors = it->name();
│ │ │ │ +
1289 break;
│ │ │ │ +
1290 }
│ │ │ │ +
1291 return std::make_tuple(scalars,vectors);
│ │ │ │ +
1292 }
│ │ │ │ +
│ │ │ │ +
1293
│ │ │ │ +
1294 template<typename Data, typename Iterator>
│ │ │ │ +
│ │ │ │ +
1295 void writeData(VTK::VTUWriter& writer, const Data& data, const Iterator begin, const Iterator end, int nentries)
│ │ │ │ +
1296 {
│ │ │ │ +
1297 for (auto it = data.begin(),
│ │ │ │ +
1298 iend = data.end();
│ │ │ │ +
1299 it != iend;
│ │ │ │ +
1300 ++it)
│ │ │ │ +
1301 {
│ │ │ │ +
1302 const auto& f = *it;
│ │ │ │ +
1303 VTK::FieldInfo fieldInfo = f.fieldInfo();
│ │ │ │ +
1304 std::size_t writecomps = fieldInfo.size();
│ │ │ │ +
1305 switch (fieldInfo.type())
│ │ │ │ +
1306 {
│ │ │ │ + │ │ │ │ +
1308 break;
│ │ │ │ + │ │ │ │ +
1310 // vtk file format: a vector data always should have 3 comps (with
│ │ │ │ +
1311 // 3rd comp = 0 in 2D case)
│ │ │ │ +
1312 if (writecomps > 3)
│ │ │ │ +
1313 DUNE_THROW(IOError,"Cannot write VTK vectors with more than 3 components (components was " << writecomps << ")");
│ │ │ │ +
1314 writecomps = 3;
│ │ │ │ +
1315 break;
│ │ │ │ + │ │ │ │ +
1317 DUNE_THROW(NotImplemented,"VTK output for tensors not implemented yet");
│ │ │ │ +
1318 }
│ │ │ │ +
1319 std::shared_ptr<VTK::DataArrayWriter> p
│ │ │ │ +
1320 (writer.makeArrayWriter(f.name(), writecomps, nentries, fieldInfo.precision()));
│ │ │ │ +
1321 if(!p->writeIsNoop())
│ │ │ │ +
1322 for (Iterator eit = begin; eit!=end; ++eit)
│ │ │ │ +
1323 {
│ │ │ │ +
1324 const Entity & e = *eit;
│ │ │ │ +
1325 f.bind(e);
│ │ │ │ +
1326 f.write(eit.position(),*p);
│ │ │ │ +
1327 f.unbind();
│ │ │ │ +
1328 // vtk file format: a vector data always should have 3 comps
│ │ │ │ +
1329 // (with 3rd comp = 0 in 2D case)
│ │ │ │ +
1330 for (std::size_t j=fieldInfo.size(); j < writecomps; ++j)
│ │ │ │ +
1331 p->write(0.0);
│ │ │ │ +
1332 }
│ │ │ │ +
1333 }
│ │ │ │ +
1334 }
│ │ │ │ +
│ │ │ │ +
1335
│ │ │ │ +
│ │ │ │ +
1337 virtual void writeCellData(VTK::VTUWriter& writer)
│ │ │ │ +
1338 {
│ │ │ │ +
1339 if(celldata.size() == 0)
│ │ │ │ +
1340 return;
│ │ │ │ +
1341
│ │ │ │ +
1342 std::string scalars, vectors;
│ │ │ │ +
1343 std::tie(scalars,vectors) = getDataNames(celldata);
│ │ │ │ +
1344
│ │ │ │ +
1345 writer.beginCellData(scalars, vectors);
│ │ │ │ + │ │ │ │ +
1347 writer.endCellData();
│ │ │ │ +
1348 }
│ │ │ │ +
│ │ │ │ +
1349
│ │ │ │ +
│ │ │ │ +
1351 virtual void writeVertexData(VTK::VTUWriter& writer)
│ │ │ │ +
1352 {
│ │ │ │ +
1353 if(vertexdata.size() == 0)
│ │ │ │ +
1354 return;
│ │ │ │ +
1355
│ │ │ │ +
1356 std::string scalars, vectors;
│ │ │ │ +
1357 std::tie(scalars,vectors) = getDataNames(vertexdata);
│ │ │ │ +
1358
│ │ │ │ +
1359 writer.beginPointData(scalars, vectors);
│ │ │ │ + │ │ │ │ +
1361 writer.endPointData();
│ │ │ │ +
1362 }
│ │ │ │ +
│ │ │ │ +
1363
│ │ │ │ +
│ │ │ │ +
1365 virtual void writeGridPoints(VTK::VTUWriter& writer)
│ │ │ │ +
1366 {
│ │ │ │ +
1367 writer.beginPoints();
│ │ │ │ +
1368
│ │ │ │ +
1369 std::shared_ptr<VTK::DataArrayWriter> p
│ │ │ │ +
1370 (writer.makeArrayWriter("Coordinates", 3, nvertices, coordPrec));
│ │ │ │ +
1371 if(!p->writeIsNoop()) {
│ │ │ │ +
1372 VertexIterator vEnd = vertexEnd();
│ │ │ │ +
1373 for (VertexIterator vit=vertexBegin(); vit!=vEnd; ++vit)
│ │ │ │ +
1374 {
│ │ │ │ +
1375 int dimw=w;
│ │ │ │ +
1376 for (int j=0; j<std::min(dimw,3); j++)
│ │ │ │ +
1377 p->write((*vit).geometry().corner(vit.localindex())[j]);
│ │ │ │ +
1378 for (int j=std::min(dimw,3); j<3; j++)
│ │ │ │ +
1379 p->write(0.0);
│ │ │ │ +
1380 }
│ │ │ │ +
1381 }
│ │ │ │ +
1382 // free the VTK::DataArrayWriter before touching the stream
│ │ │ │ +
1383 p.reset();
│ │ │ │ +
1384
│ │ │ │ +
1385 writer.endPoints();
│ │ │ │ +
1386 }
│ │ │ │ +
│ │ │ │ +
1387
│ │ │ │ +
│ │ │ │ +
1389 virtual void writeGridCells(VTK::VTUWriter& writer)
│ │ │ │ +
1390 {
│ │ │ │ +
1391 writer.beginCells();
│ │ │ │ +
1392
│ │ │ │ +
1393 // connectivity
│ │ │ │ +
1394 {
│ │ │ │ +
1395 std::shared_ptr<VTK::DataArrayWriter> p1
│ │ │ │ +
1396 (writer.makeArrayWriter("connectivity", 1, ncorners, VTK::Precision::int32));
│ │ │ │ +
1397 if(!p1->writeIsNoop())
│ │ │ │ +
1398 for (CornerIterator it=cornerBegin(); it!=cornerEnd(); ++it)
│ │ │ │ +
1399 p1->write(it.id());
│ │ │ │ +
1400 }
│ │ │ │ +
1401
│ │ │ │ +
1402 // offsets
│ │ │ │ +
1403 {
│ │ │ │ +
1404 std::shared_ptr<VTK::DataArrayWriter> p2
│ │ │ │ +
1405 (writer.makeArrayWriter("offsets", 1, ncells, VTK::Precision::int32));
│ │ │ │ +
1406 if(!p2->writeIsNoop()) {
│ │ │ │ +
1407 int offset = 0;
│ │ │ │ +
1408 for (CellIterator it=cellBegin(); it!=cellEnd(); ++it)
│ │ │ │ +
1409 {
│ │ │ │ +
1410 offset += it->subEntities(n);
│ │ │ │ +
1411 p2->write(offset);
│ │ │ │ +
1412 }
│ │ │ │ +
1413 }
│ │ │ │ +
1414 }
│ │ │ │ +
1415
│ │ │ │ +
1416 // types
│ │ │ │ +
1417 if (n>1)
│ │ │ │ +
1418 {
│ │ │ │ +
1419 {
│ │ │ │ +
1420 std::shared_ptr<VTK::DataArrayWriter> p3
│ │ │ │ +
1421 (writer.makeArrayWriter("types", 1, ncells, VTK::Precision::uint8));
│ │ │ │ +
1422
│ │ │ │ +
1423 if(!p3->writeIsNoop())
│ │ │ │ +
1424 {
│ │ │ │ +
1425 for (CellIterator it=cellBegin(); it!=cellEnd(); ++it)
│ │ │ │ +
1426 {
│ │ │ │ +
1427 int vtktype = VTK::geometryType(it->type());
│ │ │ │ +
1428 p3->write(vtktype);
│ │ │ │ +
1429 }
│ │ │ │ +
1430 }
│ │ │ │ +
1431 }
│ │ │ │ +
1432
│ │ │ │ +
1433
│ │ │ │ +
1434 // if polyhedron cells found also cell faces need to be written
│ │ │ │ +
1435 if( polyhedralCellsPresent_ )
│ │ │ │ +
1436 {
│ │ │ │ +
1437 writeCellFaces( writer );
│ │ │ │ +
1438 }
│ │ │ │ +
1439 }
│ │ │ │ +
1440
│ │ │ │ +
1441 writer.endCells();
│ │ │ │ +
1442 }
│ │ │ │ +
│ │ │ │ +
1443
│ │ │ │ +
1444 protected:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
1446 {
│ │ │ │ +
1447 // check if polyhedron cells are present
│ │ │ │ +
1448 for( const auto& geomType : gridView_.indexSet().types( 0 ) )
│ │ │ │ +
1449 {
│ │ │ │ +
1450 if( VTK::geometryType( geomType ) == VTK::polyhedron )
│ │ │ │ +
1451 {
│ │ │ │ +
1452 return true;
│ │ │ │ +
1453 }
│ │ │ │ +
1454 }
│ │ │ │ +
1455 return false;
│ │ │ │ +
1456 }
│ │ │ │ +
│ │ │ │ +
1457
│ │ │ │ +
│ │ │ │ +
1459 virtual void writeCellFaces(VTK::VTUWriter& writer)
│ │ │ │ +
1460 {
│ │ │ │ +
1461 if( ! faceVertices_ )
│ │ │ │ +
1462 {
│ │ │ │ +
1463 faceVertices_.reset( new std::pair< std::vector<int>, std::vector<int> > () );
│ │ │ │ +
1464 // fill face vertex structure
│ │ │ │ + │ │ │ │ +
1466 faceVertices_->first, faceVertices_->second );
│ │ │ │ +
1467 }
│ │ │ │ +
1468
│ │ │ │ +
1469 std::vector< int >& faces = faceVertices_->first;
│ │ │ │ +
1470 std::vector< int >& faceOffsets = faceVertices_->second;
│ │ │ │ +
1471 assert( int(faceOffsets.size()) == ncells );
│ │ │ │ +
1472
│ │ │ │ +
1473 {
│ │ │ │ +
1474 std::shared_ptr<VTK::DataArrayWriter> p4
│ │ │ │ +
1475 (writer.makeArrayWriter("faces", 1, faces.size(), VTK::Precision::int32));
│ │ │ │ +
1476 if(!p4->writeIsNoop())
│ │ │ │ +
1477 {
│ │ │ │ +
1478 for( const auto& face : faces )
│ │ │ │ +
1479 p4->write( face );
│ │ │ │ +
1480 }
│ │ │ │ +
1481 }
│ │ │ │ +
1482
│ │ │ │ +
1483 {
│ │ │ │ +
1484 std::shared_ptr<VTK::DataArrayWriter> p5
│ │ │ │ +
1485 (writer.makeArrayWriter("faceoffsets", 1, ncells, VTK::Precision::int32));
│ │ │ │ +
1486 if(!p5->writeIsNoop())
│ │ │ │ +
1487 {
│ │ │ │ +
1488 for( const auto& offset : faceOffsets )
│ │ │ │ +
1489 p5->write( offset );
│ │ │ │ +
1490
│ │ │ │ +
1491 // clear face vertex structure
│ │ │ │ +
1492 faceVertices_.reset();
│ │ │ │ +
1493 }
│ │ │ │ +
1494 }
│ │ │ │ +
1495 }
│ │ │ │ +
│ │ │ │ +
1496
│ │ │ │ +
1497 template <class CornerIterator, class IndexSet, class T>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
1499 const CornerIterator end,
│ │ │ │ +
1500 const IndexSet& indexSet,
│ │ │ │ +
1501 std::vector<T>& faces,
│ │ │ │ +
1502 std::vector<T>& faceOffsets )
│ │ │ │ +
1503 {
│ │ │ │ +
1504 if( n == 3 && it != end )
│ │ │ │ +
1505 {
│ │ │ │ +
1506 // clear output arrays
│ │ │ │ +
1507 faces.clear();
│ │ │ │ +
1508 faces.reserve( 15 * ncells );
│ │ │ │ +
1509 faceOffsets.clear();
│ │ │ │ +
1510 faceOffsets.reserve( ncells );
│ │ │ │ +
1511
│ │ │ │ +
1512 int offset = 0;
│ │ │ │ +
1513
│ │ │ │ +
1514 Cell element = *it;
│ │ │ │ +
1515 int elIndex = indexSet.index( element );
│ │ │ │ +
1516 std::vector< T > vertices;
│ │ │ │ +
1517 vertices.reserve( 30 );
│ │ │ │ +
1518 for( ; it != end; ++it )
│ │ │ │ +
1519 {
│ │ │ │ +
1520 const Cell& cell = *it ;
│ │ │ │ +
1521 const int cellIndex = indexSet.index( cell ) ;
│ │ │ │ +
1522 if( elIndex != cellIndex )
│ │ │ │ +
1523 {
│ │ │ │ +
1524 fillFacesForElement( element, indexSet, vertices, offset, faces, faceOffsets );
│ │ │ │ +
1525
│ │ │ │ +
1526 vertices.clear();
│ │ │ │ +
1527 element = cell ;
│ │ │ │ +
1528 elIndex = cellIndex ;
│ │ │ │ +
1529 }
│ │ │ │ +
1530 vertices.push_back( it.id() );
│ │ │ │ +
1531 }
│ │ │ │ +
1532
│ │ │ │ +
1533 // fill faces for last element
│ │ │ │ +
1534 fillFacesForElement( element, indexSet, vertices, offset, faces, faceOffsets );
│ │ │ │ +
1535 }
│ │ │ │ +
1536 }
│ │ │ │ +
│ │ │ │ +
1537
│ │ │ │ +
1538 template <class Entity, class IndexSet, class T>
│ │ │ │ +
│ │ │ │ +
1539 static void fillFacesForElement( const Entity& element,
│ │ │ │ +
1540 const IndexSet& indexSet,
│ │ │ │ +
1541 const std::vector<T>& vertices,
│ │ │ │ +
1542 T& offset,
│ │ │ │ +
1543 std::vector<T>& faces,
│ │ │ │ +
1544 std::vector<T>& faceOffsets )
│ │ │ │ +
1545 {
│ │ │ │ +
1546 const int dim = n;
│ │ │ │ +
1547
│ │ │ │ +
1548 std::map< T, T > vxMap;
│ │ │ │ +
1549
│ │ │ │ +
1550 // get number of local faces
│ │ │ │ +
1551 const int nVertices = element.subEntities( dim );
│ │ │ │ +
1552 for( int vx = 0; vx < nVertices; ++ vx )
│ │ │ │ +
1553 {
│ │ │ │ +
1554 const int vxIdx = indexSet.subIndex( element, vx, dim );
│ │ │ │ +
1555 vxMap[ vxIdx ] = vertices[ vx ];
│ │ │ │ +
1556 }
│ │ │ │ +
1557
│ │ │ │ +
1558 // get number of local faces
│ │ │ │ +
1559 const int nFaces = element.subEntities( 1 );
│ │ │ │ +
1560 // store number of faces for current element
│ │ │ │ +
1561 faces.push_back( nFaces );
│ │ │ │ +
1562 ++offset;
│ │ │ │ +
1563 // extract each face as a set of vertex indices
│ │ │ │ +
1564 for( int fce = 0; fce < nFaces; ++ fce )
│ │ │ │ +
1565 {
│ │ │ │ +
1566 // obtain face
│ │ │ │ +
1567 const auto face = element.template subEntity< 1 > ( fce );
│ │ │ │ +
1568
│ │ │ │ +
1569 // get all vertex indices from current face
│ │ │ │ +
1570 const int nVxFace = face.subEntities( dim );
│ │ │ │ +
1571 faces.push_back( nVxFace );
│ │ │ │ +
1572 ++offset ;
│ │ │ │ +
1573 for( int i=0; i<nVxFace; ++i )
│ │ │ │ +
1574 {
│ │ │ │ +
1575 const T vxIndex = indexSet.subIndex( face, i, dim );
│ │ │ │ +
1576 assert( vxMap.find( vxIndex ) != vxMap.end() );
│ │ │ │ +
1577 faces.push_back( vxMap[ vxIndex ] );
│ │ │ │ +
1578 ++offset ;
│ │ │ │ +
1579 }
│ │ │ │ +
1580 }
│ │ │ │ +
1581
│ │ │ │ +
1582 // store face offset for each element
│ │ │ │ +
1583 faceOffsets.push_back( offset );
│ │ │ │ +
1584 }
│ │ │ │ +
│ │ │ │ +
1585
│ │ │ │ +
1586 protected:
│ │ │ │ +
1587 // the list of registered functions
│ │ │ │ +
1588 std::list<VTKLocalFunction> celldata;
│ │ │ │ +
1589 std::list<VTKLocalFunction> vertexdata;
│ │ │ │ +
1590
│ │ │ │ +
1591 // the grid
│ │ │ │ + │ │ │ │ +
1593
│ │ │ │ +
1594 // temporary grid information
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
1598 private:
│ │ │ │ +
1599 VertexMapper* vertexmapper;
│ │ │ │ +
1600 // in conforming mode, for each vertex id (as obtained by vertexmapper)
│ │ │ │ +
1601 // hold its number in the iteration order (VertexIterator)
│ │ │ │ +
1602 std::vector<int> number;
│ │ │ │ +
1603 VTK::DataMode datamode;
│ │ │ │ +
1604 VTK::Precision coordPrec;
│ │ │ │ +
1605
│ │ │ │ +
1606 // true if polyhedral cells are present in the grid
│ │ │ │ +
1607 const bool polyhedralCellsPresent_;
│ │ │ │ +
1608
│ │ │ │ +
1609 // pointer holding face vertex connectivity if needed
│ │ │ │ +
1610 std::shared_ptr< std::pair< std::vector<int>, std::vector<int> > > faceVertices_;
│ │ │ │ +
1611
│ │ │ │ +
1612 protected:
│ │ │ │ + │ │ │ │ +
1614 };
│ │ │ │ +
│ │ │ │ +
1615
│ │ │ │ +
1616}
│ │ │ │ +
1617
│ │ │ │ +
1618#endif
│ │ │ │ +
Mapper for multiple codim and multiple geometry types.
│ │ │ │ + │ │ │ │ +
Common stuff for the VTKWriter.
│ │ │ │ +
Data array writers for the VTKWriter.
│ │ │ │ + │ │ │ │ + │ │ │ │ +
Functions for VTK output.
│ │ │ │ + │ │ │ │ +
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:177
│ │ │ │ +
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:273
│ │ │ │ +
static constexpr int dimension
The dimension of the grid.
Definition common/gridview.hh:134
│ │ │ │ +
Grid::ctype ctype
type used for coordinates in grid
Definition common/gridview.hh:131
│ │ │ │ +
static constexpr int dimensionworld
The dimension of the world the grid lives in.
Definition common/gridview.hh:137
│ │ │ │ +
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 periodicfacetrans.hh:25
│ │ │ │ -
int numTransformations() const
Definition periodicfacetrans.hh:88
│ │ │ │ -
const AffineTransformation & transformation(int i) const
Definition periodicfacetrans.hh:82
│ │ │ │ -
Definition periodicfacetrans.hh:28
│ │ │ │ -
int rows() const
Definition periodicfacetrans.hh:50
│ │ │ │ -
const T & operator()(int i, int j) const
Definition periodicfacetrans.hh:40
│ │ │ │ -
int cols() const
Definition periodicfacetrans.hh:55
│ │ │ │ -
Matrix(int rows, int cols)
Definition periodicfacetrans.hh:34
│ │ │ │ - │ │ │ │ -
Matrix< double > matrix
Definition periodicfacetrans.hh:63
│ │ │ │ -
std::vector< double > shift
Definition periodicfacetrans.hh:64
│ │ │ │ -
AffineTransformation(int dimworld)
Definition periodicfacetrans.hh:66
│ │ │ │ +
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:104
│ │ │ │ +
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 output 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 output 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:1230
│ │ │ │ +
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:1589
│ │ │ │ +
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:1217
│ │ │ │ +
bool checkForPolyhedralCells() const
Definition vtkwriter.hh:1445
│ │ │ │ +
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:1337
│ │ │ │ +
virtual void countEntities(int &nvertices_, int &ncells_, int &ncorners_)
count the vertices, cells and corners
Definition vtkwriter.hh:1239
│ │ │ │ +
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:1613
│ │ │ │ +
virtual void writeGridCells(VTK::VTUWriter &writer)
write the connectivity array
Definition vtkwriter.hh:1389
│ │ │ │ +
GridView gridView_
Definition vtkwriter.hh:1592
│ │ │ │ +
virtual void writeCellFaces(VTK::VTUWriter &writer)
write the connectivity array
Definition vtkwriter.hh:1459
│ │ │ │ +
void fillFaceVertices(CornerIterator it, const CornerIterator end, const IndexSet &indexSet, std::vector< T > &faces, std::vector< T > &faceOffsets)
Definition vtkwriter.hh:1498
│ │ │ │ +
std::list< VTKLocalFunction > celldata
Definition vtkwriter.hh:1588
│ │ │ │ +
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:1268
│ │ │ │ +
virtual void writeGridPoints(VTK::VTUWriter &writer)
write the positions of vertices
Definition vtkwriter.hh:1365
│ │ │ │ +
virtual void writeVertexData(VTK::VTUWriter &writer)
write vertex data
Definition vtkwriter.hh:1351
│ │ │ │ +
int nvertices
Definition vtkwriter.hh:1596
│ │ │ │ +
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:1539
│ │ │ │ +
void writeData(VTK::VTUWriter &writer, const Data &data, const Iterator begin, const Iterator end, int nentries)
Definition vtkwriter.hh:1295
│ │ │ │ +
int ncells
Definition vtkwriter.hh:1595
│ │ │ │ +
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:1597
│ │ │ │ +
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,181 +2,1980 @@ │ │ │ │ │ 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 │ │ │ │ │ +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 © DUNE Project contributors, see file │ │ │ │ │ +_1// SPDX-FileCopyrightText: Copyright © 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 > │ │ │ │ │ -_2_7 class _M_a_t_r_i_x │ │ │ │ │ -28 { │ │ │ │ │ -29 int rows_; │ │ │ │ │ -30 int cols_; │ │ │ │ │ -31 std::vector< T > fields_; │ │ │ │ │ -32 │ │ │ │ │ -33 public: │ │ │ │ │ -_3_4 _M_a_t_r_i_x ( int _r_o_w_s, int _c_o_l_s ) │ │ │ │ │ -35 : rows_( _r_o_w_s ), │ │ │ │ │ -36 cols_( _c_o_l_s ), │ │ │ │ │ -37 fields_( _r_o_w_s * _c_o_l_s ) │ │ │ │ │ -38 {} │ │ │ │ │ -39 │ │ │ │ │ -_4_0 const T &_o_p_e_r_a_t_o_r_(_)_ ( int i, int j ) const │ │ │ │ │ -41 { │ │ │ │ │ -42 return fields_[ i * cols_ + j ]; │ │ │ │ │ -43 } │ │ │ │ │ -44 │ │ │ │ │ -_4_5 T &_o_p_e_r_a_t_o_r_(_)_ ( int i, int j ) │ │ │ │ │ -46 { │ │ │ │ │ -47 return fields_[ i * cols_ + j ]; │ │ │ │ │ -48 } │ │ │ │ │ -49 │ │ │ │ │ -_5_0 int _r_o_w_s () const │ │ │ │ │ -51 { │ │ │ │ │ -52 return rows_; │ │ │ │ │ -53 } │ │ │ │ │ -54 │ │ │ │ │ -_5_5 int _c_o_l_s () const │ │ │ │ │ -56 { │ │ │ │ │ -57 return cols_; │ │ │ │ │ -58 } │ │ │ │ │ -59 }; │ │ │ │ │ +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 │ │ │ │ │ +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 struct _A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ │ -62 { │ │ │ │ │ -_6_3 _M_a_t_r_i_x_<_ _d_o_u_b_l_e_ _> _m_a_t_r_i_x; │ │ │ │ │ -_6_4 std::vector< double > _s_h_i_f_t; │ │ │ │ │ -65 │ │ │ │ │ -_6_6 explicit _A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n ( int dimworld ) │ │ │ │ │ -67 : _m_a_t_r_i_x( dimworld, dimworld ), │ │ │ │ │ -68 _s_h_i_f_t( dimworld ) │ │ │ │ │ -69 {} │ │ │ │ │ -70 }; │ │ │ │ │ -71 │ │ │ │ │ -72 private: │ │ │ │ │ -73 std::vector< AffineTransformation > transformations_; │ │ │ │ │ -74 │ │ │ │ │ -75 // copy not implemented │ │ │ │ │ -76 _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 & ); │ │ │ │ │ +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 │ │ │ │ │ -78 public: │ │ │ │ │ -79 // initialize block and get dimension of world │ │ │ │ │ -80 _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 ); │ │ │ │ │ -81 │ │ │ │ │ -_8_2 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 │ │ │ │ │ -83 { │ │ │ │ │ -84 assert( i < _n_u_m_T_r_a_n_s_f_o_r_m_a_t_i_o_n_s() ); │ │ │ │ │ -85 return transformations_[ i ]; │ │ │ │ │ -86 } │ │ │ │ │ -87 │ │ │ │ │ -_8_8 int _n_u_m_T_r_a_n_s_f_o_r_m_a_t_i_o_n_s () const │ │ │ │ │ -89 { │ │ │ │ │ -90 return transformations_.size(); │ │ │ │ │ -91 } │ │ │ │ │ -92 │ │ │ │ │ -93 private: │ │ │ │ │ -94 void match ( char what ); │ │ │ │ │ -95 }; │ │ │ │ │ +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 │ │ │ │ │ -97 │ │ │ │ │ -98 │ │ │ │ │ -99 // PeriodicFaceTransformationBlock::AffineTransformation │ │ │ │ │ -100 // ----------------------------------------------------- │ │ │ │ │ -101 │ │ │ │ │ +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 │ │ │ │ │ -_1_0_3 inline std::ostream & │ │ │ │ │ -104 _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 ) │ │ │ │ │ -105 { │ │ │ │ │ -106 for( int i = 0; i < trafo._m_a_t_r_i_x._r_o_w_s(); ++i ) │ │ │ │ │ -107 { │ │ │ │ │ -108 out << (i > 0 ? ", " : ""); │ │ │ │ │ -109 for( int j = 0; j < trafo._m_a_t_r_i_x._c_o_l_s(); ++j ) │ │ │ │ │ -110 out << (j > 0 ? " " : "") << trafo._m_a_t_r_i_x( i, j ); │ │ │ │ │ -111 } │ │ │ │ │ -112 out << " +"; │ │ │ │ │ -113 for( unsigned int i = 0; i < trafo._s_h_i_f_t.size(); ++i ) │ │ │ │ │ -114 out << " " << trafo._s_h_i_f_t[ i ]; │ │ │ │ │ -115 return out; │ │ │ │ │ -116 } │ │ │ │ │ +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 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 } // end namespace dgf │ │ │ │ │ -119 │ │ │ │ │ -120} // end namespace Dune │ │ │ │ │ -121 │ │ │ │ │ -122#endif │ │ │ │ │ -_b_a_s_i_c_._h_h │ │ │ │ │ +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 // for 2d vector fields should be written as 3d vector fields │ │ │ │ │ +1131 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 && writecomps == │ │ │ │ │ +2) │ │ │ │ │ +1132 writecomps = 3; │ │ │ │ │ +1133 writer.addArray(it->name(), writecomps, it->fieldInfo().precision()); │ │ │ │ │ +1134 } │ │ │ │ │ +1135 writer.endPointData(); │ │ │ │ │ +1136 │ │ │ │ │ +1137 // PCellData │ │ │ │ │ +1138 { │ │ │ │ │ +1139 std::string scalars, vectors; │ │ │ │ │ +1140 std::tie(scalars,vectors) = _g_e_t_D_a_t_a_N_a_m_e_s(_c_e_l_l_d_a_t_a); │ │ │ │ │ +1141 writer.beginCellData(scalars, vectors); │ │ │ │ │ +1142 } │ │ │ │ │ +1143 for (auto it = _c_e_l_l_d_a_t_a.begin(), │ │ │ │ │ +1144 end = _c_e_l_l_d_a_t_a.end(); │ │ │ │ │ +1145 it != end; │ │ │ │ │ +1146 ++it) │ │ │ │ │ +1147 { │ │ │ │ │ +1148 unsigned writecomps = it->fieldInfo().size(); │ │ │ │ │ +1149 // for 2d vector fields should be written as 3d vector fields │ │ │ │ │ +1150 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 && writecomps == │ │ │ │ │ +2) │ │ │ │ │ +1151 writecomps = 3; │ │ │ │ │ +1152 writer.addArray(it->name(), writecomps, it->fieldInfo().precision()); │ │ │ │ │ +1153 } │ │ │ │ │ +1154 writer.endCellData(); │ │ │ │ │ +1155 │ │ │ │ │ +1156 // PPoints │ │ │ │ │ +1157 writer.beginPoints(); │ │ │ │ │ +1158 writer.addArray("Coordinates", 3, coordPrec); │ │ │ │ │ +1159 writer.endPoints(); │ │ │ │ │ +1160 │ │ │ │ │ +1161 // Pieces │ │ │ │ │ +1162 for( int i = 0; i < commSize; ++i ) │ │ │ │ │ +1163 { │ │ │ │ │ +1164 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, │ │ │ │ │ +1165 piecepath, i, │ │ │ │ │ +1166 commSize); │ │ │ │ │ +1167 writer.addPiece(fullname); │ │ │ │ │ +1168 } │ │ │ │ │ +1169 │ │ │ │ │ +1170 writer.endMain(); │ │ │ │ │ +1171 } │ │ │ │ │ +1172 │ │ │ │ │ +1174 void writeDataFile (std::ostream& s) │ │ │ │ │ +1175 { │ │ │ │ │ +1176 _V_T_K_:_:_F_i_l_e_T_y_p_e fileType = │ │ │ │ │ +1177 (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; │ │ │ │ │ +1178 │ │ │ │ │ +1179 VTK::VTUWriter writer(s, _o_u_t_p_u_t_t_y_p_e, fileType); │ │ │ │ │ +1180 │ │ │ │ │ +1181 // Grid characteristics │ │ │ │ │ +1182 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() ); │ │ │ │ │ +1183 if (datamode == _V_T_K_:_:_c_o_n_f_o_r_m_i_n_g) │ │ │ │ │ +1184 { │ │ │ │ │ +1185 number.resize(vertexmapper->_s_i_z_e()); │ │ │ │ │ +1186 for (std::vector::size_type i=0; imap(), this iteration must be │ │ │ │ │ +1248 // in the order of Dune's numbering. │ │ │ │ │ +1249 const int subEntities = it->subEntities(n); │ │ │ │ │ +1250 for (int i=0; i_s_u_b_I_n_d_e_x(*it,i,n); │ │ │ │ │ +1256 if (number[alpha]<0) │ │ │ │ │ +1257 number[alpha] = nvertices_++; │ │ │ │ │ +1258 } │ │ │ │ │ +1259 else │ │ │ │ │ +1260 { │ │ │ │ │ +1261 nvertices_++; │ │ │ │ │ +1262 } │ │ │ │ │ +1263 } │ │ │ │ │ +1264 } │ │ │ │ │ +1265 } │ │ │ │ │ +1266 │ │ │ │ │ +1267 template │ │ │ │ │ +_1_2_6_8 std::tuple _g_e_t_D_a_t_a_N_a_m_e_s(const T& data) const │ │ │ │ │ +1269 { │ │ │ │ │ +1270 std::string scalars = ""; │ │ │ │ │ +1271 for (auto it = data.begin(), │ │ │ │ │ +1272 end = data.end(); │ │ │ │ │ +1273 it != end; │ │ │ │ │ +1274 ++it) │ │ │ │ │ +1275 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) │ │ │ │ │ +1276 { │ │ │ │ │ +1277 scalars = it->name(); │ │ │ │ │ +1278 break; │ │ │ │ │ +1279 } │ │ │ │ │ +1280 │ │ │ │ │ +1281 std::string vectors = ""; │ │ │ │ │ +1282 for (auto it = data.begin(), │ │ │ │ │ +1283 end = data.end(); │ │ │ │ │ +1284 it != end; │ │ │ │ │ +1285 ++it) │ │ │ │ │ +1286 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) │ │ │ │ │ +1287 { │ │ │ │ │ +1288 vectors = it->name(); │ │ │ │ │ +1289 break; │ │ │ │ │ +1290 } │ │ │ │ │ +1291 return std::make_tuple(scalars,vectors); │ │ │ │ │ +1292 } │ │ │ │ │ +1293 │ │ │ │ │ +1294 template │ │ │ │ │ +_1_2_9_5 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) │ │ │ │ │ +1296 { │ │ │ │ │ +1297 for (auto it = data.begin(), │ │ │ │ │ +1298 iend = data.end(); │ │ │ │ │ +1299 it != iend; │ │ │ │ │ +1300 ++it) │ │ │ │ │ +1301 { │ │ │ │ │ +1302 const auto& f = *it; │ │ │ │ │ +1303 _V_T_K_:_:_F_i_e_l_d_I_n_f_o fieldInfo = f.fieldInfo(); │ │ │ │ │ +1304 std::size_t writecomps = fieldInfo._s_i_z_e(); │ │ │ │ │ +1305 switch (fieldInfo._t_y_p_e()) │ │ │ │ │ +1306 { │ │ │ │ │ +1307 case _V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_T_y_p_e_:_:_s_c_a_l_a_r: │ │ │ │ │ +1308 break; │ │ │ │ │ +1309 case _V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_T_y_p_e_:_:_v_e_c_t_o_r: │ │ │ │ │ +1310 // vtk file format: a vector data always should have 3 comps (with │ │ │ │ │ +1311 // 3rd comp = 0 in 2D case) │ │ │ │ │ +1312 if (writecomps > 3) │ │ │ │ │ +1313 DUNE_THROW(IOError,"Cannot write VTK vectors with more than 3 components │ │ │ │ │ +(components was " << writecomps << ")"); │ │ │ │ │ +1314 writecomps = 3; │ │ │ │ │ +1315 break; │ │ │ │ │ +1316 case _V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_T_y_p_e_:_:_t_e_n_s_o_r: │ │ │ │ │ +1317 DUNE_THROW(NotImplemented,"VTK output for tensors not implemented yet"); │ │ │ │ │ +1318 } │ │ │ │ │ +1319 std::shared_ptr p │ │ │ │ │ +1320 (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())); │ │ │ │ │ +1321 if(!p->writeIsNoop()) │ │ │ │ │ +1322 for (Iterator eit = begin; eit!=end; ++eit) │ │ │ │ │ +1323 { │ │ │ │ │ +1324 const Entity & e = *eit; │ │ │ │ │ +1325 f.bind(e); │ │ │ │ │ +1326 f.write(eit.position(),*p); │ │ │ │ │ +1327 f.unbind(); │ │ │ │ │ +1328 // vtk file format: a vector data always should have 3 comps │ │ │ │ │ +1329 // (with 3rd comp = 0 in 2D case) │ │ │ │ │ +1330 for (std::size_t j=fieldInfo._s_i_z_e(); j < writecomps; ++j) │ │ │ │ │ +1331 p->write(0.0); │ │ │ │ │ +1332 } │ │ │ │ │ +1333 } │ │ │ │ │ +1334 } │ │ │ │ │ +1335 │ │ │ │ │ +_1_3_3_7 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) │ │ │ │ │ +1338 { │ │ │ │ │ +1339 if(_c_e_l_l_d_a_t_a.size() == 0) │ │ │ │ │ +1340 return; │ │ │ │ │ +1341 │ │ │ │ │ +1342 std::string scalars, vectors; │ │ │ │ │ +1343 std::tie(scalars,vectors) = _g_e_t_D_a_t_a_N_a_m_e_s(_c_e_l_l_d_a_t_a); │ │ │ │ │ +1344 │ │ │ │ │ +1345 writer._b_e_g_i_n_C_e_l_l_D_a_t_a(scalars, vectors); │ │ │ │ │ +1346 _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); │ │ │ │ │ +1347 writer._e_n_d_C_e_l_l_D_a_t_a(); │ │ │ │ │ +1348 } │ │ │ │ │ +1349 │ │ │ │ │ +_1_3_5_1 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) │ │ │ │ │ +1352 { │ │ │ │ │ +1353 if(_v_e_r_t_e_x_d_a_t_a.size() == 0) │ │ │ │ │ +1354 return; │ │ │ │ │ +1355 │ │ │ │ │ +1356 std::string scalars, vectors; │ │ │ │ │ +1357 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); │ │ │ │ │ +1358 │ │ │ │ │ +1359 writer._b_e_g_i_n_P_o_i_n_t_D_a_t_a(scalars, vectors); │ │ │ │ │ +1360 _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); │ │ │ │ │ +1361 writer._e_n_d_P_o_i_n_t_D_a_t_a(); │ │ │ │ │ +1362 } │ │ │ │ │ +1363 │ │ │ │ │ +_1_3_6_5 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) │ │ │ │ │ +1366 { │ │ │ │ │ +1367 writer._b_e_g_i_n_P_o_i_n_t_s(); │ │ │ │ │ +1368 │ │ │ │ │ +1369 std::shared_ptr p │ │ │ │ │ +1370 (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)); │ │ │ │ │ +1371 if(!p->writeIsNoop()) { │ │ │ │ │ +1372 _V_e_r_t_e_x_I_t_e_r_a_t_o_r vEnd = _v_e_r_t_e_x_E_n_d(); │ │ │ │ │ +1373 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) │ │ │ │ │ +1374 { │ │ │ │ │ +1375 int dimw=w; │ │ │ │ │ +1376 for (int j=0; jwrite((*vit).geometry().corner(vit.localindex())[j]); │ │ │ │ │ +1378 for (int j=std::min(dimw,3); j<3; j++) │ │ │ │ │ +1379 p->write(0.0); │ │ │ │ │ +1380 } │ │ │ │ │ +1381 } │ │ │ │ │ +1382 // free the VTK::DataArrayWriter before touching the stream │ │ │ │ │ +1383 p.reset(); │ │ │ │ │ +1384 │ │ │ │ │ +1385 writer._e_n_d_P_o_i_n_t_s(); │ │ │ │ │ +1386 } │ │ │ │ │ +1387 │ │ │ │ │ +_1_3_8_9 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) │ │ │ │ │ +1390 { │ │ │ │ │ +1391 writer._b_e_g_i_n_C_e_l_l_s(); │ │ │ │ │ +1392 │ │ │ │ │ +1393 // connectivity │ │ │ │ │ +1394 { │ │ │ │ │ +1395 std::shared_ptr p1 │ │ │ │ │ +1396 (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)); │ │ │ │ │ +1397 if(!p1->writeIsNoop()) │ │ │ │ │ +1398 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) │ │ │ │ │ +1399 p1->write(it.id()); │ │ │ │ │ +1400 } │ │ │ │ │ +1401 │ │ │ │ │ +1402 // offsets │ │ │ │ │ +1403 { │ │ │ │ │ +1404 std::shared_ptr p2 │ │ │ │ │ +1405 (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)); │ │ │ │ │ +1406 if(!p2->writeIsNoop()) { │ │ │ │ │ +1407 int offset = 0; │ │ │ │ │ +1408 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) │ │ │ │ │ +1409 { │ │ │ │ │ +1410 offset += it->subEntities(n); │ │ │ │ │ +1411 p2->write(offset); │ │ │ │ │ +1412 } │ │ │ │ │ +1413 } │ │ │ │ │ +1414 } │ │ │ │ │ +1415 │ │ │ │ │ +1416 // types │ │ │ │ │ +1417 if (n>1) │ │ │ │ │ +1418 { │ │ │ │ │ +1419 { │ │ │ │ │ +1420 std::shared_ptr p3 │ │ │ │ │ +1421 (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)); │ │ │ │ │ +1422 │ │ │ │ │ +1423 if(!p3->writeIsNoop()) │ │ │ │ │ +1424 { │ │ │ │ │ +1425 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) │ │ │ │ │ +1426 { │ │ │ │ │ +1427 int vtktype = _V_T_K_:_:_g_e_o_m_e_t_r_y_T_y_p_e(it->type()); │ │ │ │ │ +1428 p3->write(vtktype); │ │ │ │ │ +1429 } │ │ │ │ │ +1430 } │ │ │ │ │ +1431 } │ │ │ │ │ +1432 │ │ │ │ │ +1433 │ │ │ │ │ +1434 // if polyhedron cells found also cell faces need to be written │ │ │ │ │ +1435 if( polyhedralCellsPresent_ ) │ │ │ │ │ +1436 { │ │ │ │ │ +1437 _w_r_i_t_e_C_e_l_l_F_a_c_e_s( writer ); │ │ │ │ │ +1438 } │ │ │ │ │ +1439 } │ │ │ │ │ +1440 │ │ │ │ │ +1441 writer._e_n_d_C_e_l_l_s(); │ │ │ │ │ +1442 } │ │ │ │ │ +1443 │ │ │ │ │ +1444 protected: │ │ │ │ │ +_1_4_4_5 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 │ │ │ │ │ +1446 { │ │ │ │ │ +1447 // check if polyhedron cells are present │ │ │ │ │ +1448 for( const auto& geomType : _g_r_i_d_V_i_e_w__._i_n_d_e_x_S_e_t().types( 0 ) ) │ │ │ │ │ +1449 { │ │ │ │ │ +1450 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 ) │ │ │ │ │ +1451 { │ │ │ │ │ +1452 return true; │ │ │ │ │ +1453 } │ │ │ │ │ +1454 } │ │ │ │ │ +1455 return false; │ │ │ │ │ +1456 } │ │ │ │ │ +1457 │ │ │ │ │ +_1_4_5_9 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) │ │ │ │ │ +1460 { │ │ │ │ │ +1461 if( ! faceVertices_ ) │ │ │ │ │ +1462 { │ │ │ │ │ +1463 faceVertices_.reset( new std::pair< std::vector, std::vector > │ │ │ │ │ +() ); │ │ │ │ │ +1464 // fill face vertex structure │ │ │ │ │ +1465 _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(), │ │ │ │ │ +1466 faceVertices_->first, faceVertices_->second ); │ │ │ │ │ +1467 } │ │ │ │ │ +1468 │ │ │ │ │ +1469 std::vector< int >& faces = faceVertices_->first; │ │ │ │ │ +1470 std::vector< int >& faceOffsets = faceVertices_->second; │ │ │ │ │ +1471 assert( int(faceOffsets.size()) == _n_c_e_l_l_s ); │ │ │ │ │ +1472 │ │ │ │ │ +1473 { │ │ │ │ │ +1474 std::shared_ptr p4 │ │ │ │ │ +1475 (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)); │ │ │ │ │ +1476 if(!p4->writeIsNoop()) │ │ │ │ │ +1477 { │ │ │ │ │ +1478 for( const auto& face : faces ) │ │ │ │ │ +1479 p4->write( face ); │ │ │ │ │ +1480 } │ │ │ │ │ +1481 } │ │ │ │ │ +1482 │ │ │ │ │ +1483 { │ │ │ │ │ +1484 std::shared_ptr p5 │ │ │ │ │ +1485 (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)); │ │ │ │ │ +1486 if(!p5->writeIsNoop()) │ │ │ │ │ +1487 { │ │ │ │ │ +1488 for( const auto& offset : faceOffsets ) │ │ │ │ │ +1489 p5->write( offset ); │ │ │ │ │ +1490 │ │ │ │ │ +1491 // clear face vertex structure │ │ │ │ │ +1492 faceVertices_.reset(); │ │ │ │ │ +1493 } │ │ │ │ │ +1494 } │ │ │ │ │ +1495 } │ │ │ │ │ +1496 │ │ │ │ │ +1497 template │ │ │ │ │ +_1_4_9_8 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, │ │ │ │ │ +1499 const _C_o_r_n_e_r_I_t_e_r_a_t_o_r end, │ │ │ │ │ +1500 const IndexSet& indexSet, │ │ │ │ │ +1501 std::vector& faces, │ │ │ │ │ +1502 std::vector& faceOffsets ) │ │ │ │ │ +1503 { │ │ │ │ │ +1504 if( n == 3 && it != end ) │ │ │ │ │ +1505 { │ │ │ │ │ +1506 // clear output arrays │ │ │ │ │ +1507 faces.clear(); │ │ │ │ │ +1508 faces.reserve( 15 * _n_c_e_l_l_s ); │ │ │ │ │ +1509 faceOffsets.clear(); │ │ │ │ │ +1510 faceOffsets.reserve( _n_c_e_l_l_s ); │ │ │ │ │ +1511 │ │ │ │ │ +1512 int offset = 0; │ │ │ │ │ +1513 │ │ │ │ │ +1514 Cell element = *it; │ │ │ │ │ +1515 int elIndex = indexSet.index( element ); │ │ │ │ │ +1516 std::vector< T > vertices; │ │ │ │ │ +1517 vertices.reserve( 30 ); │ │ │ │ │ +1518 for( ; it != end; ++it ) │ │ │ │ │ +1519 { │ │ │ │ │ +1520 const Cell& cell = *it ; │ │ │ │ │ +1521 const int cellIndex = indexSet.index( cell ) ; │ │ │ │ │ +1522 if( elIndex != cellIndex ) │ │ │ │ │ +1523 { │ │ │ │ │ +1524 _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 ); │ │ │ │ │ +1525 │ │ │ │ │ +1526 vertices.clear(); │ │ │ │ │ +1527 element = cell ; │ │ │ │ │ +1528 elIndex = cellIndex ; │ │ │ │ │ +1529 } │ │ │ │ │ +1530 vertices.push_back( it._i_d() ); │ │ │ │ │ +1531 } │ │ │ │ │ +1532 │ │ │ │ │ +1533 // fill faces for last element │ │ │ │ │ +1534 _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 ); │ │ │ │ │ +1535 } │ │ │ │ │ +1536 } │ │ │ │ │ +1537 │ │ │ │ │ +1538 template │ │ │ │ │ +_1_5_3_9 static void _f_i_l_l_F_a_c_e_s_F_o_r_E_l_e_m_e_n_t( const Entity& element, │ │ │ │ │ +1540 const IndexSet& indexSet, │ │ │ │ │ +1541 const std::vector& vertices, │ │ │ │ │ +1542 T& offset, │ │ │ │ │ +1543 std::vector& faces, │ │ │ │ │ +1544 std::vector& faceOffsets ) │ │ │ │ │ +1545 { │ │ │ │ │ +1546 const int dim = n; │ │ │ │ │ +1547 │ │ │ │ │ +1548 std::map< T, T > vxMap; │ │ │ │ │ +1549 │ │ │ │ │ +1550 // get number of local faces │ │ │ │ │ +1551 const int nVertices = element.subEntities( dim ); │ │ │ │ │ +1552 for( int vx = 0; vx < nVertices; ++ vx ) │ │ │ │ │ +1553 { │ │ │ │ │ +1554 const int vxIdx = indexSet.subIndex( element, vx, dim ); │ │ │ │ │ +1555 vxMap[ vxIdx ] = vertices[ vx ]; │ │ │ │ │ +1556 } │ │ │ │ │ +1557 │ │ │ │ │ +1558 // get number of local faces │ │ │ │ │ +1559 const int nFaces = element.subEntities( 1 ); │ │ │ │ │ +1560 // store number of faces for current element │ │ │ │ │ +1561 faces.push_back( nFaces ); │ │ │ │ │ +1562 ++offset; │ │ │ │ │ +1563 // extract each face as a set of vertex indices │ │ │ │ │ +1564 for( int fce = 0; fce < nFaces; ++ fce ) │ │ │ │ │ +1565 { │ │ │ │ │ +1566 // obtain face │ │ │ │ │ +1567 const auto face = element.template subEntity< 1 > ( fce ); │ │ │ │ │ +1568 │ │ │ │ │ +1569 // get all vertex indices from current face │ │ │ │ │ +1570 const int nVxFace = face.subEntities( dim ); │ │ │ │ │ +1571 faces.push_back( nVxFace ); │ │ │ │ │ +1572 ++offset ; │ │ │ │ │ +1573 for( int i=0; i _c_e_l_l_d_a_t_a; │ │ │ │ │ +_1_5_8_9 std::list _v_e_r_t_e_x_d_a_t_a; │ │ │ │ │ +1590 │ │ │ │ │ +1591 // the grid │ │ │ │ │ +_1_5_9_2 _G_r_i_d_V_i_e_w _g_r_i_d_V_i_e_w__; │ │ │ │ │ +1593 │ │ │ │ │ +1594 // temporary grid information │ │ │ │ │ +_1_5_9_5 int _n_c_e_l_l_s; │ │ │ │ │ +_1_5_9_6 int _n_v_e_r_t_i_c_e_s; │ │ │ │ │ +_1_5_9_7 int _n_c_o_r_n_e_r_s; │ │ │ │ │ +1598 private: │ │ │ │ │ +1599 _V_e_r_t_e_x_M_a_p_p_e_r* vertexmapper; │ │ │ │ │ +1600 // in conforming mode, for each vertex id (as obtained by vertexmapper) │ │ │ │ │ +1601 // hold its number in the iteration order (VertexIterator) │ │ │ │ │ +1602 std::vector number; │ │ │ │ │ +1603 _V_T_K_:_:_D_a_t_a_M_o_d_e datamode; │ │ │ │ │ +1604 _V_T_K_:_:_P_r_e_c_i_s_i_o_n coordPrec; │ │ │ │ │ +1605 │ │ │ │ │ +1606 // true if polyhedral cells are present in the grid │ │ │ │ │ +1607 const bool polyhedralCellsPresent_; │ │ │ │ │ +1608 │ │ │ │ │ +1609 // pointer holding face vertex connectivity if needed │ │ │ │ │ +1610 std::shared_ptr< std::pair< std::vector, std::vector > > │ │ │ │ │ +faceVertices_; │ │ │ │ │ +1611 │ │ │ │ │ +1612 protected: │ │ │ │ │ +_1_6_1_3 _V_T_K_:_:_O_u_t_p_u_t_T_y_p_e _o_u_t_p_u_t_t_y_p_e; │ │ │ │ │ +1614 }; │ │ │ │ │ +1615 │ │ │ │ │ +1616} │ │ │ │ │ +1617 │ │ │ │ │ +1618#endif │ │ │ │ │ +_m_c_m_g_m_a_p_p_e_r_._h_h │ │ │ │ │ +Mapper for multiple codim and multiple geometry types. │ │ │ │ │ +_g_r_i_d_e_n_u_m_s_._h_h │ │ │ │ │ +_c_o_m_m_o_n_._h_h │ │ │ │ │ +Common stuff for the VTKWriter. │ │ │ │ │ +_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 │ │ │ │ │ +_s_t_r_e_a_m_s_._h_h │ │ │ │ │ +_f_u_n_c_t_i_o_n_._h_h │ │ │ │ │ +Functions for VTK output. │ │ │ │ │ +_p_v_t_u_w_r_i_t_e_r_._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_:_:_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:177 │ │ │ │ │ +_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:273 │ │ │ │ │ +_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:134 │ │ │ │ │ +_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:131 │ │ │ │ │ +_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:137 │ │ │ │ │ +_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_:_:_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:88 │ │ │ │ │ -_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:82 │ │ │ │ │ -_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:28 │ │ │ │ │ -_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:50 │ │ │ │ │ -_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:40 │ │ │ │ │ -_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:55 │ │ │ │ │ -_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:34 │ │ │ │ │ -_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: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_:_:_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:63 │ │ │ │ │ -_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:64 │ │ │ │ │ -_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:66 │ │ │ │ │ +_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:104 │ │ │ │ │ +_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 output 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 output 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:1230 │ │ │ │ │ +_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:1589 │ │ │ │ │ +_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:1217 │ │ │ │ │ +_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:1445 │ │ │ │ │ +_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:1337 │ │ │ │ │ +_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:1239 │ │ │ │ │ +_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:1613 │ │ │ │ │ +_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:1389 │ │ │ │ │ +_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:1592 │ │ │ │ │ +_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:1459 │ │ │ │ │ +_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:1498 │ │ │ │ │ +_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:1588 │ │ │ │ │ +_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:1268 │ │ │ │ │ +_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:1365 │ │ │ │ │ +_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:1351 │ │ │ │ │ +_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:1596 │ │ │ │ │ +_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:1539 │ │ │ │ │ +_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:1295 │ │ │ │ │ +_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_n_c_e_l_l_s │ │ │ │ │ +int ncells │ │ │ │ │ +DDeeffiinniittiioonn vtkwriter.hh:1595 │ │ │ │ │ +_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:1597 │ │ │ │ │ +_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/a00797.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: general.cc File Reference │ │ │ │ +dune-grid: vtksequencewriterbase.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,32 +65,47 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ +Classes | │ │ │ │ Namespaces
│ │ │ │ -
general.cc File Reference
│ │ │ │ +
vtksequencewriterbase.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ +
#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::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,20 +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 │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -general.cc File Reference │ │ │ │ │ -#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> │ │ │ │ │ + * _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 │ │ │ │ │ +#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_:_:_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.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: boundaryseg.cc File Reference │ │ │ │ +dune-grid: function.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,33 +65,59 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ +Classes | │ │ │ │ Namespaces
│ │ │ │ -
boundaryseg.cc File Reference
│ │ │ │ +
function.hh 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...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ Namespaces

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

Detailed Description

│ │ │ │ +

Functions for VTK output.

│ │ │ │ +
Author
Peter Bastian, Christian Engwer
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,20 +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 │ │ │ │ │ -boundaryseg.cc File Reference │ │ │ │ │ -#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> │ │ │ │ │ + * _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/a00803.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/a00803_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 © 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:62
│ │ │ │ -
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 © 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_._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_:_:_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:62 │ │ │ │ │ -_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/a00806.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: simplex.hh File Reference │ │ │ │ +dune-grid: volumewriter.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,41 +65,43 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
simplex.hh File Reference
│ │ │ │ +
volumewriter.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <iostream>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/basic.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

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

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
namespace  Dune::VTK
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,26 +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 │ │ │ │ │ -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> │ │ │ │ │ +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 │ │ │ │ │ -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_:_:_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/a00806_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: simplex.hh Source File │ │ │ │ +dune-grid: volumewriter.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,102 +70,136 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
simplex.hh
│ │ │ │ +
volumewriter.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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>
│ │ │ │ +
5
│ │ │ │ +
6#ifndef DUNE_GRID_IO_FILE_VTK_VOLUMEWRITER_HH
│ │ │ │ +
7#define DUNE_GRID_IO_FILE_VTK_VOLUMEWRITER_HH
│ │ │ │ +
8
│ │ │ │ +
9#include <memory>
│ │ │ │
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
│ │ │ │ +
16namespace Dune {
│ │ │ │ +
19
│ │ │ │ +
20 namespace VTK {
│ │ │ │ +
21
│ │ │ │ +
22 template<typename GV>
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
25 public BasicWriter<ConformingVolumeIteratorFactory<GV> >
│ │ │ │ +
26 {
│ │ │ │ + │ │ │ │ + │ │ │ │
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
│ │ │ │ - │ │ │ │ +
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
│ │ │ │ -
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:145
│ │ │ │ -
int get(std ::vector< std ::vector< unsigned int > > &simplex, std ::vector< std ::vector< double > > &params, int &nofp)
Definition simplex.cc:68
│ │ │ │ -
int nofsimplex()
Definition simplex.hh:49
│ │ │ │ -
bool ok()
Definition simplex.hh:44
│ │ │ │ +
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,107 +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 │ │ │ │ │ -simplex.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 © 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 │ │ │ │ │ +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_/_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{ │ │ │ │ │ +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 │ │ │ │ │ -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 │ │ │ │ │ +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 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 │ │ │ │ │ +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)); │ │ │ │ │ +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 │ │ │ │ │ +_b_a_s_i_c_w_r_i_t_e_r_._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 │ │ │ │ │ _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:145 │ │ │ │ │ -_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:68 │ │ │ │ │ -_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_:_:_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/a00809.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: simplex.cc File Reference │ │ │ │ +dune-grid: skeletonfunction.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,33 +65,59 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ +Classes | │ │ │ │ Namespaces
│ │ │ │ -
simplex.cc File Reference
│ │ │ │ +
skeletonfunction.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ + │ │ │ │ +

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,20 +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 │ │ │ │ │ -simplex.cc File Reference │ │ │ │ │ -#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> │ │ │ │ │ + * _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/a00812.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: gridparameter.hh File Reference │ │ │ │ +dune-grid: corneriterator.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,42 +65,44 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
gridparameter.hh File Reference
│ │ │ │ +
corneriterator.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <iostream>
│ │ │ │ -#include <string>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/basic.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.

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

│ │ │ │ Classes

class  Dune::dgf::GridParameterBlock
 Common Grid parameters. More...
class  Dune::VTK::CornerIterator< CellIterator >
 iterate over the corners of some cell range More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
namespace  Dune::VTK
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,27 +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 │ │ │ │ │ - * _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> │ │ │ │ │ +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_:_:_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_._._. │ │ │ │ │ +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_:_:_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_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: gridparameter.hh Source File │ │ │ │ +dune-grid: corneriterator.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,151 +70,170 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
gridparameter.hh
│ │ │ │ +
corneriterator.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_CORNERITERATOR_HH
│ │ │ │ +
7#define DUNE_GRID_IO_FILE_VTK_CORNERITERATOR_HH
│ │ │ │ +
8
│ │ │ │ +
9#include <iterator>
│ │ │ │
10
│ │ │ │ - │ │ │ │ -
12
│ │ │ │ +
11#include <dune/common/iteratorfacades.hh>
│ │ │ │ +
12#include <dune/common/typetraits.hh>
│ │ │ │
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 static const Flags foundCompatible = 1 << 13;
│ │ │ │ -
43
│ │ │ │ -
44 protected:
│ │ │ │ -
45 Flags foundFlags_; // supportFlags, this block was created with
│ │ │ │ -
46 std::string name_; // name of the grid
│ │ │ │ -
47 std::string dumpFileName_; // name of the grid
│ │ │ │ -
48 bool markLongestEdge_; // Mark longest edge for AlbertaGrid or ALUGrid
│ │ │ │ -
49 bool bisectionCompatibility_; // true if grid is compatible (bisection refinement works)
│ │ │ │ -
50
│ │ │ │ -
51 private:
│ │ │ │ -
52 // copy not implemented
│ │ │ │ - │ │ │ │ -
54
│ │ │ │ -
55 public:
│ │ │ │ -
57 GridParameterBlock ( std::istream &in );
│ │ │ │ -
58
│ │ │ │ -
│ │ │ │ -
60 const std::string &name ( const std::string &defaultValue ) const
│ │ │ │ -
61 {
│ │ │ │ -
62 if( (foundFlags_ & foundName) == 0 )
│ │ │ │ -
63 {
│ │ │ │ -
64 dwarn << "GridParameterBlock: Parameter 'name' not specified, "
│ │ │ │ -
65 << "defaulting to '" << defaultValue << "'." << std::endl;
│ │ │ │ -
66 return defaultValue;
│ │ │ │ -
67 }
│ │ │ │ -
68 else
│ │ │ │ -
69 return name_;
│ │ │ │ -
70 }
│ │ │ │ -
│ │ │ │ -
71
│ │ │ │ -
│ │ │ │ -
72 const std::string &dumpFileName ( ) const
│ │ │ │ -
73 {
│ │ │ │ -
74 if( (foundFlags_ & foundDumpFileName) != 0 )
│ │ │ │ -
75 {
│ │ │ │ -
76 dwarn << "GridParameterBlock: found Parameter 'dumpfilename', "
│ │ │ │ -
77 << "dumping file to `" << dumpFileName_ << "'" << std::endl;
│ │ │ │ -
78 }
│ │ │ │ -
79 return dumpFileName_;
│ │ │ │ -
80 }
│ │ │ │ -
│ │ │ │ -
81
│ │ │ │ -
│ │ │ │ -
83 bool markLongestEdge () const
│ │ │ │ -
84 {
│ │ │ │ -
85 if( (foundFlags_ & foundLongestEdge) == 0 )
│ │ │ │ -
86 {
│ │ │ │ -
87 dwarn << "GridParameterBlock: Parameter 'refinementedge' not specified, "
│ │ │ │ -
88 << "defaulting to 'ARBITRARY'." << std::endl;
│ │ │ │ -
89 }
│ │ │ │ -
90 return markLongestEdge_;
│ │ │ │ -
91 }
│ │ │ │ -
│ │ │ │ -
92
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
95 {
│ │ │ │ -
96 if( (foundFlags_ & foundCompatible) == 0 )
│ │ │ │ -
97 {
│ │ │ │ -
98 dwarn << "GridParameterBlock: Parameter 'bisectioncompatibility' not specified, "
│ │ │ │ -
99 << "defaulting to '0' (false)." << std::endl;
│ │ │ │ -
100 }
│ │ │ │ - │ │ │ │ -
102 }
│ │ │ │ +
14#include <dune/geometry/referenceelements.hh>
│ │ │ │ +
15
│ │ │ │ + │ │ │ │ +
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 }
│ │ │ │
│ │ │ │ -
103
│ │ │ │ -
104 // some information
│ │ │ │ +
98
│ │ │ │ +
100
│ │ │ │
│ │ │ │ -
105 bool ok()
│ │ │ │ -
106 {
│ │ │ │ -
107 return true;
│ │ │ │ -
108 }
│ │ │ │ -
│ │ │ │ -
109 };
│ │ │ │ -
│ │ │ │ -
110
│ │ │ │ -
111
│ │ │ │ -
112 } // end namespace dgf
│ │ │ │ -
113
│ │ │ │ -
114} // end namespace Dune
│ │ │ │ +
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
│ │ │ │ -
116#endif
│ │ │ │ - │ │ │ │ +
│ │ │ │ +
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
│ │ │ │ + │ │ │ │
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:72
│ │ │ │ -
static const Flags foundName
Definition gridparameter.hh:39
│ │ │ │ -
GridParameterBlock(std::istream &in)
constructor: read common parameters
│ │ │ │ -
static const Flags foundCompatible
Definition gridparameter.hh:42
│ │ │ │ -
unsigned int Flags
Definition gridparameter.hh:37
│ │ │ │ -
bool bisectionCompatibility_
Definition gridparameter.hh:49
│ │ │ │ -
std::string dumpFileName_
Definition gridparameter.hh:47
│ │ │ │ -
bool ok()
Definition gridparameter.hh:105
│ │ │ │ -
Flags foundFlags_
Definition gridparameter.hh:45
│ │ │ │ -
const std::string & name(const std::string &defaultValue) const
return the name of the grid
Definition gridparameter.hh:60
│ │ │ │ -
std::string name_
Definition gridparameter.hh:46
│ │ │ │ -
bool bisectionCompatibility() const
returns true if grid is compatible for bisection refinement
Definition gridparameter.hh:94
│ │ │ │ -
bool markLongestEdge() const
returns true if longest edge should be marked for AlbertaGrid
Definition gridparameter.hh:83
│ │ │ │ -
static const Flags foundLongestEdge
Definition gridparameter.hh:41
│ │ │ │ -
bool markLongestEdge_
Definition gridparameter.hh:48
│ │ │ │ +
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
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,174 +2,197 @@ │ │ │ │ │ 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 │ │ │ │ │ +corneriterator.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 © 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_CORNERITERATOR_HH │ │ │ │ │ +7#define DUNE_GRID_IO_FILE_VTK_CORNERITERATOR_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 │ │ │ │ │ +11#include │ │ │ │ │ +12#include │ │ │ │ │ 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; │ │ │ │ │ -_4_2 static const _F_l_a_g_s _f_o_u_n_d_C_o_m_p_a_t_i_b_l_e = 1 << 13; │ │ │ │ │ -43 │ │ │ │ │ -44 protected: │ │ │ │ │ -_4_5 _F_l_a_g_s _f_o_u_n_d_F_l_a_g_s__; // supportFlags, this block was created with │ │ │ │ │ -_4_6 std::string _n_a_m_e__; // name of the grid │ │ │ │ │ -_4_7 std::string _d_u_m_p_F_i_l_e_N_a_m_e__; // name of the grid │ │ │ │ │ -_4_8 bool _m_a_r_k_L_o_n_g_e_s_t_E_d_g_e__; // Mark longest edge for AlbertaGrid or ALUGrid │ │ │ │ │ -_4_9 bool _b_i_s_e_c_t_i_o_n_C_o_m_p_a_t_i_b_i_l_i_t_y__; // true if grid is compatible (bisection │ │ │ │ │ -refinement works) │ │ │ │ │ -50 │ │ │ │ │ -51 private: │ │ │ │ │ -52 // copy not implemented │ │ │ │ │ -53 _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&); │ │ │ │ │ -54 │ │ │ │ │ -55 public: │ │ │ │ │ -_5_7 _G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k ( std::istream &in ); │ │ │ │ │ -58 │ │ │ │ │ -_6_0 const std::string &_n_a_m_e ( const std::string &defaultValue ) const │ │ │ │ │ -61 { │ │ │ │ │ -62 if( (_f_o_u_n_d_F_l_a_g_s__ & _f_o_u_n_d_N_a_m_e) == 0 ) │ │ │ │ │ -63 { │ │ │ │ │ -64 dwarn << "GridParameterBlock: Parameter 'name' not specified, " │ │ │ │ │ -65 << "defaulting to '" << defaultValue << "'." << std::endl; │ │ │ │ │ -66 return defaultValue; │ │ │ │ │ +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> │ │ │ │ │ +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 else │ │ │ │ │ -69 return _n_a_m_e__; │ │ │ │ │ -70 } │ │ │ │ │ -71 │ │ │ │ │ -_7_2 const std::string &_d_u_m_p_F_i_l_e_N_a_m_e ( ) const │ │ │ │ │ -73 { │ │ │ │ │ -74 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 ) │ │ │ │ │ -75 { │ │ │ │ │ -76 dwarn << "GridParameterBlock: found Parameter 'dumpfilename', " │ │ │ │ │ -77 << "dumping file to `" << _d_u_m_p_F_i_l_e_N_a_m_e__ << "'" << std::endl; │ │ │ │ │ -78 } │ │ │ │ │ -79 return _d_u_m_p_F_i_l_e_N_a_m_e__; │ │ │ │ │ -80 } │ │ │ │ │ -81 │ │ │ │ │ -_8_3 bool _m_a_r_k_L_o_n_g_e_s_t_E_d_g_e () const │ │ │ │ │ -84 { │ │ │ │ │ -85 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 ) │ │ │ │ │ -86 { │ │ │ │ │ -87 dwarn << "GridParameterBlock: Parameter 'refinementedge' not specified, " │ │ │ │ │ -88 << "defaulting to 'ARBITRARY'." << std::endl; │ │ │ │ │ -89 } │ │ │ │ │ -90 return _m_a_r_k_L_o_n_g_e_s_t_E_d_g_e__; │ │ │ │ │ -91 } │ │ │ │ │ -92 │ │ │ │ │ -_9_4 bool _b_i_s_e_c_t_i_o_n_C_o_m_p_a_t_i_b_i_l_i_t_y() const │ │ │ │ │ -95 { │ │ │ │ │ -96 if( (_f_o_u_n_d_F_l_a_g_s__ & _f_o_u_n_d_C_o_m_p_a_t_i_b_l_e) == 0 ) │ │ │ │ │ -97 { │ │ │ │ │ -98 dwarn << "GridParameterBlock: Parameter 'bisectioncompatibility' not │ │ │ │ │ -specified, " │ │ │ │ │ -99 << "defaulting to '0' (false)." << std::endl; │ │ │ │ │ -100 } │ │ │ │ │ -101 return _b_i_s_e_c_t_i_o_n_C_o_m_p_a_t_i_b_i_l_i_t_y__; │ │ │ │ │ -102 } │ │ │ │ │ -103 │ │ │ │ │ -104 // some information │ │ │ │ │ -_1_0_5 bool _o_k() │ │ │ │ │ -106 { │ │ │ │ │ -107 return true; │ │ │ │ │ -108 } │ │ │ │ │ -109 }; │ │ │ │ │ -110 │ │ │ │ │ -111 │ │ │ │ │ -112 } // end namespace dgf │ │ │ │ │ -113 │ │ │ │ │ -114} // end namespace Dune │ │ │ │ │ +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 │ │ │ │ │ -116#endif │ │ │ │ │ -_b_a_s_i_c_._h_h │ │ │ │ │ +_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 │ │ │ │ │ _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:72 │ │ │ │ │ -_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 common 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_o_u_n_d_C_o_m_p_a_t_i_b_l_e │ │ │ │ │ -static const Flags foundCompatible │ │ │ │ │ -DDeeffiinniittiioonn gridparameter.hh:42 │ │ │ │ │ -_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_:_:_b_i_s_e_c_t_i_o_n_C_o_m_p_a_t_i_b_i_l_i_t_y__ │ │ │ │ │ -bool bisectionCompatibility_ │ │ │ │ │ -DDeeffiinniittiioonn gridparameter.hh:49 │ │ │ │ │ -_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:47 │ │ │ │ │ -_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:105 │ │ │ │ │ -_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: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_:_:_n_a_m_e │ │ │ │ │ -const std::string & name(const std::string &defaultValue) const │ │ │ │ │ -return the name of the grid │ │ │ │ │ -DDeeffiinniittiioonn gridparameter.hh:60 │ │ │ │ │ -_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: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_:_:_b_i_s_e_c_t_i_o_n_C_o_m_p_a_t_i_b_i_l_i_t_y │ │ │ │ │ -bool bisectionCompatibility() const │ │ │ │ │ -returns true if grid is compatible for bisection refinement │ │ │ │ │ -DDeeffiinniittiioonn gridparameter.hh:94 │ │ │ │ │ -_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:83 │ │ │ │ │ -_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:48 │ │ │ │ │ +_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 │ │ │ │ │ =============================================================================== │ │ │ │ │ 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: pvtuwriter.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,40 +65,44 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
dim.hh File Reference
│ │ │ │ +
pvtuwriter.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <iostream>
│ │ │ │ -#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>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::dgf::DimBlock
class  Dune::VTK::PVTUWriter
 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,25 +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 │ │ │ │ │ - * _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> │ │ │ │ │ +pvtuwriter.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> │ │ │ │ │ _G_o_ _t_o_ _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_:_:_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_:_:_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: pvtuwriter.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,79 +70,197 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dim.hh
│ │ │ │ +
pvtuwriter.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │ - │ │ │ │ +
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
│ │ │ │ -
13namespace Dune
│ │ │ │ -
14{
│ │ │ │ -
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
│ │ │ │ -
41
│ │ │ │ -
42#endif
│ │ │ │ - │ │ │ │ +
12#include <dune/common/exceptions.hh>
│ │ │ │ +
13#include <dune/common/indent.hh>
│ │ │ │ +
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();
│ │ │ │ +
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
│ │ │ │ +
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
│ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ +
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,76 +2,224 @@ │ │ │ │ │ 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 │ │ │ │ │ +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 © 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> │ │ │ │ │ +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 │ │ │ │ │ -13namespace _D_u_n_e │ │ │ │ │ -14{ │ │ │ │ │ -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 │ │ │ │ │ -41 │ │ │ │ │ -42#endif │ │ │ │ │ -_b_a_s_i_c_._h_h │ │ │ │ │ +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 │ │ │ │ │ +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 │ │ │ │ │ +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 │ │ │ │ │ +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_:_:_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_:_:_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/a00818.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: periodicfacetrans.cc File Reference │ │ │ │ +dune-grid: functionwriter.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,31 +65,69 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ +Classes | │ │ │ │ Namespaces
│ │ │ │ -
periodicfacetrans.cc File Reference
│ │ │ │ +
functionwriter.hh 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...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
namespace  Dune::VTK
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,20 +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 │ │ │ │ │ - * _b_l_o_c_k_s │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -periodicfacetrans.cc File Reference │ │ │ │ │ -#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 │ │ │ │ │ +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_:_:_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/a00821.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: cube.cc File Reference │ │ │ │ +dune-grid: b64enc.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,33 +65,54 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ +Classes | │ │ │ │ Namespaces
│ │ │ │ -
cube.cc File Reference
│ │ │ │ +
b64enc.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/grid/io/file/dgfparser/blocks/cube.hh>
│ │ │ │ -
│ │ │ │ + │ │ │ │ +

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

│ │ │ │ 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,20 +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 │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -cube.cc File Reference │ │ │ │ │ -#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> │ │ │ │ │ + * _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_._._. │ │ │ │ │ +  │ │ │ │ │ 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/a00824.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: general.hh File Reference │ │ │ │ +dune-grid: gmshwriter.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,42 +65,48 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
general.hh File Reference
│ │ │ │ +
gmshwriter.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <iostream>
│ │ │ │ +
#include <fstream>
│ │ │ │ +#include <iostream>
│ │ │ │ +#include <iomanip>
│ │ │ │ +#include <string>
│ │ │ │ #include <vector>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │ │ +#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>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::dgf::GeneralBlock
class  Dune::GmshWriter< GridView >
 Write Gmsh mesh file. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,26 +2,30 @@ │ │ │ │ │ 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 │ │ │ │ │ -general.hh File Reference │ │ │ │ │ +gmshwriter.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_/_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_:_:_d_g_f_:_:_G_e_n_e_r_a_l_B_l_o_c_k │ │ │ │ │ +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_:_:_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: general.hh Source File │ │ │ │ +dune-grid: gmshwriter.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,98 +70,240 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
general.hh
│ │ │ │ +
gmshwriter.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │ +
5#ifndef DUNE_GRID_IO_FILE_GMSHWRITER_HH
│ │ │ │ +
6#define DUNE_GRID_IO_FILE_GMSHWRITER_HH
│ │ │ │
7
│ │ │ │ -
8#include <iostream>
│ │ │ │ -
9#include <vector>
│ │ │ │ -
10
│ │ │ │ - │ │ │ │ -
12
│ │ │ │ +
8#include <fstream>
│ │ │ │ +
9#include <iostream>
│ │ │ │ +
10#include <iomanip>
│ │ │ │ +
11#include <string>
│ │ │ │ +
12#include <vector>
│ │ │ │
13
│ │ │ │ -
14namespace Dune
│ │ │ │ -
15{
│ │ │ │ -
16
│ │ │ │ -
17 namespace dgf
│ │ │ │ -
18 {
│ │ │ │ +
14#include <dune/common/exceptions.hh>
│ │ │ │ +
15#include <dune/geometry/type.hh>
│ │ │ │ +
16#include <dune/geometry/referenceelements.hh>
│ │ │ │ + │ │ │ │ + │ │ │ │
19
│ │ │ │ -
20 // GeneralBlock
│ │ │ │ -
21 // ---------
│ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ +
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 {
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ +
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:177
│ │ │ │ +
int size(int codim) const
obtain number of entities in a given codimension
Definition common/gridview.hh:183
│ │ │ │ +
static constexpr int dimension
The dimension of the grid.
Definition common/gridview.hh:134
│ │ │ │ +
static constexpr int dimensionworld
The dimension of the world the grid lives in.
Definition common/gridview.hh:137
│ │ │ │ +
MCMGLayout mcmgElementLayout()
layout for elements (codim-0 entities)
Definition mcmgmapper.hh:97
│ │ │ │
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:100
│ │ │ │ -
bool ok()
Definition general.hh:41
│ │ │ │ +
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,99 +2,292 @@ │ │ │ │ │ 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 │ │ │ │ │ +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 © 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 │ │ │ │ │ +5#ifndef DUNE_GRID_IO_FILE_GMSHWRITER_HH │ │ │ │ │ +6#define DUNE_GRID_IO_FILE_GMSHWRITER_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 │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10#include │ │ │ │ │ +11#include │ │ │ │ │ +12#include │ │ │ │ │ 13 │ │ │ │ │ -14namespace _D_u_n_e │ │ │ │ │ -15{ │ │ │ │ │ -16 │ │ │ │ │ -17 namespace dgf │ │ │ │ │ -18 { │ │ │ │ │ +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 │ │ │ │ │ -20 // GeneralBlock │ │ │ │ │ -21 // --------- │ │ │ │ │ -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 } │ │ │ │ │ +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 │ │ │ │ │ -_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 │ │ │ │ │ +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 ++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 │ │ │ │ │ +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:177 │ │ │ │ │ +_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:183 │ │ │ │ │ +_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:134 │ │ │ │ │ +_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:137 │ │ │ │ │ +_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_:_:_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:100 │ │ │ │ │ -_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_:_:_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/a00827.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: interval.hh File Reference │ │ │ │ +dune-grid: starcdreader.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,51 +65,44 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces | │ │ │ │ -Functions
│ │ │ │ -
interval.hh File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
starcdreader.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <iostream>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <array>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │ │ +
#include <dune/common/exceptions.hh>
│ │ │ │ +#include <dune/geometry/type.hh>
│ │ │ │ +#include <dune/grid/common/gridfactory.hh>
│ │ │ │ +#include <iostream>
│ │ │ │ +#include <fstream>
│ │ │ │ +#include <memory>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

struct  Dune::dgf::IntervalBlock
 
struct  Dune::dgf::IntervalBlock::Interval
class  Dune::StarCDReader< GridType >
 File reader for the Star-CD format. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ Namespaces

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

│ │ │ │ -Functions

std::ostream & Dune::dgf::operator<< (std::ostream &out, const IntervalBlock::Interval &interval)
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,33 +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 │ │ │ │ │ - * _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 │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +starcdreader.hh File Reference │ │ │ │ │ +#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 │ │ │ │ │ -#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 │ │ │ │ │ _G_o_ _t_o_ _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 │ │ │ │ │ +class   _D_u_n_e_:_:_S_t_a_r_C_D_R_e_a_d_e_r_<_ _G_r_i_d_T_y_p_e_ _> │ │ │ │ │ +  File reader for the Star-CD 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 _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/a00827_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: interval.hh Source File │ │ │ │ +dune-grid: starcdreader.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,210 +70,180 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
interval.hh
│ │ │ │ +
starcdreader.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │ +
5#ifndef DUNE_STARCD_READER_HH
│ │ │ │ +
6#define DUNE_STARCD_READER_HH
│ │ │ │
7
│ │ │ │ -
8#include <iostream>
│ │ │ │ -
9#include <vector>
│ │ │ │ -
10#include <array>
│ │ │ │ -
11
│ │ │ │ - │ │ │ │ -
13
│ │ │ │ -
14
│ │ │ │ -
15namespace Dune
│ │ │ │ -
16{
│ │ │ │ +
8#include <dune/common/exceptions.hh>
│ │ │ │ +
9
│ │ │ │ +
10#include <dune/geometry/type.hh>
│ │ │ │ + │ │ │ │ +
12#include <iostream>
│ │ │ │ +
13#include <fstream>
│ │ │ │ +
14#include <memory>
│ │ │ │ +
15
│ │ │ │ +
16namespace Dune {
│ │ │ │
17
│ │ │ │ -
18 namespace dgf
│ │ │ │ -
19 {
│ │ │ │ -
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 );
│ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ +
51 template <class GridType>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
53
│ │ │ │ +
54 public:
│ │ │ │ +
55
│ │ │ │ +
│ │ │ │ +
65 static std::unique_ptr<GridType> read(const std::string& fileName, bool verbose = true)
│ │ │ │ +
66 {
│ │ │ │ +
67 // extract the grid dimension
│ │ │ │ +
68 const int dim = GridType::dimension;
│ │ │ │ +
69
│ │ │ │ +
70 // currently only dim = 3 is implemented
│ │ │ │ +
71 if (dim != 3)
│ │ │ │ +
72 DUNE_THROW(Dune::NotImplemented,
│ │ │ │ +
73 "Reading Star-CD format is not implemented for dimension " << dim);
│ │ │ │ +
74
│ │ │ │ +
75 // set up the grid factory
│ │ │ │ + │ │ │ │
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 // set the name of the vertex file
│ │ │ │ +
79 std::string vertexFileName = fileName + ".vrt";
│ │ │ │ +
80
│ │ │ │ +
81 // set the vertex input stream
│ │ │ │ +
82 std::ifstream vertexFile(vertexFileName.c_str());
│ │ │ │ +
83 if (!vertexFile)
│ │ │ │ +
84 DUNE_THROW(Dune::IOError, "Could not open " << vertexFileName);
│ │ │ │ +
85
│ │ │ │ +
86 // read the vertices
│ │ │ │ +
87 int dummyIdx;
│ │ │ │ +
88 int numberOfVertices = 0;
│ │ │ │ +
89 while (vertexFile >> dummyIdx) {
│ │ │ │ +
90 numberOfVertices++;
│ │ │ │ +
91
│ │ │ │ +
92 Dune::FieldVector<double,dim> position;
│ │ │ │ +
93
│ │ │ │ +
94 for (int k = 0; k < dim; k++)
│ │ │ │ +
95 vertexFile >> position[k];
│ │ │ │
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
│ │ │ │ -
144#endif
│ │ │ │ - │ │ │ │ +
97 factory.insertVertex(position);
│ │ │ │ +
98 }
│ │ │ │ +
99 if (verbose)
│ │ │ │ +
100 std::cout << numberOfVertices << " vertices read." << std::endl;
│ │ │ │ +
101
│ │ │ │ +
102 // set the name of the element file
│ │ │ │ +
103 std::string elementFileName = fileName + ".cel";
│ │ │ │ +
104
│ │ │ │ +
105 // set the element input stream
│ │ │ │ +
106 std::ifstream elementFile(elementFileName.c_str());
│ │ │ │ +
107 if (!elementFile)
│ │ │ │ +
108 DUNE_THROW(Dune::IOError, "Could not open " << elementFileName);
│ │ │ │ +
109
│ │ │ │ +
110 // read the elements
│ │ │ │ +
111 int numberOfElements = 0;
│ │ │ │ +
112 int numberOfSimplices = 0;
│ │ │ │ +
113 int numberOfPyramids = 0;
│ │ │ │ +
114 int numberOfPrisms = 0;
│ │ │ │ +
115 int numberOfCubes = 0;;
│ │ │ │ +
116 int maxNumberOfVertices = (int)pow(2, dim);
│ │ │ │ +
117 int isVolume = 1;
│ │ │ │ +
118 while (elementFile >> dummyIdx) {
│ │ │ │ +
119 std::vector<unsigned int> vertices(maxNumberOfVertices);
│ │ │ │ +
120 for (int k = 0; k < maxNumberOfVertices; k++)
│ │ │ │ +
121 elementFile >> vertices[k];
│ │ │ │ +
122
│ │ │ │ +
123 int boundaryId;
│ │ │ │ +
124 elementFile >> boundaryId;
│ │ │ │ +
125
│ │ │ │ +
126 int volumeOrSurface[2];
│ │ │ │ +
127 elementFile >> volumeOrSurface[0] >> volumeOrSurface[1];
│ │ │ │ +
128
│ │ │ │ +
129 if (volumeOrSurface[0] == isVolume) {
│ │ │ │ +
130 numberOfElements++;
│ │ │ │ +
131
│ │ │ │ +
132 if (vertices[2] == vertices[3]) { // simplex or prism
│ │ │ │ +
133 if (vertices[4] == vertices[5]) { // simplex
│ │ │ │ +
134 numberOfSimplices++;
│ │ │ │ +
135 std::vector<unsigned int> simplexVertices(4);
│ │ │ │ +
136 for (int k = 0; k < 3; k++)
│ │ │ │ +
137 simplexVertices[k] = vertices[k] - 1;
│ │ │ │ +
138 simplexVertices[3] = vertices[4] - 1;
│ │ │ │ +
139 factory.insertElement(Dune::GeometryTypes::tetrahedron, simplexVertices);
│ │ │ │ +
140 }
│ │ │ │ +
141 else { // prism
│ │ │ │ +
142 numberOfPrisms++;
│ │ │ │ +
143 std::vector<unsigned int> prismVertices(6);
│ │ │ │ +
144 for (int k = 0; k < 3; k++)
│ │ │ │ +
145 prismVertices[k] = vertices[k] - 1;
│ │ │ │ +
146 for (int k = 3; k < 6; k++)
│ │ │ │ +
147 prismVertices[k] = vertices[k+1] - 1;
│ │ │ │ +
148 factory.insertElement(Dune::GeometryTypes::prism, prismVertices);
│ │ │ │ +
149 }
│ │ │ │ +
150 }
│ │ │ │ +
151 else { // cube or pyramid
│ │ │ │ +
152 if (vertices[4] == vertices[5]) { // pyramid
│ │ │ │ +
153 numberOfPyramids++;
│ │ │ │ +
154 std::vector<unsigned int> pyramidVertices(5);
│ │ │ │ +
155 for (int k = 0; k < 5; k++)
│ │ │ │ +
156 pyramidVertices[k] = vertices[k] - 1;
│ │ │ │ +
157 factory.insertElement(Dune::GeometryTypes::pyramid, pyramidVertices);
│ │ │ │ +
158 }
│ │ │ │ +
159 else { // cube
│ │ │ │ +
160 numberOfCubes++;
│ │ │ │ +
161 std::vector<unsigned int> cubeVertices(8);
│ │ │ │ +
162 for (int k = 0; k < 8; k++)
│ │ │ │ +
163 cubeVertices[k] = vertices[k] - 1;
│ │ │ │ +
164 std::swap(cubeVertices[2], cubeVertices[3]);
│ │ │ │ +
165 std::swap(cubeVertices[6], cubeVertices[7]);
│ │ │ │ +
166 factory.insertElement(Dune::GeometryTypes::hexahedron, cubeVertices);
│ │ │ │ +
167 }
│ │ │ │ +
168 }
│ │ │ │ +
169 }
│ │ │ │ +
170 }
│ │ │ │ +
171 if (verbose)
│ │ │ │ +
172 std::cout << numberOfElements << " elements read: "
│ │ │ │ +
173 << numberOfSimplices << " simplices, " << numberOfPyramids << " pyramids, "
│ │ │ │ +
174 << numberOfPrisms << " prisms, " << numberOfCubes << " cubes." << std::endl;
│ │ │ │ +
175
│ │ │ │ +
176 // finish off the construction of the grid object
│ │ │ │ +
177 if (verbose)
│ │ │ │ +
178 std::cout << "Starting createGrid() ... " << std::flush;
│ │ │ │ +
179
│ │ │ │ +
180 return factory.createGrid();
│ │ │ │ +
181
│ │ │ │ +
182 }
│ │ │ │ +
│ │ │ │ +
183
│ │ │ │ +
184 };
│ │ │ │ +
│ │ │ │ +
185
│ │ │ │ +
186}
│ │ │ │ +
187
│ │ │ │ +
188#endif
│ │ │ │ +
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
│ │ │ │ -
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:83
│ │ │ │ -
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:121
│ │ │ │ -
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
│ │ │ │ +
Provide a generic factory class for unstructured grids.
Definition common/gridfactory.hh:275
│ │ │ │ +
virtual void insertElement(const GeometryType &type, const std::vector< unsigned int > &vertices)
Insert an element into the coarse grid.
Definition common/gridfactory.hh:307
│ │ │ │ +
virtual void insertVertex(const FieldVector< ctype, dimworld > &pos)
Insert a vertex into the coarse grid.
Definition common/gridfactory.hh:296
│ │ │ │ +
virtual std::unique_ptr< GridType > createGrid()
Finalize grid creation and hand over the grid.
Definition common/gridfactory.hh:333
│ │ │ │ +
File reader for the Star-CD format.
Definition starcdreader.hh:52
│ │ │ │ +
static std::unique_ptr< GridType > read(const std::string &fileName, bool verbose=true)
Read grid from a Star-CD file.
Definition starcdreader.hh:65
│ │ │ │ +
Provide a generic factory class for unstructured grids.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,220 +2,193 @@ │ │ │ │ │ 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 │ │ │ │ │ +starcdreader.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 © 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 │ │ │ │ │ +5#ifndef DUNE_STARCD_READER_HH │ │ │ │ │ +6#define DUNE_STARCD_READER_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{ │ │ │ │ │ +8#include │ │ │ │ │ +9 │ │ │ │ │ +10#include │ │ │ │ │ +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#include │ │ │ │ │ +13#include │ │ │ │ │ +14#include │ │ │ │ │ +15 │ │ │ │ │ +16namespace _D_u_n_e { │ │ │ │ │ 17 │ │ │ │ │ -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 { │ │ │ │ │ -_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 ); │ │ │ │ │ -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 } │ │ │ │ │ +51 template │ │ │ │ │ +_5_2 class _S_t_a_r_C_D_R_e_a_d_e_r { │ │ │ │ │ +53 │ │ │ │ │ +54 public: │ │ │ │ │ +55 │ │ │ │ │ +_6_5 static std::unique_ptr _r_e_a_d(const std::string& fileName, bool │ │ │ │ │ +verbose = true) │ │ │ │ │ +66 { │ │ │ │ │ +67 // extract the grid dimension │ │ │ │ │ +68 const int dim = GridType::dimension; │ │ │ │ │ +69 │ │ │ │ │ +70 // currently only dim = 3 is implemented │ │ │ │ │ +71 if (dim != 3) │ │ │ │ │ +72 DUNE_THROW(Dune::NotImplemented, │ │ │ │ │ +73 "Reading Star-CD format is not implemented for dimension " << dim); │ │ │ │ │ +74 │ │ │ │ │ +75 // set up the grid factory │ │ │ │ │ +76 _G_r_i_d_F_a_c_t_o_r_y_<_G_r_i_d_T_y_p_e_> factory; │ │ │ │ │ 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 // set the name of the vertex file │ │ │ │ │ +79 std::string vertexFileName = fileName + ".vrt"; │ │ │ │ │ +80 │ │ │ │ │ +81 // set the vertex input stream │ │ │ │ │ +82 std::ifstream vertexFile(vertexFileName.c_str()); │ │ │ │ │ +83 if (!vertexFile) │ │ │ │ │ +84 DUNE_THROW(Dune::IOError, "Could not open " << vertexFileName); │ │ │ │ │ +85 │ │ │ │ │ +86 // read the vertices │ │ │ │ │ +87 int dummyIdx; │ │ │ │ │ +88 int numberOfVertices = 0; │ │ │ │ │ +89 while (vertexFile >> dummyIdx) { │ │ │ │ │ +90 numberOfVertices++; │ │ │ │ │ +91 │ │ │ │ │ +92 Dune::FieldVector position; │ │ │ │ │ +93 │ │ │ │ │ +94 for (int k = 0; k < dim; k++) │ │ │ │ │ +95 vertexFile >> position[k]; │ │ │ │ │ 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#endif │ │ │ │ │ -_b_a_s_i_c_._h_h │ │ │ │ │ +97 factory._i_n_s_e_r_t_V_e_r_t_e_x(position); │ │ │ │ │ +98 } │ │ │ │ │ +99 if (verbose) │ │ │ │ │ +100 std::cout << numberOfVertices << " vertices read." << std::endl; │ │ │ │ │ +101 │ │ │ │ │ +102 // set the name of the element file │ │ │ │ │ +103 std::string elementFileName = fileName + ".cel"; │ │ │ │ │ +104 │ │ │ │ │ +105 // set the element input stream │ │ │ │ │ +106 std::ifstream elementFile(elementFileName.c_str()); │ │ │ │ │ +107 if (!elementFile) │ │ │ │ │ +108 DUNE_THROW(Dune::IOError, "Could not open " << elementFileName); │ │ │ │ │ +109 │ │ │ │ │ +110 // read the elements │ │ │ │ │ +111 int numberOfElements = 0; │ │ │ │ │ +112 int numberOfSimplices = 0; │ │ │ │ │ +113 int numberOfPyramids = 0; │ │ │ │ │ +114 int numberOfPrisms = 0; │ │ │ │ │ +115 int numberOfCubes = 0;; │ │ │ │ │ +116 int maxNumberOfVertices = (int)pow(2, dim); │ │ │ │ │ +117 int isVolume = 1; │ │ │ │ │ +118 while (elementFile >> dummyIdx) { │ │ │ │ │ +119 std::vector vertices(maxNumberOfVertices); │ │ │ │ │ +120 for (int k = 0; k < maxNumberOfVertices; k++) │ │ │ │ │ +121 elementFile >> vertices[k]; │ │ │ │ │ +122 │ │ │ │ │ +123 int boundaryId; │ │ │ │ │ +124 elementFile >> boundaryId; │ │ │ │ │ +125 │ │ │ │ │ +126 int volumeOrSurface[2]; │ │ │ │ │ +127 elementFile >> volumeOrSurface[0] >> volumeOrSurface[1]; │ │ │ │ │ +128 │ │ │ │ │ +129 if (volumeOrSurface[0] == isVolume) { │ │ │ │ │ +130 numberOfElements++; │ │ │ │ │ +131 │ │ │ │ │ +132 if (vertices[2] == vertices[3]) { // simplex or prism │ │ │ │ │ +133 if (vertices[4] == vertices[5]) { // simplex │ │ │ │ │ +134 numberOfSimplices++; │ │ │ │ │ +135 std::vector simplexVertices(4); │ │ │ │ │ +136 for (int k = 0; k < 3; k++) │ │ │ │ │ +137 simplexVertices[k] = vertices[k] - 1; │ │ │ │ │ +138 simplexVertices[3] = vertices[4] - 1; │ │ │ │ │ +139 factory._i_n_s_e_r_t_E_l_e_m_e_n_t(Dune::GeometryTypes::tetrahedron, simplexVertices); │ │ │ │ │ +140 } │ │ │ │ │ +141 else { // prism │ │ │ │ │ +142 numberOfPrisms++; │ │ │ │ │ +143 std::vector prismVertices(6); │ │ │ │ │ +144 for (int k = 0; k < 3; k++) │ │ │ │ │ +145 prismVertices[k] = vertices[k] - 1; │ │ │ │ │ +146 for (int k = 3; k < 6; k++) │ │ │ │ │ +147 prismVertices[k] = vertices[k+1] - 1; │ │ │ │ │ +148 factory._i_n_s_e_r_t_E_l_e_m_e_n_t(Dune::GeometryTypes::prism, prismVertices); │ │ │ │ │ +149 } │ │ │ │ │ +150 } │ │ │ │ │ +151 else { // cube or pyramid │ │ │ │ │ +152 if (vertices[4] == vertices[5]) { // pyramid │ │ │ │ │ +153 numberOfPyramids++; │ │ │ │ │ +154 std::vector pyramidVertices(5); │ │ │ │ │ +155 for (int k = 0; k < 5; k++) │ │ │ │ │ +156 pyramidVertices[k] = vertices[k] - 1; │ │ │ │ │ +157 factory._i_n_s_e_r_t_E_l_e_m_e_n_t(Dune::GeometryTypes::pyramid, pyramidVertices); │ │ │ │ │ +158 } │ │ │ │ │ +159 else { // cube │ │ │ │ │ +160 numberOfCubes++; │ │ │ │ │ +161 std::vector cubeVertices(8); │ │ │ │ │ +162 for (int k = 0; k < 8; k++) │ │ │ │ │ +163 cubeVertices[k] = vertices[k] - 1; │ │ │ │ │ +164 _s_t_d_:_:_s_w_a_p(cubeVertices[2], cubeVertices[3]); │ │ │ │ │ +165 _s_t_d_:_:_s_w_a_p(cubeVertices[6], cubeVertices[7]); │ │ │ │ │ +166 factory._i_n_s_e_r_t_E_l_e_m_e_n_t(Dune::GeometryTypes::hexahedron, cubeVertices); │ │ │ │ │ +167 } │ │ │ │ │ +168 } │ │ │ │ │ +169 } │ │ │ │ │ +170 } │ │ │ │ │ +171 if (verbose) │ │ │ │ │ +172 std::cout << numberOfElements << " elements read: " │ │ │ │ │ +173 << numberOfSimplices << " simplices, " << numberOfPyramids << " pyramids, " │ │ │ │ │ +174 << numberOfPrisms << " prisms, " << numberOfCubes << " cubes." << std:: │ │ │ │ │ +endl; │ │ │ │ │ +175 │ │ │ │ │ +176 // finish off the construction of the grid object │ │ │ │ │ +177 if (verbose) │ │ │ │ │ +178 std::cout << "Starting createGrid() ... " << std::flush; │ │ │ │ │ +179 │ │ │ │ │ +180 return factory._c_r_e_a_t_e_G_r_i_d(); │ │ │ │ │ +181 │ │ │ │ │ +182 } │ │ │ │ │ +183 │ │ │ │ │ +184 }; │ │ │ │ │ +185 │ │ │ │ │ +186} │ │ │ │ │ +187 │ │ │ │ │ +188#endif │ │ │ │ │ +_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_:_:_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:83 │ │ │ │ │ -_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:121 │ │ │ │ │ -_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_:_:_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ │ +Provide a generic factory class for unstructured grids. │ │ │ │ │ +DDeeffiinniittiioonn common/gridfactory.hh:275 │ │ │ │ │ +_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:307 │ │ │ │ │ +_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:296 │ │ │ │ │ +_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:333 │ │ │ │ │ +_D_u_n_e_:_:_S_t_a_r_C_D_R_e_a_d_e_r │ │ │ │ │ +File reader for the Star-CD format. │ │ │ │ │ +DDeeffiinniittiioonn starcdreader.hh:52 │ │ │ │ │ +_D_u_n_e_:_:_S_t_a_r_C_D_R_e_a_d_e_r_:_:_r_e_a_d │ │ │ │ │ +static std::unique_ptr< GridType > read(const std::string &fileName, bool │ │ │ │ │ +verbose=true) │ │ │ │ │ +Read grid from a Star-CD file. │ │ │ │ │ +DDeeffiinniittiioonn starcdreader.hh:65 │ │ │ │ │ +_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/a00830.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: polygon.hh File Reference │ │ │ │ +dune-grid: gmshreader.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,43 +65,83 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces
│ │ │ │ -
polygon.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Enumerations | │ │ │ │ +Functions
│ │ │ │ +
gmshreader.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <iostream>
│ │ │ │ +
#include <cstdarg>
│ │ │ │ +#include <cstdio>
│ │ │ │ +#include <cstring>
│ │ │ │ +#include <fstream>
│ │ │ │ +#include <iostream>
│ │ │ │ +#include <map>
│ │ │ │ +#include <memory>
│ │ │ │ +#include <string>
│ │ │ │ +#include <tuple>
│ │ │ │ #include <vector>
│ │ │ │ -#include <dune/common/typetraits.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │ │ +#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::dgf::PolygonBlock
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::dgf
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,27 +2,60 @@ │ │ │ │ │ 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 │ │ │ │ │ -polygon.hh File Reference │ │ │ │ │ +_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 <_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 <_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_:_:_d_g_f_:_:_P_o_l_y_g_o_n_B_l_o_c_k │ │ │ │ │ +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_:_:_d_g_f │ │ │ │ │ +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/a00830_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: polygon.hh Source File │ │ │ │ +dune-grid: gmshreader.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,95 +70,1198 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
polygon.hh
│ │ │ │ +
gmshreader.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │ -
7
│ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ -
48
│ │ │ │ -
49 protected:
│ │ │ │ - │ │ │ │ -
51 };
│ │ │ │ -
│ │ │ │ -
52
│ │ │ │ -
53 } // namespace dgf
│ │ │ │ -
54} // end namespace Dune
│ │ │ │ -
55
│ │ │ │ -
56#endif // #ifndef 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
│ │ │ │ +
6#ifndef DUNE_GMSHREADER_HH
│ │ │ │ +
7#define DUNE_GMSHREADER_HH
│ │ │ │ +
8
│ │ │ │ +
9#include <cstdarg>
│ │ │ │ +
10#include <cstdio>
│ │ │ │ +
11#include <cstring>
│ │ │ │ +
12#include <fstream>
│ │ │ │ +
13#include <iostream>
│ │ │ │ +
14#include <map>
│ │ │ │ +
15#include <memory>
│ │ │ │ +
16#include <string>
│ │ │ │ +
17#include <tuple>
│ │ │ │ +
18#include <vector>
│ │ │ │ +
19#include <utility>
│ │ │ │ +
20
│ │ │ │ +
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 };
│ │ │ │ +
│ │ │ │ +
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 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
│ │ │ │ +
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 std::vector<std::string> physical_entity_names;
│ │ │ │ +
318
│ │ │ │ +
319 // static data
│ │ │ │ +
320 static const int dim = GridType::dimension;
│ │ │ │ +
321 static const int dimWorld = GridType::dimensionworld;
│ │ │ │ +
322 static_assert( (dimWorld <= 3), "GmshReader requires dimWorld <= 3." );
│ │ │ │ +
323
│ │ │ │ +
324 // typedefs
│ │ │ │ +
325 typedef FieldVector< double, dimWorld > GlobalVector;
│ │ │ │ +
326
│ │ │ │ +
327 // don't use something like
│ │ │ │ +
328 // readfile(file, 1, "%s\n", buf);
│ │ │ │ +
329 // to skip the rest of of the line -- that will only skip the next
│ │ │ │ +
330 // whitespace-separated word! Use skipline() instead.
│ │ │ │ +
│ │ │ │ +
331 void readfile(FILE * file, int cnt, const char * format, ...)
│ │ │ │ +
332#ifdef __GNUC__
│ │ │ │ +
333 __attribute__((format(scanf, 4, 5)))
│ │ │ │ +
334#endif
│ │ │ │ +
335 {
│ │ │ │ +
336 std::va_list ap;
│ │ │ │ +
337 va_start(ap, format);
│ │ │ │ +
338 off_t pos = ftello(file);
│ │ │ │ +
339 int c = std::vfscanf(file, format, ap);
│ │ │ │ +
340 va_end(ap);
│ │ │ │ +
341 if (c != cnt)
│ │ │ │ +
342 DUNE_THROW(Dune::IOError, "Error parsing " << fileName << " "
│ │ │ │ +
343 "file pos " << pos
│ │ │ │ +
344 << ": Expected '" << format << "', only read " << c << " entries instead of " << cnt << ".");
│ │ │ │ +
345 }
│ │ │ │ +
│ │ │ │ +
346
│ │ │ │ +
347 // skip over the rest of the line, including the terminating newline
│ │ │ │ +
│ │ │ │ +
348 void skipline(FILE * file)
│ │ │ │ +
349 {
│ │ │ │ +
350 int c;
│ │ │ │ +
351 do {
│ │ │ │ +
352 c = std::fgetc(file);
│ │ │ │ +
353 } while(c != '\n' && c != EOF);
│ │ │ │ +
354 }
│ │ │ │ +
│ │ │ │ +
355
│ │ │ │ +
356 public:
│ │ │ │ +
357
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
359 factory(_factory), verbose(v), insert_boundary_segments(i) {}
│ │ │ │ +
│ │ │ │ +
360
│ │ │ │ +
│ │ │ │ +
361 std::vector<int> & boundaryIdMap()
│ │ │ │ +
362 {
│ │ │ │ + │ │ │ │ +
364 }
│ │ │ │ +
│ │ │ │ +
365
│ │ │ │ +
│ │ │ │ +
367 std::vector<int> & elementIndexMap()
│ │ │ │ +
368 {
│ │ │ │ + │ │ │ │ +
370 }
│ │ │ │ +
│ │ │ │ +
371
│ │ │ │ +
│ │ │ │ +
373 std::vector<std::string> & physicalEntityNames()
│ │ │ │ +
374 {
│ │ │ │ + │ │ │ │ +
376 }
│ │ │ │ +
│ │ │ │ +
377
│ │ │ │ +
│ │ │ │ +
378 void read (const std::string& f)
│ │ │ │ +
379 {
│ │ │ │ +
380 if (verbose) std::cout << "Reading " << dim << "d Gmsh grid..." << std::endl;
│ │ │ │ +
381
│ │ │ │ +
382 // open file name, we use C I/O
│ │ │ │ +
383 fileName = f;
│ │ │ │ +
384 FILE* file = fopen(fileName.c_str(),"rb");
│ │ │ │ +
385 if (file==0)
│ │ │ │ +
386 DUNE_THROW(Dune::IOError, "Could not open " << fileName);
│ │ │ │ +
387
│ │ │ │ +
388 //=========================================
│ │ │ │ +
389 // Header: Read vertices into vector
│ │ │ │ +
390 // Check vertices that are needed
│ │ │ │ +
391 //=========================================
│ │ │ │ +
392
│ │ │ │ + │ │ │ │ + │ │ │ │ +
395 element_count = 0;
│ │ │ │ +
396
│ │ │ │ +
397 // process header
│ │ │ │ +
398 double version_number;
│ │ │ │ +
399 int file_type, data_size;
│ │ │ │ +
400
│ │ │ │ +
401 readfile(file,1,"%s\n",buf);
│ │ │ │ +
402 if (strcmp(buf,"$MeshFormat")!=0)
│ │ │ │ +
403 DUNE_THROW(Dune::IOError, "expected $MeshFormat in first line");
│ │ │ │ +
404 readfile(file,3,"%lg %d %d\n",&version_number,&file_type,&data_size);
│ │ │ │ +
405 // 2.2 is not representable as float and leads to problems on i386
│ │ │ │ +
406 // Hence we use >= 2.00001.
│ │ │ │ +
407 if( (version_number < 2.0) || (version_number >= 2.20001) ) // 2.2 is not representable as float and leads to problems on i386
│ │ │ │ +
408 DUNE_THROW(Dune::IOError, "can only read Gmsh version 2 files");
│ │ │ │ +
409 if (verbose) std::cout << "version " << version_number << " Gmsh file detected" << std::endl;
│ │ │ │ +
410 readfile(file,1,"%s\n",buf);
│ │ │ │ +
411 if (strcmp(buf,"$EndMeshFormat")!=0)
│ │ │ │ +
412 DUNE_THROW(Dune::IOError, "expected $EndMeshFormat");
│ │ │ │ +
413
│ │ │ │ +
414 // physical name section
│ │ │ │ +
415 physical_entity_names.clear();
│ │ │ │ +
416 readfile(file,1,"%s\n",buf);
│ │ │ │ +
417 if (strcmp(buf,"$PhysicalNames")==0) {
│ │ │ │ +
418 int number_of_names;
│ │ │ │ +
419 readfile(file,1,"%d\n",&number_of_names);
│ │ │ │ +
420 if (verbose) std::cout << "file contains " << number_of_names << " physical entities" << std::endl;
│ │ │ │ +
421 physical_entity_names.resize(number_of_names);
│ │ │ │ +
422 std::string buf_name;
│ │ │ │ +
423 for( int i = 0; i < number_of_names; ++i ) {
│ │ │ │ +
424 int dim, id;
│ │ │ │ +
425 readfile(file,3, "%d %d %s\n", &dim, &id, buf);
│ │ │ │ +
426 buf_name.assign(buf);
│ │ │ │ +
427 auto begin = buf_name.find_first_of('\"') + 1;
│ │ │ │ +
428 auto end = buf_name.find_last_of('\"') - begin;
│ │ │ │ +
429 physical_entity_names[id-1].assign(buf_name.substr(begin, end));
│ │ │ │ +
430 }
│ │ │ │ +
431 readfile(file,1,"%s\n",buf);
│ │ │ │ +
432 if (strcmp(buf,"$EndPhysicalNames")!=0)
│ │ │ │ +
433 DUNE_THROW(Dune::IOError, "expected $EndPhysicalNames");
│ │ │ │ +
434 readfile(file,1,"%s\n",buf);
│ │ │ │ +
435 }
│ │ │ │ +
436
│ │ │ │ +
437 // node section
│ │ │ │ +
438 int number_of_nodes;
│ │ │ │ +
439
│ │ │ │ +
440 if (strcmp(buf,"$Nodes")!=0)
│ │ │ │ +
441 DUNE_THROW(Dune::IOError, "expected $Nodes");
│ │ │ │ +
442 readfile(file,1,"%d\n",&number_of_nodes);
│ │ │ │ +
443 if (verbose) std::cout << "file contains " << number_of_nodes << " nodes" << std::endl;
│ │ │ │ +
444
│ │ │ │ +
445 // read nodes
│ │ │ │ +
446 // The '+1' is due to the fact that gmsh numbers node starting from 1 rather than from 0
│ │ │ │ +
447 std::vector< GlobalVector > nodes( number_of_nodes+1 );
│ │ │ │ +
448 {
│ │ │ │ +
449 int id;
│ │ │ │ +
450 double x[ 3 ];
│ │ │ │ +
451 for( int i = 1; i <= number_of_nodes; ++i )
│ │ │ │ +
452 {
│ │ │ │ +
453 readfile(file,4, "%d %lg %lg %lg\n", &id, &x[ 0 ], &x[ 1 ], &x[ 2 ] );
│ │ │ │ +
454
│ │ │ │ +
455 if (id > number_of_nodes) {
│ │ │ │ +
456 DUNE_THROW(Dune::IOError,
│ │ │ │ +
457 "Only dense sequences of node indices are currently supported (node index "
│ │ │ │ +
458 << id << " is invalid).");
│ │ │ │ +
459 }
│ │ │ │ +
460
│ │ │ │ +
461 // just store node position
│ │ │ │ +
462 for( int j = 0; j < dimWorld; ++j )
│ │ │ │ +
463 nodes[ id ][ j ] = x[ j ];
│ │ │ │ +
464 }
│ │ │ │ +
465 readfile(file,1,"%s\n",buf);
│ │ │ │ +
466 if (strcmp(buf,"$EndNodes")!=0)
│ │ │ │ +
467 DUNE_THROW(Dune::IOError, "expected $EndNodes");
│ │ │ │ +
468 }
│ │ │ │ +
469
│ │ │ │ +
470 // element section
│ │ │ │ +
471 readfile(file,1,"%s\n",buf);
│ │ │ │ +
472 if (strcmp(buf,"$Elements")!=0)
│ │ │ │ +
473 DUNE_THROW(Dune::IOError, "expected $Elements");
│ │ │ │ +
474 int number_of_elements;
│ │ │ │ +
475 readfile(file,1,"%d\n",&number_of_elements);
│ │ │ │ +
476 if (verbose) std::cout << "file contains " << number_of_elements << " elements" << std::endl;
│ │ │ │ +
477
│ │ │ │ +
478 //=========================================
│ │ │ │ +
479 // Pass 1: Select and insert those vertices in the file that
│ │ │ │ +
480 // actually occur as corners of an element.
│ │ │ │ +
481 //=========================================
│ │ │ │ +
482
│ │ │ │ +
483 off_t section_element_offset = ftello(file);
│ │ │ │ +
484 std::map<int,unsigned int> renumber;
│ │ │ │ +
485 for (int i=1; i<=number_of_elements; i++)
│ │ │ │ +
486 {
│ │ │ │ +
487 int id, elm_type, number_of_tags;
│ │ │ │ +
488 readfile(file,3,"%d %d %d ",&id,&elm_type,&number_of_tags);
│ │ │ │ +
489 for (int k=1; k<=number_of_tags; k++)
│ │ │ │ +
490 {
│ │ │ │ +
491 int blub;
│ │ │ │ +
492 readfile(file,1,"%d ",&blub);
│ │ │ │ +
493 // k == 1: physical entity
│ │ │ │ +
494 // k == 2: elementary entity (not used here)
│ │ │ │ +
495 // if version_number < 2.2:
│ │ │ │ +
496 // k == 3: mesh partition 0
│ │ │ │ +
497 // else
│ │ │ │ +
498 // k == 3: number of mesh partitions
│ │ │ │ +
499 // k => 4: mesh partition k-4
│ │ │ │ +
500 }
│ │ │ │ +
501 pass1HandleElement(file, elm_type, renumber, nodes);
│ │ │ │ +
502 }
│ │ │ │ +
503 if (verbose) std::cout << "number of real vertices = " << number_of_real_vertices << std::endl;
│ │ │ │ +
504 if (verbose) std::cout << "number of boundary elements = " << boundary_element_count << std::endl;
│ │ │ │ +
505 if (verbose) std::cout << "number of elements = " << element_count << std::endl;
│ │ │ │ +
506 readfile(file,1,"%s\n",buf);
│ │ │ │ +
507 if (strcmp(buf,"$EndElements")!=0)
│ │ │ │ +
508 DUNE_THROW(Dune::IOError, "expected $EndElements");
│ │ │ │ + │ │ │ │ + │ │ │ │ +
511
│ │ │ │ +
512 //==============================================
│ │ │ │ +
513 // Pass 2: Insert boundary segments and elements
│ │ │ │ +
514 //==============================================
│ │ │ │ +
515
│ │ │ │ +
516 fseeko(file, section_element_offset, SEEK_SET);
│ │ │ │ + │ │ │ │ +
518 element_count = 0;
│ │ │ │ +
519 for (int i=1; i<=number_of_elements; i++)
│ │ │ │ +
520 {
│ │ │ │ +
521 int id, elm_type, number_of_tags;
│ │ │ │ +
522 readfile(file,3,"%d %d %d ",&id,&elm_type,&number_of_tags);
│ │ │ │ +
523 int physical_entity = -1;
│ │ │ │ +
524
│ │ │ │ +
525 for (int k=1; k<=number_of_tags; k++)
│ │ │ │ +
526 {
│ │ │ │ +
527 int blub;
│ │ │ │ +
528 readfile(file,1,"%d ",&blub);
│ │ │ │ +
529 if (k==1) physical_entity = blub;
│ │ │ │ +
530 }
│ │ │ │ +
531 pass2HandleElement(file, elm_type, renumber, nodes, physical_entity);
│ │ │ │ +
532 }
│ │ │ │ +
533 readfile(file,1,"%s\n",buf);
│ │ │ │ +
534 if (strcmp(buf,"$EndElements")!=0)
│ │ │ │ +
535 DUNE_THROW(Dune::IOError, "expected $EndElements");
│ │ │ │ +
536
│ │ │ │ +
537 fclose(file);
│ │ │ │ +
538 }
│ │ │ │ +
│ │ │ │ +
539
│ │ │ │ +
│ │ │ │ +
545 void pass1HandleElement(FILE* file, const int elm_type,
│ │ │ │ +
546 std::map<int,unsigned int> & renumber,
│ │ │ │ +
547 const std::vector< GlobalVector > & nodes)
│ │ │ │ +
548 {
│ │ │ │ +
549 // some data about gmsh elements
│ │ │ │ +
550 const int nDofs[16] = {-1, 2, 3, 4, 4, 8, 6, 5, 3, 6, -1, 10, -1, -1, -1, 1};
│ │ │ │ +
551 const int nVertices[16] = {-1, 2, 3, 4, 4, 8, 6, 5, 2, 3, -1, 4, -1, -1, -1, 1};
│ │ │ │ +
552 const int elementDim[16] = {-1, 1, 2, 2, 3, 3, 3, 3, 1, 2, -1, 3, -1, -1, -1, 0};
│ │ │ │ +
553
│ │ │ │ +
554 // test whether we support the element type
│ │ │ │ +
555 if ( not (elm_type > 0 && elm_type <= 15 // index in suitable range?
│ │ │ │ +
556 && (elementDim[elm_type] == dim || elementDim[elm_type] == (dim-1) ) ) ) // real element or boundary element?
│ │ │ │ +
557 {
│ │ │ │ +
558 skipline(file); // skip rest of line if element is unknown
│ │ │ │ +
559 return;
│ │ │ │ +
560 }
│ │ │ │ +
561
│ │ │ │ +
562 // The format string for parsing is n times '%d' in a row
│ │ │ │ +
563 std::string formatString = "%d";
│ │ │ │ +
564 for (int i=1; i<nDofs[elm_type]; i++)
│ │ │ │ +
565 formatString += " %d";
│ │ │ │ +
566 formatString += "\n";
│ │ │ │ +
567
│ │ │ │ +
568 // '10' is the largest number of dofs we may encounter in a .msh file
│ │ │ │ +
569 std::vector<int> elementDofs(10);
│ │ │ │ +
570
│ │ │ │ +
571 readfile(file,nDofs[elm_type], formatString.c_str(),
│ │ │ │ +
572 &(elementDofs[0]),&(elementDofs[1]),&(elementDofs[2]),
│ │ │ │ +
573 &(elementDofs[3]),&(elementDofs[4]),&(elementDofs[5]),
│ │ │ │ +
574 &(elementDofs[6]),&(elementDofs[7]),&(elementDofs[8]),
│ │ │ │ +
575 &(elementDofs[9]));
│ │ │ │ +
576
│ │ │ │ +
577 // insert each vertex if it hasn't been inserted already
│ │ │ │ +
578 for (int i=0; i<nVertices[elm_type]; i++)
│ │ │ │ +
579 if (renumber.find(elementDofs[i])==renumber.end())
│ │ │ │ +
580 {
│ │ │ │ +
581 renumber[elementDofs[i]] = number_of_real_vertices++;
│ │ │ │ +
582 factory.insertVertex(nodes[elementDofs[i]]);
│ │ │ │ +
583 }
│ │ │ │ +
584
│ │ │ │ +
585 // count elements and boundary elements
│ │ │ │ +
586 if (elementDim[elm_type] == dim)
│ │ │ │ + │ │ │ │ +
588 else
│ │ │ │ + │ │ │ │ +
590
│ │ │ │ +
591 }
│ │ │ │ +
│ │ │ │ +
592
│ │ │ │ +
593
│ │ │ │ +
594
│ │ │ │ +
595 // generic-case: This is not supposed to be used at runtime.
│ │ │ │ +
596 template <class E, class V, class V2>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
598 const V&,
│ │ │ │ +
599 const E&,
│ │ │ │ +
600 const V2&
│ │ │ │ +
601 )
│ │ │ │ +
602 {
│ │ │ │ +
603 DUNE_THROW(Dune::IOError, "tried to create a 3D boundary segment in a non-3D Grid");
│ │ │ │ +
604 }
│ │ │ │ +
│ │ │ │ +
605
│ │ │ │ +
606 // 3d-case:
│ │ │ │ +
607 template <class E, class V>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
609 const std::vector<FieldVector<double, 3> >& nodes,
│ │ │ │ +
610 const E& elementDofs,
│ │ │ │ +
611 const V& vertices
│ │ │ │ +
612 )
│ │ │ │ +
613 {
│ │ │ │ +
614 std::array<FieldVector<double,dimWorld>, 6> v;
│ │ │ │ +
615 for (int i=0; i<6; i++)
│ │ │ │ +
616 for (int j=0; j<dimWorld; j++)
│ │ │ │ +
617 v[i][j] = nodes[elementDofs[i]][j];
│ │ │ │ +
618
│ │ │ │ +
619 BoundarySegment<dim,dimWorld>* newBoundarySegment
│ │ │ │ +
620 = (BoundarySegment<dim,dimWorld>*) new GmshReaderQuadraticBoundarySegment< 3, 3 >( v[0], v[1], v[2],
│ │ │ │ +
621 v[3], v[4], v[5] );
│ │ │ │ +
622
│ │ │ │ +
623 factory.insertBoundarySegment( vertices,
│ │ │ │ +
624 std::shared_ptr<BoundarySegment<dim,dimWorld> >(newBoundarySegment) );
│ │ │ │ +
625 }
│ │ │ │ +
│ │ │ │ +
626
│ │ │ │ +
627
│ │ │ │ +
628
│ │ │ │ +
│ │ │ │ +
633 virtual void pass2HandleElement(FILE* file, const int elm_type,
│ │ │ │ +
634 std::map<int,unsigned int> & renumber,
│ │ │ │ +
635 const std::vector< GlobalVector > & nodes,
│ │ │ │ +
636 const int physical_entity)
│ │ │ │ +
637 {
│ │ │ │ +
638 // some data about gmsh elements
│ │ │ │ +
639 const int nDofs[16] = {-1, 2, 3, 4, 4, 8, 6, 5, 3, 6, -1, 10, -1, -1, -1, 1};
│ │ │ │ +
640 const int nVertices[16] = {-1, 2, 3, 4, 4, 8, 6, 5, 2, 3, -1, 4, -1, -1, -1, 1};
│ │ │ │ +
641 const int elementDim[16] = {-1, 1, 2, 2, 3, 3, 3, 3, 1, 2, -1, 3, -1, -1, -1, 0};
│ │ │ │ +
642
│ │ │ │ +
643 // test whether we support the element type
│ │ │ │ +
644 if ( not (elm_type > 0 && elm_type <= 15 // index in suitable range?
│ │ │ │ +
645 && (elementDim[elm_type] == dim || elementDim[elm_type] == (dim-1) ) ) ) // real element or boundary element?
│ │ │ │ +
646 {
│ │ │ │ +
647 skipline(file); // skip rest of line if element is unknown
│ │ │ │ +
648 return;
│ │ │ │ +
649 }
│ │ │ │ +
650
│ │ │ │ +
651 // The format string for parsing is n times '%d' in a row
│ │ │ │ +
652 std::string formatString = "%d";
│ │ │ │ +
653 for (int i=1; i<nDofs[elm_type]; i++)
│ │ │ │ +
654 formatString += " %d";
│ │ │ │ +
655 formatString += "\n";
│ │ │ │ +
656
│ │ │ │ +
657 // '10' is the largest number of dofs we may encounter in a .msh file
│ │ │ │ +
658 std::vector<int> elementDofs(10);
│ │ │ │ +
659
│ │ │ │ +
660 readfile(file,nDofs[elm_type], formatString.c_str(),
│ │ │ │ +
661 &(elementDofs[0]),&(elementDofs[1]),&(elementDofs[2]),
│ │ │ │ +
662 &(elementDofs[3]),&(elementDofs[4]),&(elementDofs[5]),
│ │ │ │ +
663 &(elementDofs[6]),&(elementDofs[7]),&(elementDofs[8]),
│ │ │ │ +
664 &(elementDofs[9]));
│ │ │ │ +
665
│ │ │ │ +
666 // correct differences between gmsh and Dune in the local vertex numbering
│ │ │ │ +
667 switch (elm_type)
│ │ │ │ +
668 {
│ │ │ │ +
669 case 3 : // 4-node quadrilateral
│ │ │ │ +
670 std::swap(elementDofs[2],elementDofs[3]);
│ │ │ │ +
671 break;
│ │ │ │ +
672 case 5 : // 8-node hexahedron
│ │ │ │ +
673 std::swap(elementDofs[2],elementDofs[3]);
│ │ │ │ +
674 std::swap(elementDofs[6],elementDofs[7]);
│ │ │ │ +
675 break;
│ │ │ │ +
676 case 7 : // 5-node pyramid
│ │ │ │ +
677 std::swap(elementDofs[2],elementDofs[3]);
│ │ │ │ +
678 break;
│ │ │ │ +
679 }
│ │ │ │ +
680
│ │ │ │ +
681 // renumber corners to account for the explicitly given vertex
│ │ │ │ +
682 // numbering in the file
│ │ │ │ +
683 std::vector<unsigned int> vertices(nVertices[elm_type]);
│ │ │ │ +
684
│ │ │ │ +
685 for (int i=0; i<nVertices[elm_type]; i++)
│ │ │ │ +
686 vertices[i] = renumber[elementDofs[i]];
│ │ │ │ +
687
│ │ │ │ +
688 // If it is an element, insert it as such
│ │ │ │ +
689 if (elementDim[elm_type] == dim) {
│ │ │ │ +
690
│ │ │ │ +
691 switch (elm_type)
│ │ │ │ +
692 {
│ │ │ │ +
693 case 1 : // 2-node line
│ │ │ │ +
694 factory.insertElement(Dune::GeometryTypes::line,vertices);
│ │ │ │ +
695 break;
│ │ │ │ +
696 case 2 : // 3-node triangle
│ │ │ │ +
697 factory.insertElement(Dune::GeometryTypes::triangle,vertices);
│ │ │ │ +
698 break;
│ │ │ │ +
699 case 3 : // 4-node quadrilateral
│ │ │ │ +
700 factory.insertElement(Dune::GeometryTypes::quadrilateral,vertices);
│ │ │ │ +
701 break;
│ │ │ │ +
702 case 4 : // 4-node tetrahedron
│ │ │ │ +
703 factory.insertElement(Dune::GeometryTypes::tetrahedron,vertices);
│ │ │ │ +
704 break;
│ │ │ │ +
705 case 5 : // 8-node hexahedron
│ │ │ │ +
706 factory.insertElement(Dune::GeometryTypes::hexahedron,vertices);
│ │ │ │ +
707 break;
│ │ │ │ +
708 case 6 : // 6-node prism
│ │ │ │ +
709 factory.insertElement(Dune::GeometryTypes::prism,vertices);
│ │ │ │ +
710 break;
│ │ │ │ +
711 case 7 : // 5-node pyramid
│ │ │ │ +
712 factory.insertElement(Dune::GeometryTypes::pyramid,vertices);
│ │ │ │ +
713 break;
│ │ │ │ +
714 case 9 : // 6-node triangle
│ │ │ │ +
715 factory.insertElement(Dune::GeometryTypes::triangle,vertices);
│ │ │ │ +
716 break;
│ │ │ │ +
717 case 11 : // 10-node tetrahedron
│ │ │ │ +
718 factory.insertElement(Dune::GeometryTypes::tetrahedron,vertices);
│ │ │ │ +
719 break;
│ │ │ │ +
720 }
│ │ │ │ +
721
│ │ │ │ +
722 } else {
│ │ │ │ +
723 // it must be a boundary segment then
│ │ │ │ + │ │ │ │ +
725
│ │ │ │ +
726 switch (elm_type)
│ │ │ │ +
727 {
│ │ │ │ +
728 case 1 : // 2-node line
│ │ │ │ +
729 factory.insertBoundarySegment(vertices);
│ │ │ │ +
730 break;
│ │ │ │ +
731
│ │ │ │ +
732 case 2 : // 3-node triangle
│ │ │ │ +
733 factory.insertBoundarySegment(vertices);
│ │ │ │ +
734 break;
│ │ │ │ +
735
│ │ │ │ +
736 case 3 : // 4-node quadrilateral
│ │ │ │ +
737 factory.insertBoundarySegment(vertices);
│ │ │ │ +
738 break;
│ │ │ │ +
739
│ │ │ │ +
740 case 15 : // 1-node point
│ │ │ │ +
741 factory.insertBoundarySegment(vertices);
│ │ │ │ +
742 break;
│ │ │ │ +
743
│ │ │ │ +
744 case 8 : { // 3-node line
│ │ │ │ +
745 std::array<FieldVector<double,dimWorld>, 3> v;
│ │ │ │ +
746 for (int i=0; i<dimWorld; i++) {
│ │ │ │ +
747 v[0][i] = nodes[elementDofs[0]][i];
│ │ │ │ +
748 v[1][i] = nodes[elementDofs[2]][i]; // yes, the renumbering is intended!
│ │ │ │ +
749 v[2][i] = nodes[elementDofs[1]][i];
│ │ │ │ +
750 }
│ │ │ │ +
751 BoundarySegment<dim,dimWorld>* newBoundarySegment
│ │ │ │ +
752 = (BoundarySegment<dim,dimWorld>*) new GmshReaderQuadraticBoundarySegment< 2, dimWorld >(v[0], v[1], v[2]);
│ │ │ │ +
753 factory.insertBoundarySegment(vertices,
│ │ │ │ +
754 std::shared_ptr<BoundarySegment<dim,dimWorld> >(newBoundarySegment));
│ │ │ │ +
755 break;
│ │ │ │ +
756 }
│ │ │ │ +
757 case 9 : { // 6-node triangle
│ │ │ │ +
758 boundarysegment_insert(nodes, elementDofs, vertices);
│ │ │ │ +
759 break;
│ │ │ │ +
760 }
│ │ │ │ +
761 default: {
│ │ │ │ +
762 DUNE_THROW(Dune::IOError, "GmshReader does not support using element-type " << elm_type << " for boundary segments");
│ │ │ │ +
763 break;
│ │ │ │ +
764 }
│ │ │ │ +
765
│ │ │ │ +
766 }
│ │ │ │ +
767
│ │ │ │ +
768 }
│ │ │ │ +
769 }
│ │ │ │ +
770
│ │ │ │ +
771 // count elements and boundary elements
│ │ │ │ +
772 if (elementDim[elm_type] == dim) {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
775 } else {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
778 }
│ │ │ │ +
779
│ │ │ │ +
780 }
│ │ │ │ +
│ │ │ │ +
781
│ │ │ │ +
782 };
│ │ │ │ +
│ │ │ │ +
783
│ │ │ │ +
│ │ │ │ +
784 namespace Gmsh {
│ │ │ │ +
│ │ │ │ +
790 enum class ReaderOptions
│ │ │ │ +
791 {
│ │ │ │ +
792 verbose = 1,
│ │ │ │ + │ │ │ │ +
794 readElementData = 4,
│ │ │ │ + │ │ │ │ +
796 };
│ │ │ │ +
│ │ │ │ +
797
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
800 {
│ │ │ │ +
801 return static_cast<ReaderOptions>(
│ │ │ │ +
802 static_cast<int>(a) | static_cast<int>(b)
│ │ │ │ +
803 );
│ │ │ │ +
804 }
│ │ │ │ +
│ │ │ │ +
805
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
808 {
│ │ │ │ +
809 return static_cast<int>(a) & static_cast<int>(b);
│ │ │ │ +
810 }
│ │ │ │ +
│ │ │ │ +
811
│ │ │ │ +
812 } // end namespace Gmsh
│ │ │ │ +
│ │ │ │ +
813
│ │ │ │ +
838 template<typename GridType>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
840 {
│ │ │ │ +
842
│ │ │ │ +
861 static void doRead(Dune::GridFactory<GridType> &factory,
│ │ │ │ +
862 const std::string &fileName,
│ │ │ │ +
863 std::vector<int>& boundarySegmentToPhysicalEntity,
│ │ │ │ +
864 std::vector<int>& elementToPhysicalEntity,
│ │ │ │ +
865 bool verbose, bool insertBoundarySegments)
│ │ │ │ +
866 {
│ │ │ │ +
867 // register boundary segment to boundary segment factory for possible load balancing
│ │ │ │ +
868 // this needs to be done on all cores since the type might not be known otherwise
│ │ │ │ +
869 GmshReaderQuadraticBoundarySegment< Grid::dimension, Grid::dimensionworld >::registerFactory();
│ │ │ │ +
870
│ │ │ │ +
871#ifndef NDEBUG
│ │ │ │ +
872 // check that this method is called on all cores
│ │ │ │ +
873 factory.comm().barrier();
│ │ │ │ +
874#endif
│ │ │ │ +
875
│ │ │ │ +
876 // create parse object and read grid on process 0
│ │ │ │ +
877 if (factory.comm().rank() == 0)
│ │ │ │ +
878 {
│ │ │ │ +
879 GmshReaderParser<Grid> parser(factory,verbose,insertBoundarySegments);
│ │ │ │ +
880 parser.read(fileName);
│ │ │ │ +
881
│ │ │ │ +
882 boundarySegmentToPhysicalEntity = std::move(parser.boundaryIdMap());
│ │ │ │ +
883 elementToPhysicalEntity = std::move(parser.elementIndexMap());
│ │ │ │ +
884 }
│ │ │ │ +
885 else
│ │ │ │ +
886 {
│ │ │ │ +
887 boundarySegmentToPhysicalEntity = {};
│ │ │ │ +
888 elementToPhysicalEntity = {};
│ │ │ │ +
889 }
│ │ │ │ +
890 }
│ │ │ │ +
891
│ │ │ │ +
893
│ │ │ │ +
912 template<class T>
│ │ │ │ +
913 static T &discarded(T &&value) { return static_cast<T&>(value); }
│ │ │ │ +
914
│ │ │ │ +
915 struct DataArg {
│ │ │ │ +
916 std::vector<int> *data_ = nullptr;
│ │ │ │ +
917 DataArg(std::vector<int> &data) : data_(&data) {}
│ │ │ │ +
918 DataArg(const decltype(std::ignore)&) {}
│ │ │ │ +
919 DataArg() = default;
│ │ │ │ +
920 };
│ │ │ │ +
921
│ │ │ │ +
922 struct DataFlagArg : DataArg {
│ │ │ │ +
923 bool flag_ = false;
│ │ │ │ +
924 using DataArg::DataArg;
│ │ │ │ +
925 DataFlagArg(bool flag) : flag_(flag) {}
│ │ │ │ +
926 };
│ │ │ │ +
927
│ │ │ │ +
928 public:
│ │ │ │ +
929 typedef GridType Grid;
│ │ │ │ +
930
│ │ │ │ +
│ │ │ │ +
937 static std::unique_ptr<Grid> read (const std::string& fileName, bool verbose = true, bool insertBoundarySegments=true)
│ │ │ │ +
938 {
│ │ │ │ +
939 // make a grid factory
│ │ │ │ + │ │ │ │ +
941
│ │ │ │ +
942 read(factory, fileName, verbose, insertBoundarySegments);
│ │ │ │ +
943
│ │ │ │ +
944 return factory.createGrid();
│ │ │ │ +
945 }
│ │ │ │ +
│ │ │ │ +
946
│ │ │ │ +
│ │ │ │ +
966 static std::unique_ptr<Grid> read (const std::string& fileName,
│ │ │ │ +
967 std::vector<int>& boundarySegmentToPhysicalEntity,
│ │ │ │ +
968 std::vector<int>& elementToPhysicalEntity,
│ │ │ │ +
969 bool verbose = true, bool insertBoundarySegments=true)
│ │ │ │ +
970 {
│ │ │ │ +
971 // make a grid factory
│ │ │ │ + │ │ │ │ +
973
│ │ │ │ +
974 doRead(
│ │ │ │ +
975 factory, fileName, boundarySegmentToPhysicalEntity,
│ │ │ │ +
976 elementToPhysicalEntity, verbose, insertBoundarySegments
│ │ │ │ +
977 );
│ │ │ │ +
978
│ │ │ │ +
979 return factory.createGrid();
│ │ │ │ +
980 }
│ │ │ │ +
│ │ │ │ +
981
│ │ │ │ +
│ │ │ │ +
983 static void read (Dune::GridFactory<Grid>& factory, const std::string& fileName,
│ │ │ │ +
984 bool verbose = true, bool insertBoundarySegments=true)
│ │ │ │ +
985 {
│ │ │ │ +
986 doRead(
│ │ │ │ +
987 factory, fileName, discarded(std::vector<int>{}),
│ │ │ │ +
988 discarded(std::vector<int>{}), verbose, insertBoundarySegments
│ │ │ │ +
989 );
│ │ │ │ +
990 }
│ │ │ │ +
│ │ │ │ +
991
│ │ │ │ +
993
│ │ │ │ +
│ │ │ │ +
1016 static void read (Dune::GridFactory<Grid> &factory,
│ │ │ │ +
1017 const std::string &fileName,
│ │ │ │ +
1018 DataFlagArg boundarySegmentData,
│ │ │ │ +
1019 DataArg elementData,
│ │ │ │ +
1020 bool verbose=true)
│ │ │ │ +
1021 {
│ │ │ │ +
1022 doRead(
│ │ │ │ +
1023 factory, fileName,
│ │ │ │ +
1024 boundarySegmentData.data_
│ │ │ │ +
1025 ? *boundarySegmentData.data_ : discarded(std::vector<int>{}),
│ │ │ │ +
1026 elementData.data_
│ │ │ │ +
1027 ? *elementData.data_ : discarded(std::vector<int>{}),
│ │ │ │ +
1028 verbose,
│ │ │ │ +
1029 boundarySegmentData.flag_ || boundarySegmentData.data_
│ │ │ │ +
1030 );
│ │ │ │ +
1031 }
│ │ │ │ +
│ │ │ │ +
1032
│ │ │ │ +
│ │ │ │ +
1053 static void read (Dune::GridFactory<Grid>& factory,
│ │ │ │ +
1054 const std::string& fileName,
│ │ │ │ +
1055 std::vector<int>& boundarySegmentToPhysicalEntity,
│ │ │ │ +
1056 std::vector<int>& elementToPhysicalEntity,
│ │ │ │ +
1057 bool verbose, bool insertBoundarySegments)
│ │ │ │ +
1058 {
│ │ │ │ +
1059 doRead(
│ │ │ │ +
1060 factory, fileName, boundarySegmentToPhysicalEntity,
│ │ │ │ +
1061 elementToPhysicalEntity, verbose, insertBoundarySegments
│ │ │ │ +
1062 );
│ │ │ │ +
1063 }
│ │ │ │ +
│ │ │ │ +
1064
│ │ │ │ +
1066 //\{
│ │ │ │ +
1067
│ │ │ │ + │ │ │ │ +
1069
│ │ │ │ +
1070 static constexpr Opts defaultOpts =
│ │ │ │ +
1071 Opts::verbose | Opts::insertBoundarySegments | Opts::readElementData | Opts::readBoundaryData;
│ │ │ │ +
1072
│ │ │ │ +
1074
│ │ │ │ +
│ │ │ │ +
1097 GmshReader(const std::string& fileName,
│ │ │ │ + │ │ │ │ +
1099 {
│ │ │ │ +
1100 gridFactory_ = std::make_unique<Dune::GridFactory<Grid>>();
│ │ │ │ +
1101 readGridFile(fileName, *gridFactory_, options);
│ │ │ │ +
1102 }
│ │ │ │ +
│ │ │ │ +
1103
│ │ │ │ +
│ │ │ │ +
1111 GmshReader(const std::string& fileName, GridFactory<Grid>& factory,
│ │ │ │ + │ │ │ │ +
1113 {
│ │ │ │ +
1114 readGridFile(fileName, factory, options);
│ │ │ │ +
1115 }
│ │ │ │ +
│ │ │ │ +
1116
│ │ │ │ +
│ │ │ │ +
1118 const std::vector<int>& elementData () const
│ │ │ │ +
1119 {
│ │ │ │ +
1120 checkElementData();
│ │ │ │ +
1121 return elementIndexToGmshPhysicalEntity_;
│ │ │ │ +
1122 }
│ │ │ │ +
│ │ │ │ +
1123
│ │ │ │ +
│ │ │ │ +
1125 const std::vector<int>& boundaryData () const
│ │ │ │ +
1126 {
│ │ │ │ +
1127 checkBoundaryData();
│ │ │ │ +
1128 return boundarySegmentIndexToGmshPhysicalEntity_;
│ │ │ │ +
1129 }
│ │ │ │ +
│ │ │ │ +
1130
│ │ │ │ +
│ │ │ │ +
1135 bool hasElementData () const
│ │ │ │ +
1136 { return hasElementData_ && !extractedElementData_; }
│ │ │ │ +
│ │ │ │ +
1137
│ │ │ │ +
│ │ │ │ +
1142 bool hasBoundaryData () const
│ │ │ │ +
1143 { return hasBoundaryData_ && !extractedBoundaryData_; }
│ │ │ │ +
│ │ │ │ +
1144
│ │ │ │ +
│ │ │ │ +
1146 std::vector<int> extractElementData ()
│ │ │ │ +
1147 {
│ │ │ │ +
1148 checkElementData();
│ │ │ │ +
1149 extractedElementData_ = true;
│ │ │ │ +
1150 return std::move(elementIndexToGmshPhysicalEntity_);
│ │ │ │ +
1151 }
│ │ │ │ +
│ │ │ │ +
1152
│ │ │ │ +
│ │ │ │ +
1154 std::vector<int> extractBoundaryData ()
│ │ │ │ +
1155 {
│ │ │ │ +
1156 checkBoundaryData();
│ │ │ │ +
1157 extractedBoundaryData_ = true;
│ │ │ │ +
1158 return std::move(boundarySegmentIndexToGmshPhysicalEntity_);
│ │ │ │ +
1159 }
│ │ │ │ +
│ │ │ │ +
1160
│ │ │ │ +
│ │ │ │ +
1162 std::unique_ptr<Grid> createGrid ()
│ │ │ │ +
1163 {
│ │ │ │ +
1164 if (!gridFactory_)
│ │ │ │ +
1165 DUNE_THROW(Dune::InvalidStateException,
│ │ │ │ +
1166 "This GmshReader has been constructed with a Dune::GridFactory. "
│ │ │ │ +
1167 << "This grid factory has been filled with all information to create a grid. "
│ │ │ │ +
1168 << "Please use this factory to create the grid by calling factory.createGrid(). "
│ │ │ │ +
1169 << "Alternatively use the constructor without passing the factory in combination with this member function."
│ │ │ │ +
1170 );
│ │ │ │ +
1171
│ │ │ │ +
1172 return gridFactory_->createGrid();
│ │ │ │ +
1173 }
│ │ │ │ +
│ │ │ │ +
1174
│ │ │ │ +
1175 //\}
│ │ │ │ +
1176
│ │ │ │ +
1177 private:
│ │ │ │ +
1178 void checkElementData () const
│ │ │ │ +
1179 {
│ │ │ │ +
1180 if (!hasElementData_)
│ │ │ │ +
1181 DUNE_THROW(Dune::InvalidStateException,
│ │ │ │ +
1182 "This GmshReader has been constructed without the option 'readElementData'. "
│ │ │ │ +
1183 << "Please enable reading element data by passing the option 'Gmsh::ReaderOpts::readElementData' "
│ │ │ │ +
1184 << "to the constructor of this class."
│ │ │ │ +
1185 );
│ │ │ │ +
1186
│ │ │ │ +
1187 if (extractedElementData_)
│ │ │ │ +
1188 DUNE_THROW(Dune::InvalidStateException,
│ │ │ │ +
1189 "The element data has already been extracted from this GmshReader "
│ │ │ │ +
1190 << "via a function call to reader.extractElementData(). Use the extracted data or "
│ │ │ │ +
1191 << "read the grid data from file again by constructing a new reader."
│ │ │ │ +
1192 );
│ │ │ │ +
1193 }
│ │ │ │ +
1194
│ │ │ │ +
1195 void checkBoundaryData () const
│ │ │ │ +
1196 {
│ │ │ │ +
1197 if (!hasBoundaryData_)
│ │ │ │ +
1198 DUNE_THROW(Dune::InvalidStateException,
│ │ │ │ +
1199 "This GmshReader has been constructed without the option 'readBoundaryData'. "
│ │ │ │ +
1200 << "Please enable reading boundary data by passing the option 'Gmsh::ReaderOpts::readBoundaryData' "
│ │ │ │ +
1201 << "to the constructor of this class."
│ │ │ │ +
1202 );
│ │ │ │ +
1203
│ │ │ │ +
1204 if (extractedBoundaryData_)
│ │ │ │ +
1205 DUNE_THROW(Dune::InvalidStateException,
│ │ │ │ +
1206 "The boundary data has already been extracted from this GmshReader "
│ │ │ │ +
1207 << "via a function call to reader.extractBoundaryData(). Use the extracted data or "
│ │ │ │ +
1208 << "read the grid data from file again by constructing a new reader."
│ │ │ │ +
1209 );
│ │ │ │ +
1210 }
│ │ │ │ +
1211
│ │ │ │ +
1212 void readGridFile (const std::string& fileName, GridFactory<Grid>& factory, Gmsh::ReaderOptions options)
│ │ │ │ +
1213 {
│ │ │ │ +
1214 const bool verbose = options & Opts::verbose;
│ │ │ │ +
1215 const bool insertBoundarySegments = options & Opts::insertBoundarySegments;
│ │ │ │ +
1216 const bool readBoundaryData = options & Opts::readBoundaryData;
│ │ │ │ +
1217 const bool readElementData = options & Opts::readElementData;
│ │ │ │ +
1218
│ │ │ │ +
1219 doRead(
│ │ │ │ +
1220 factory, fileName, boundarySegmentIndexToGmshPhysicalEntity_,
│ │ │ │ +
1221 elementIndexToGmshPhysicalEntity_, verbose,
│ │ │ │ +
1222 readBoundaryData || insertBoundarySegments
│ │ │ │ +
1223 );
│ │ │ │ +
1224
│ │ │ │ +
1225 // clear unwanted data
│ │ │ │ +
1226 if (!readBoundaryData)
│ │ │ │ +
1227 boundarySegmentIndexToGmshPhysicalEntity_ = std::vector<int>{};
│ │ │ │ +
1228 if (!readElementData)
│ │ │ │ +
1229 elementIndexToGmshPhysicalEntity_ = std::vector<int>{};
│ │ │ │ +
1230
│ │ │ │ +
1231 hasElementData_ = readElementData;
│ │ │ │ +
1232 hasBoundaryData_ = readBoundaryData;
│ │ │ │ +
1233 }
│ │ │ │ +
1234
│ │ │ │ +
1235 std::unique_ptr<Dune::GridFactory<Grid>> gridFactory_;
│ │ │ │ +
1236
│ │ │ │ +
1237 std::vector<int> elementIndexToGmshPhysicalEntity_;
│ │ │ │ +
1238 std::vector<int> boundarySegmentIndexToGmshPhysicalEntity_;
│ │ │ │ +
1239
│ │ │ │ +
1240 bool hasElementData_;
│ │ │ │ +
1241 bool hasBoundaryData_;
│ │ │ │ +
1242
│ │ │ │ +
1243 // for better error messages, we keep track of these separately
│ │ │ │ +
1244 bool extractedElementData_ = false;
│ │ │ │ +
1245 bool extractedBoundaryData_ = false;
│ │ │ │ +
1246 };
│ │ │ │ +
│ │ │ │ +
1247
│ │ │ │ +
1250} // namespace Dune
│ │ │ │ +
1251
│ │ │ │ +
1252#endif
│ │ │ │ +
Base class for grid boundary segments of arbitrary geometry.
│ │ │ │ +
ReaderOptions
Option for the Gmsh mesh file reader.
Definition gmshreader.hh:791
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
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 basic.hh:31
│ │ │ │ -
void reset()
Definition basic.hh:51
│ │ │ │ -
bool getnextline()
Definition basic.cc:93
│ │ │ │ -
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
│ │ │ │ +
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:807
│ │ │ │ +
constexpr ReaderOptions operator|(ReaderOptions a, ReaderOptions b)
composition operator for reader options
Definition gmshreader.hh:799
│ │ │ │ +
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:258
│ │ │ │ +
Provide a generic factory class for unstructured grids.
Definition common/gridfactory.hh:275
│ │ │ │ +
virtual std::unique_ptr< GridType > createGrid()
Finalize grid creation and hand over the grid.
Definition common/gridfactory.hh:333
│ │ │ │ +
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
│ │ │ │ +
std::vector< std::string > & physicalEntityNames()
Returns the names of the gmsh physical entities (0-based index)
Definition gmshreader.hh:373
│ │ │ │ +
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:545
│ │ │ │ +
static const int dimWorld
Definition gmshreader.hh:321
│ │ │ │ +
Dune::GridFactory< GridType > & factory
Definition gmshreader.hh:305
│ │ │ │ +
std::vector< int > & boundaryIdMap()
Definition gmshreader.hh:361
│ │ │ │ +
void readfile(FILE *file, int cnt, const char *format,...)
Definition gmshreader.hh:331
│ │ │ │ +
std::vector< int > & elementIndexMap()
Returns a map for the gmsh physical entity id (1-based index) for each entity of codim 0.
Definition gmshreader.hh:367
│ │ │ │ +
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:608
│ │ │ │ +
GmshReaderParser(Dune::GridFactory< GridType > &_factory, bool v, bool i)
Definition gmshreader.hh:358
│ │ │ │ +
int element_count
Definition gmshreader.hh:310
│ │ │ │ +
void read(const std::string &f)
Definition gmshreader.hh:378
│ │ │ │ +
void skipline(FILE *file)
Definition gmshreader.hh:348
│ │ │ │ +
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:633
│ │ │ │ +
static const int dim
Definition gmshreader.hh:320
│ │ │ │ +
FieldVector< double, dimWorld > GlobalVector
Definition gmshreader.hh:325
│ │ │ │ +
std::string fileName
Definition gmshreader.hh:313
│ │ │ │ +
std::vector< std::string > physical_entity_names
Definition gmshreader.hh:317
│ │ │ │ +
int boundary_element_count
Definition gmshreader.hh:309
│ │ │ │ +
void boundarysegment_insert(const V &, const E &, const V2 &)
Definition gmshreader.hh:597
│ │ │ │ +
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:840
│ │ │ │ +
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:966
│ │ │ │ +
const std::vector< int > & elementData() const
Access element data (maps element index to Gmsh physical entity)
Definition gmshreader.hh:1118
│ │ │ │ +
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:1016
│ │ │ │ +
static std::unique_ptr< Grid > read(const std::string &fileName, bool verbose=true, bool insertBoundarySegments=true)
Definition gmshreader.hh:937
│ │ │ │ +
static void read(Dune::GridFactory< Grid > &factory, const std::string &fileName, bool verbose=true, bool insertBoundarySegments=true)
Definition gmshreader.hh:983
│ │ │ │ +
GridType Grid
Definition gmshreader.hh:929
│ │ │ │ +
std::unique_ptr< Grid > createGrid()
Create the grid.
Definition gmshreader.hh:1162
│ │ │ │ +
std::vector< int > extractBoundaryData()
Erase boundary data from reader and return the data.
Definition gmshreader.hh:1154
│ │ │ │ +
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:1053
│ │ │ │ +
bool hasElementData() const
If element data is available.
Definition gmshreader.hh:1135
│ │ │ │ +
bool hasBoundaryData() const
If boundary data is available.
Definition gmshreader.hh:1142
│ │ │ │ +
static constexpr Opts defaultOpts
Definition gmshreader.hh:1070
│ │ │ │ +
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:1111
│ │ │ │ +
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:1097
│ │ │ │ +
std::vector< int > extractElementData()
Erase element data from reader and return the data.
Definition gmshreader.hh:1146
│ │ │ │ +
const std::vector< int > & boundaryData() const
Access boundary data (maps boundary segment index to Gmsh physical entity)
Definition gmshreader.hh:1125
│ │ │ │ +
Provide a generic factory class for unstructured grids.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,104 +2,1334 @@ │ │ │ │ │ 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 │ │ │ │ │ -polygon.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 © 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 │ │ │ │ │ -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> │ │ │ │ │ -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 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 │ │ │ │ │ +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_GMSHREADER_HH │ │ │ │ │ +7#define DUNE_GMSHREADER_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 │ │ │ │ │ +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 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() = _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 } │ │ │ │ │ +102 │ │ │ │ │ +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 │ │ │ │ │ +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 _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; │ │ │ │ │ +_3_1_7 std::vector _p_h_y_s_i_c_a_l___e_n_t_i_t_y___n_a_m_e_s; │ │ │ │ │ +318 │ │ │ │ │ +319 // static data │ │ │ │ │ +_3_2_0 static const int _d_i_m = GridType::dimension; │ │ │ │ │ +_3_2_1 static const int _d_i_m_W_o_r_l_d = GridType::dimensionworld; │ │ │ │ │ +322 static_assert( (_d_i_m_W_o_r_l_d <= 3), "GmshReader requires dimWorld <= 3." ); │ │ │ │ │ +323 │ │ │ │ │ +324 // typedefs │ │ │ │ │ +_3_2_5 typedef FieldVector< double, dimWorld > _G_l_o_b_a_l_V_e_c_t_o_r; │ │ │ │ │ +326 │ │ │ │ │ +327 // don't use something like │ │ │ │ │ +328 // readfile(file, 1, "%s\n", buf); │ │ │ │ │ +329 // to skip the rest of of the line -- that will only skip the next │ │ │ │ │ +330 // whitespace-separated word! Use skipline() instead. │ │ │ │ │ +_3_3_1 void _r_e_a_d_f_i_l_e(FILE * file, int cnt, const char * format, ...) │ │ │ │ │ +332#ifdef __GNUC__ │ │ │ │ │ +333 __attribute__((format(scanf, 4, 5))) │ │ │ │ │ +334#endif │ │ │ │ │ +335 { │ │ │ │ │ +336 std::va_list ap; │ │ │ │ │ +337 va_start(ap, format); │ │ │ │ │ +338 off_t pos = ftello(file); │ │ │ │ │ +339 int c = std::vfscanf(file, format, ap); │ │ │ │ │ +340 va_end(ap); │ │ │ │ │ +341 if (c != cnt) │ │ │ │ │ +342 DUNE_THROW(Dune::IOError, "Error parsing " << _f_i_l_e_N_a_m_e << " " │ │ │ │ │ +343 "file pos " << pos │ │ │ │ │ +344 << ": Expected '" << format << "', only read " << c << " entries instead of │ │ │ │ │ +" << cnt << "."); │ │ │ │ │ +345 } │ │ │ │ │ +346 │ │ │ │ │ +347 // skip over the rest of the line, including the terminating newline │ │ │ │ │ +_3_4_8 void _s_k_i_p_l_i_n_e(FILE * file) │ │ │ │ │ +349 { │ │ │ │ │ +350 int c; │ │ │ │ │ +351 do { │ │ │ │ │ +352 c = std::fgetc(file); │ │ │ │ │ +353 } while(c != '\n' && c != EOF); │ │ │ │ │ +354 } │ │ │ │ │ +355 │ │ │ │ │ +356 public: │ │ │ │ │ +357 │ │ │ │ │ +_3_5_8 _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) : │ │ │ │ │ +359 _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) {} │ │ │ │ │ +360 │ │ │ │ │ +_3_6_1 std::vector & _b_o_u_n_d_a_r_y_I_d_M_a_p() │ │ │ │ │ +362 { │ │ │ │ │ +363 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; │ │ │ │ │ +364 } │ │ │ │ │ +365 │ │ │ │ │ +_3_6_7 std::vector & _e_l_e_m_e_n_t_I_n_d_e_x_M_a_p() │ │ │ │ │ +368 { │ │ │ │ │ +369 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; │ │ │ │ │ +370 } │ │ │ │ │ +371 │ │ │ │ │ +_3_7_3 std::vector & _p_h_y_s_i_c_a_l_E_n_t_i_t_y_N_a_m_e_s() │ │ │ │ │ +374 { │ │ │ │ │ +375 return _p_h_y_s_i_c_a_l___e_n_t_i_t_y___n_a_m_e_s; │ │ │ │ │ +376 } │ │ │ │ │ +377 │ │ │ │ │ +_3_7_8 void _r_e_a_d (const std::string& f) │ │ │ │ │ +379 { │ │ │ │ │ +380 if (_v_e_r_b_o_s_e) std::cout << "Reading " << _d_i_m << "d Gmsh grid..." << std:: │ │ │ │ │ +endl; │ │ │ │ │ +381 │ │ │ │ │ +382 // open file name, we use C I/O │ │ │ │ │ +383 _f_i_l_e_N_a_m_e = f; │ │ │ │ │ +384 FILE* file = fopen(_f_i_l_e_N_a_m_e.c_str(),"rb"); │ │ │ │ │ +385 if (file==0) │ │ │ │ │ +386 DUNE_THROW(Dune::IOError, "Could not open " << _f_i_l_e_N_a_m_e); │ │ │ │ │ +387 │ │ │ │ │ +388 //========================================= │ │ │ │ │ +389 // Header: Read vertices into vector │ │ │ │ │ +390 // Check vertices that are needed │ │ │ │ │ +391 //========================================= │ │ │ │ │ +392 │ │ │ │ │ +393 _n_u_m_b_e_r___o_f___r_e_a_l___v_e_r_t_i_c_e_s = 0; │ │ │ │ │ +394 _b_o_u_n_d_a_r_y___e_l_e_m_e_n_t___c_o_u_n_t = 0; │ │ │ │ │ +395 _e_l_e_m_e_n_t___c_o_u_n_t = 0; │ │ │ │ │ +396 │ │ │ │ │ +397 // process header │ │ │ │ │ +398 double version_number; │ │ │ │ │ +399 int file_type, data_size; │ │ │ │ │ +400 │ │ │ │ │ +401 _r_e_a_d_f_i_l_e(file,1,"%s\n",_b_u_f); │ │ │ │ │ +402 if (strcmp(_b_u_f,"$MeshFormat")!=0) │ │ │ │ │ +403 DUNE_THROW(Dune::IOError, "expected $MeshFormat in first line"); │ │ │ │ │ +404 _r_e_a_d_f_i_l_e(file,3,"%lg %d %d\n",&version_number,&file_type,&data_size); │ │ │ │ │ +405 // 2.2 is not representable as float and leads to problems on i386 │ │ │ │ │ +406 // Hence we use >= 2.00001. │ │ │ │ │ +407 if( (version_number < 2.0) || (version_number >= 2.20001) ) // 2.2 is not │ │ │ │ │ +representable as float and leads to problems on i386 │ │ │ │ │ +408 DUNE_THROW(Dune::IOError, "can only read Gmsh version 2 files"); │ │ │ │ │ +409 if (_v_e_r_b_o_s_e) std::cout << "version " << version_number << " Gmsh file │ │ │ │ │ +detected" << std::endl; │ │ │ │ │ +410 _r_e_a_d_f_i_l_e(file,1,"%s\n",_b_u_f); │ │ │ │ │ +411 if (strcmp(_b_u_f,"$EndMeshFormat")!=0) │ │ │ │ │ +412 DUNE_THROW(Dune::IOError, "expected $EndMeshFormat"); │ │ │ │ │ +413 │ │ │ │ │ +414 // physical name section │ │ │ │ │ +415 _p_h_y_s_i_c_a_l___e_n_t_i_t_y___n_a_m_e_s.clear(); │ │ │ │ │ +416 _r_e_a_d_f_i_l_e(file,1,"%s\n",_b_u_f); │ │ │ │ │ +417 if (strcmp(_b_u_f,"$PhysicalNames")==0) { │ │ │ │ │ +418 int number_of_names; │ │ │ │ │ +419 _r_e_a_d_f_i_l_e(file,1,"%d\n",&number_of_names); │ │ │ │ │ +420 if (_v_e_r_b_o_s_e) std::cout << "file contains " << number_of_names << " physical │ │ │ │ │ +entities" << std::endl; │ │ │ │ │ +421 _p_h_y_s_i_c_a_l___e_n_t_i_t_y___n_a_m_e_s.resize(number_of_names); │ │ │ │ │ +422 std::string buf_name; │ │ │ │ │ +423 for( int i = 0; i < number_of_names; ++i ) { │ │ │ │ │ +424 int _d_i_m, id; │ │ │ │ │ +425 _r_e_a_d_f_i_l_e(file,3, "%d %d %s\n", &_d_i_m, &id, _b_u_f); │ │ │ │ │ +426 buf_name.assign(_b_u_f); │ │ │ │ │ +427 auto begin = buf_name.find_first_of('\"') + 1; │ │ │ │ │ +428 auto end = buf_name.find_last_of('\"') - begin; │ │ │ │ │ +429 _p_h_y_s_i_c_a_l___e_n_t_i_t_y___n_a_m_e_s[id-1].assign(buf_name.substr(begin, end)); │ │ │ │ │ +430 } │ │ │ │ │ +431 _r_e_a_d_f_i_l_e(file,1,"%s\n",_b_u_f); │ │ │ │ │ +432 if (strcmp(_b_u_f,"$EndPhysicalNames")!=0) │ │ │ │ │ +433 DUNE_THROW(Dune::IOError, "expected $EndPhysicalNames"); │ │ │ │ │ +434 _r_e_a_d_f_i_l_e(file,1,"%s\n",_b_u_f); │ │ │ │ │ +435 } │ │ │ │ │ +436 │ │ │ │ │ +437 // node section │ │ │ │ │ +438 int number_of_nodes; │ │ │ │ │ +439 │ │ │ │ │ +440 if (strcmp(_b_u_f,"$Nodes")!=0) │ │ │ │ │ +441 DUNE_THROW(Dune::IOError, "expected $Nodes"); │ │ │ │ │ +442 _r_e_a_d_f_i_l_e(file,1,"%d\n",&number_of_nodes); │ │ │ │ │ +443 if (_v_e_r_b_o_s_e) std::cout << "file contains " << number_of_nodes << " nodes" │ │ │ │ │ +<< std::endl; │ │ │ │ │ +444 │ │ │ │ │ +445 // read nodes │ │ │ │ │ +446 // The '+1' is due to the fact that gmsh numbers node starting from 1 │ │ │ │ │ +rather than from 0 │ │ │ │ │ +447 std::vector< GlobalVector > nodes( number_of_nodes+1 ); │ │ │ │ │ +448 { │ │ │ │ │ +449 int id; │ │ │ │ │ +450 double x[ 3 ]; │ │ │ │ │ +451 for( int i = 1; i <= number_of_nodes; ++i ) │ │ │ │ │ +452 { │ │ │ │ │ +453 _r_e_a_d_f_i_l_e(file,4, "%d %lg %lg %lg\n", &id, &x[ 0 ], &x[ 1 ], &x[ 2 ] ); │ │ │ │ │ +454 │ │ │ │ │ +455 if (id > number_of_nodes) { │ │ │ │ │ +456 DUNE_THROW(Dune::IOError, │ │ │ │ │ +457 "Only dense sequences of node indices are currently supported (node index " │ │ │ │ │ +458 << id << " is invalid)."); │ │ │ │ │ +459 } │ │ │ │ │ +460 │ │ │ │ │ +461 // just store node position │ │ │ │ │ +462 for( int j = 0; j < _d_i_m_W_o_r_l_d; ++j ) │ │ │ │ │ +463 nodes[ id ][ j ] = x[ j ]; │ │ │ │ │ +464 } │ │ │ │ │ +465 _r_e_a_d_f_i_l_e(file,1,"%s\n",_b_u_f); │ │ │ │ │ +466 if (strcmp(_b_u_f,"$EndNodes")!=0) │ │ │ │ │ +467 DUNE_THROW(Dune::IOError, "expected $EndNodes"); │ │ │ │ │ +468 } │ │ │ │ │ +469 │ │ │ │ │ +470 // element section │ │ │ │ │ +471 _r_e_a_d_f_i_l_e(file,1,"%s\n",_b_u_f); │ │ │ │ │ +472 if (strcmp(_b_u_f,"$Elements")!=0) │ │ │ │ │ +473 DUNE_THROW(Dune::IOError, "expected $Elements"); │ │ │ │ │ +474 int number_of_elements; │ │ │ │ │ +475 _r_e_a_d_f_i_l_e(file,1,"%d\n",&number_of_elements); │ │ │ │ │ +476 if (_v_e_r_b_o_s_e) std::cout << "file contains " << number_of_elements << " │ │ │ │ │ +elements" << std::endl; │ │ │ │ │ +477 │ │ │ │ │ +478 //========================================= │ │ │ │ │ +479 // Pass 1: Select and insert those vertices in the file that │ │ │ │ │ +480 // actually occur as corners of an element. │ │ │ │ │ +481 //========================================= │ │ │ │ │ +482 │ │ │ │ │ +483 off_t section_element_offset = ftello(file); │ │ │ │ │ +484 std::map renumber; │ │ │ │ │ +485 for (int i=1; i<=number_of_elements; i++) │ │ │ │ │ +486 { │ │ │ │ │ +487 int id, elm_type, number_of_tags; │ │ │ │ │ +488 _r_e_a_d_f_i_l_e(file,3,"%d %d %d ",&id,&elm_type,&number_of_tags); │ │ │ │ │ +489 for (int k=1; k<=number_of_tags; k++) │ │ │ │ │ +490 { │ │ │ │ │ +491 int blub; │ │ │ │ │ +492 _r_e_a_d_f_i_l_e(file,1,"%d ",&blub); │ │ │ │ │ +493 // k == 1: physical entity │ │ │ │ │ +494 // k == 2: elementary entity (not used here) │ │ │ │ │ +495 // if version_number < 2.2: │ │ │ │ │ +496 // k == 3: mesh partition 0 │ │ │ │ │ +497 // else │ │ │ │ │ +498 // k == 3: number of mesh partitions │ │ │ │ │ +499 // k => 4: mesh partition k-4 │ │ │ │ │ +500 } │ │ │ │ │ +501 _p_a_s_s_1_H_a_n_d_l_e_E_l_e_m_e_n_t(file, elm_type, renumber, nodes); │ │ │ │ │ +502 } │ │ │ │ │ +503 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; │ │ │ │ │ +504 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; │ │ │ │ │ +505 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; │ │ │ │ │ +506 _r_e_a_d_f_i_l_e(file,1,"%s\n",_b_u_f); │ │ │ │ │ +507 if (strcmp(_b_u_f,"$EndElements")!=0) │ │ │ │ │ +508 DUNE_THROW(Dune::IOError, "expected $EndElements"); │ │ │ │ │ +509 _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); │ │ │ │ │ +510 _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); │ │ │ │ │ +511 │ │ │ │ │ +512 //============================================== │ │ │ │ │ +513 // Pass 2: Insert boundary segments and elements │ │ │ │ │ +514 //============================================== │ │ │ │ │ +515 │ │ │ │ │ +516 fseeko(file, section_element_offset, SEEK_SET); │ │ │ │ │ +517 _b_o_u_n_d_a_r_y___e_l_e_m_e_n_t___c_o_u_n_t = 0; │ │ │ │ │ +518 _e_l_e_m_e_n_t___c_o_u_n_t = 0; │ │ │ │ │ +519 for (int i=1; i<=number_of_elements; i++) │ │ │ │ │ +520 { │ │ │ │ │ +521 int id, elm_type, number_of_tags; │ │ │ │ │ +522 _r_e_a_d_f_i_l_e(file,3,"%d %d %d ",&id,&elm_type,&number_of_tags); │ │ │ │ │ +523 int physical_entity = -1; │ │ │ │ │ +524 │ │ │ │ │ +525 for (int k=1; k<=number_of_tags; k++) │ │ │ │ │ +526 { │ │ │ │ │ +527 int blub; │ │ │ │ │ +528 _r_e_a_d_f_i_l_e(file,1,"%d ",&blub); │ │ │ │ │ +529 if (k==1) physical_entity = blub; │ │ │ │ │ +530 } │ │ │ │ │ +531 _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); │ │ │ │ │ +532 } │ │ │ │ │ +533 _r_e_a_d_f_i_l_e(file,1,"%s\n",_b_u_f); │ │ │ │ │ +534 if (strcmp(_b_u_f,"$EndElements")!=0) │ │ │ │ │ +535 DUNE_THROW(Dune::IOError, "expected $EndElements"); │ │ │ │ │ +536 │ │ │ │ │ +537 fclose(file); │ │ │ │ │ +538 } │ │ │ │ │ +539 │ │ │ │ │ +_5_4_5 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, │ │ │ │ │ +546 std::map & renumber, │ │ │ │ │ +547 const std::vector< GlobalVector > & nodes) │ │ │ │ │ +548 { │ │ │ │ │ +549 // some data about gmsh elements │ │ │ │ │ +550 const int nDofs[16] = {-1, 2, 3, 4, 4, 8, 6, 5, 3, 6, -1, 10, -1, -1, -1, │ │ │ │ │ +1}; │ │ │ │ │ +551 const int nVertices[16] = {-1, 2, 3, 4, 4, 8, 6, 5, 2, 3, -1, 4, -1, -1, - │ │ │ │ │ +1, 1}; │ │ │ │ │ +552 const int elementDim[16] = {-1, 1, 2, 2, 3, 3, 3, 3, 1, 2, -1, 3, -1, -1, - │ │ │ │ │ +1, 0}; │ │ │ │ │ +553 │ │ │ │ │ +554 // test whether we support the element type │ │ │ │ │ +555 if ( not (elm_type > 0 && elm_type <= 15 // index in suitable range? │ │ │ │ │ +556 && (elementDim[elm_type] == _d_i_m || elementDim[elm_type] == (_d_i_m-1) ) ) ) / │ │ │ │ │ +/ real element or boundary element? │ │ │ │ │ +557 { │ │ │ │ │ +558 _s_k_i_p_l_i_n_e(file); // skip rest of line if element is unknown │ │ │ │ │ +559 return; │ │ │ │ │ +560 } │ │ │ │ │ +561 │ │ │ │ │ +562 // The format string for parsing is n times '%d' in a row │ │ │ │ │ +563 std::string formatString = "%d"; │ │ │ │ │ +564 for (int i=1; i elementDofs(10); │ │ │ │ │ +570 │ │ │ │ │ +571 _r_e_a_d_f_i_l_e(file,nDofs[elm_type], formatString.c_str(), │ │ │ │ │ +572 &(elementDofs[0]),&(elementDofs[1]),&(elementDofs[2]), │ │ │ │ │ +573 &(elementDofs[3]),&(elementDofs[4]),&(elementDofs[5]), │ │ │ │ │ +574 &(elementDofs[6]),&(elementDofs[7]),&(elementDofs[8]), │ │ │ │ │ +575 &(elementDofs[9])); │ │ │ │ │ +576 │ │ │ │ │ +577 // insert each vertex if it hasn't been inserted already │ │ │ │ │ +578 for (int i=0; i │ │ │ │ │ +_5_9_7 void _b_o_u_n_d_a_r_y_s_e_g_m_e_n_t___i_n_s_e_r_t( │ │ │ │ │ +598 const V&, │ │ │ │ │ +599 const E&, │ │ │ │ │ +600 const V2& │ │ │ │ │ +601 ) │ │ │ │ │ +602 { │ │ │ │ │ +603 DUNE_THROW(Dune::IOError, "tried to create a 3D boundary segment in a non- │ │ │ │ │ +3D Grid"); │ │ │ │ │ +604 } │ │ │ │ │ +605 │ │ │ │ │ +606 // 3d-case: │ │ │ │ │ +607 template │ │ │ │ │ +_6_0_8 void _b_o_u_n_d_a_r_y_s_e_g_m_e_n_t___i_n_s_e_r_t( │ │ │ │ │ +609 const std::vector >& nodes, │ │ │ │ │ +610 const E& elementDofs, │ │ │ │ │ +611 const V& vertices │ │ │ │ │ +612 ) │ │ │ │ │ +613 { │ │ │ │ │ +614 std::array, 6> v; │ │ │ │ │ +615 for (int i=0; i<6; i++) │ │ │ │ │ +616 for (int j=0; j<_d_i_m_W_o_r_l_d; j++) │ │ │ │ │ +617 v[i][j] = nodes[elementDofs[i]][j]; │ │ │ │ │ +618 │ │ │ │ │ +619 _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 │ │ │ │ │ +620 = (_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], │ │ │ │ │ +621 v[3], v[4], v[5] ); │ │ │ │ │ +622 │ │ │ │ │ +623 _f_a_c_t_o_r_y.insertBoundarySegment( vertices, │ │ │ │ │ +624 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) ); │ │ │ │ │ +625 } │ │ │ │ │ +626 │ │ │ │ │ +627 │ │ │ │ │ +628 │ │ │ │ │ +_6_3_3 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, │ │ │ │ │ +634 std::map & renumber, │ │ │ │ │ +635 const std::vector< GlobalVector > & nodes, │ │ │ │ │ +636 const int physical_entity) │ │ │ │ │ +637 { │ │ │ │ │ +638 // some data about gmsh elements │ │ │ │ │ +639 const int nDofs[16] = {-1, 2, 3, 4, 4, 8, 6, 5, 3, 6, -1, 10, -1, -1, -1, │ │ │ │ │ +1}; │ │ │ │ │ +640 const int nVertices[16] = {-1, 2, 3, 4, 4, 8, 6, 5, 2, 3, -1, 4, -1, -1, - │ │ │ │ │ +1, 1}; │ │ │ │ │ +641 const int elementDim[16] = {-1, 1, 2, 2, 3, 3, 3, 3, 1, 2, -1, 3, -1, -1, - │ │ │ │ │ +1, 0}; │ │ │ │ │ +642 │ │ │ │ │ +643 // test whether we support the element type │ │ │ │ │ +644 if ( not (elm_type > 0 && elm_type <= 15 // index in suitable range? │ │ │ │ │ +645 && (elementDim[elm_type] == _d_i_m || elementDim[elm_type] == (_d_i_m-1) ) ) ) / │ │ │ │ │ +/ real element or boundary element? │ │ │ │ │ +646 { │ │ │ │ │ +647 _s_k_i_p_l_i_n_e(file); // skip rest of line if element is unknown │ │ │ │ │ +648 return; │ │ │ │ │ +649 } │ │ │ │ │ +650 │ │ │ │ │ +651 // The format string for parsing is n times '%d' in a row │ │ │ │ │ +652 std::string formatString = "%d"; │ │ │ │ │ +653 for (int i=1; i elementDofs(10); │ │ │ │ │ +659 │ │ │ │ │ +660 _r_e_a_d_f_i_l_e(file,nDofs[elm_type], formatString.c_str(), │ │ │ │ │ +661 &(elementDofs[0]),&(elementDofs[1]),&(elementDofs[2]), │ │ │ │ │ +662 &(elementDofs[3]),&(elementDofs[4]),&(elementDofs[5]), │ │ │ │ │ +663 &(elementDofs[6]),&(elementDofs[7]),&(elementDofs[8]), │ │ │ │ │ +664 &(elementDofs[9])); │ │ │ │ │ +665 │ │ │ │ │ +666 // correct differences between gmsh and Dune in the local vertex numbering │ │ │ │ │ +667 switch (elm_type) │ │ │ │ │ +668 { │ │ │ │ │ +669 case 3 : // 4-node quadrilateral │ │ │ │ │ +670 _s_t_d_:_:_s_w_a_p(elementDofs[2],elementDofs[3]); │ │ │ │ │ +671 break; │ │ │ │ │ +672 case 5 : // 8-node hexahedron │ │ │ │ │ +673 _s_t_d_:_:_s_w_a_p(elementDofs[2],elementDofs[3]); │ │ │ │ │ +674 _s_t_d_:_:_s_w_a_p(elementDofs[6],elementDofs[7]); │ │ │ │ │ +675 break; │ │ │ │ │ +676 case 7 : // 5-node pyramid │ │ │ │ │ +677 _s_t_d_:_:_s_w_a_p(elementDofs[2],elementDofs[3]); │ │ │ │ │ +678 break; │ │ │ │ │ +679 } │ │ │ │ │ +680 │ │ │ │ │ +681 // renumber corners to account for the explicitly given vertex │ │ │ │ │ +682 // numbering in the file │ │ │ │ │ +683 std::vector vertices(nVertices[elm_type]); │ │ │ │ │ +684 │ │ │ │ │ +685 for (int i=0; i, 3> v; │ │ │ │ │ +746 for (int i=0; i<_d_i_m_W_o_r_l_d; i++) { │ │ │ │ │ +747 v[0][i] = nodes[elementDofs[0]][i]; │ │ │ │ │ +748 v[1][i] = nodes[elementDofs[2]][i]; // yes, the renumbering is intended! │ │ │ │ │ +749 v[2][i] = nodes[elementDofs[1]][i]; │ │ │ │ │ +750 } │ │ │ │ │ +751 _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 │ │ │ │ │ +752 = (_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]); │ │ │ │ │ +753 _f_a_c_t_o_r_y.insertBoundarySegment(vertices, │ │ │ │ │ +754 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)); │ │ │ │ │ +755 break; │ │ │ │ │ +756 } │ │ │ │ │ +757 case 9 : { // 6-node triangle │ │ │ │ │ +758 _b_o_u_n_d_a_r_y_s_e_g_m_e_n_t___i_n_s_e_r_t(nodes, elementDofs, vertices); │ │ │ │ │ +759 break; │ │ │ │ │ +760 } │ │ │ │ │ +761 default: { │ │ │ │ │ +762 DUNE_THROW(Dune::IOError, "GmshReader does not support using element-type " │ │ │ │ │ +<< elm_type << " for boundary segments"); │ │ │ │ │ +763 break; │ │ │ │ │ +764 } │ │ │ │ │ +765 │ │ │ │ │ +766 } │ │ │ │ │ +767 │ │ │ │ │ +768 } │ │ │ │ │ +769 } │ │ │ │ │ +770 │ │ │ │ │ +771 // count elements and boundary elements │ │ │ │ │ +772 if (elementDim[elm_type] == _d_i_m) { │ │ │ │ │ +773 _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; │ │ │ │ │ +774 _e_l_e_m_e_n_t___c_o_u_n_t++; │ │ │ │ │ +775 } else { │ │ │ │ │ +776 _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; │ │ │ │ │ +777 _b_o_u_n_d_a_r_y___e_l_e_m_e_n_t___c_o_u_n_t++; │ │ │ │ │ +778 } │ │ │ │ │ +779 │ │ │ │ │ +780 } │ │ │ │ │ +781 │ │ │ │ │ +782 }; │ │ │ │ │ +783 │ │ │ │ │ +_7_8_4 namespace Gmsh { │ │ │ │ │ +_7_9_0 enum class _R_e_a_d_e_r_O_p_t_i_o_n_s │ │ │ │ │ +791 { │ │ │ │ │ +792 _v_e_r_b_o_s_e = 1, │ │ │ │ │ +793 _i_n_s_e_r_t_B_o_u_n_d_a_r_y_S_e_g_m_e_n_t_s = 2, │ │ │ │ │ +794 _r_e_a_d_E_l_e_m_e_n_t_D_a_t_a = 4, │ │ │ │ │ +795 _r_e_a_d_B_o_u_n_d_a_r_y_D_a_t_a = 8 │ │ │ │ │ +796 }; │ │ │ │ │ +797 │ │ │ │ │ +_7_9_9 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) │ │ │ │ │ +800 { │ │ │ │ │ +801 return static_cast<_R_e_a_d_e_r_O_p_t_i_o_n_s>( │ │ │ │ │ +802 static_cast(a) | static_cast(b) │ │ │ │ │ +803 ); │ │ │ │ │ +804 } │ │ │ │ │ +805 │ │ │ │ │ +_8_0_7 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) │ │ │ │ │ +808 { │ │ │ │ │ +809 return static_cast(a) & static_cast(b); │ │ │ │ │ +810 } │ │ │ │ │ +811 │ │ │ │ │ +812 } // end namespace Gmsh │ │ │ │ │ +813 │ │ │ │ │ +838 template │ │ │ │ │ +_8_3_9 class _G_m_s_h_R_e_a_d_e_r │ │ │ │ │ +840 { │ │ │ │ │ +842 │ │ │ │ │ +861 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, │ │ │ │ │ +862 const std::string &fileName, │ │ │ │ │ +863 std::vector& boundarySegmentToPhysicalEntity, │ │ │ │ │ +864 std::vector& elementToPhysicalEntity, │ │ │ │ │ +865 bool verbose, bool insertBoundarySegments) │ │ │ │ │ +866 { │ │ │ │ │ +867 // register boundary segment to boundary segment factory for possible load │ │ │ │ │ +balancing │ │ │ │ │ +868 // this needs to be done on all cores since the type might not be known │ │ │ │ │ +otherwise │ │ │ │ │ +869 GmshReaderQuadraticBoundarySegment< Grid::dimension, Grid::dimensionworld │ │ │ │ │ +>::registerFactory(); │ │ │ │ │ +870 │ │ │ │ │ +871#ifndef NDEBUG │ │ │ │ │ +872 // check that this method is called on all cores │ │ │ │ │ +873 factory._c_o_m_m().barrier(); │ │ │ │ │ +874#endif │ │ │ │ │ +875 │ │ │ │ │ +876 // create parse object and read grid on process 0 │ │ │ │ │ +877 if (factory._c_o_m_m().rank() == 0) │ │ │ │ │ +878 { │ │ │ │ │ +879 _G_m_s_h_R_e_a_d_e_r_P_a_r_s_e_r_<_G_r_i_d_> parser(factory,verbose,insertBoundarySegments); │ │ │ │ │ +880 parser._r_e_a_d(fileName); │ │ │ │ │ +881 │ │ │ │ │ +882 boundarySegmentToPhysicalEntity = std::move(parser._b_o_u_n_d_a_r_y_I_d_M_a_p()); │ │ │ │ │ +883 elementToPhysicalEntity = std::move(parser._e_l_e_m_e_n_t_I_n_d_e_x_M_a_p()); │ │ │ │ │ +884 } │ │ │ │ │ +885 else │ │ │ │ │ +886 { │ │ │ │ │ +887 boundarySegmentToPhysicalEntity = {}; │ │ │ │ │ +888 elementToPhysicalEntity = {}; │ │ │ │ │ +889 } │ │ │ │ │ +890 } │ │ │ │ │ +891 │ │ │ │ │ +893 │ │ │ │ │ +912 template │ │ │ │ │ +913 static T &discarded(T &&value) { return static_cast(value); } │ │ │ │ │ +914 │ │ │ │ │ +915 struct DataArg { │ │ │ │ │ +916 std::vector *data_ = nullptr; │ │ │ │ │ +917 DataArg(std::vector &data) : data_(&data) {} │ │ │ │ │ +918 DataArg(const decltype(std::ignore)&) {} │ │ │ │ │ +919 DataArg() = default; │ │ │ │ │ +920 }; │ │ │ │ │ +921 │ │ │ │ │ +922 struct DataFlagArg : DataArg { │ │ │ │ │ +923 bool flag_ = false; │ │ │ │ │ +924 using DataArg::DataArg; │ │ │ │ │ +925 DataFlagArg(bool flag) : flag_(flag) {} │ │ │ │ │ +926 }; │ │ │ │ │ +927 │ │ │ │ │ +928 public: │ │ │ │ │ +_9_2_9 typedef GridType _G_r_i_d; │ │ │ │ │ +930 │ │ │ │ │ +_9_3_7 static std::unique_ptr _r_e_a_d (const std::string& fileName, bool │ │ │ │ │ +verbose = true, bool insertBoundarySegments=true) │ │ │ │ │ +938 { │ │ │ │ │ +939 // make a grid factory │ │ │ │ │ +940 _D_u_n_e_:_:_G_r_i_d_F_a_c_t_o_r_y_<_G_r_i_d_> factory; │ │ │ │ │ +941 │ │ │ │ │ +942 _r_e_a_d(factory, fileName, verbose, insertBoundarySegments); │ │ │ │ │ +943 │ │ │ │ │ +944 return factory._c_r_e_a_t_e_G_r_i_d(); │ │ │ │ │ +945 } │ │ │ │ │ +946 │ │ │ │ │ +_9_6_6 static std::unique_ptr _r_e_a_d (const std::string& fileName, │ │ │ │ │ +967 std::vector& boundarySegmentToPhysicalEntity, │ │ │ │ │ +968 std::vector& elementToPhysicalEntity, │ │ │ │ │ +969 bool verbose = true, bool insertBoundarySegments=true) │ │ │ │ │ +970 { │ │ │ │ │ +971 // make a grid factory │ │ │ │ │ +972 _D_u_n_e_:_:_G_r_i_d_F_a_c_t_o_r_y_<_G_r_i_d_> factory; │ │ │ │ │ +973 │ │ │ │ │ +974 doRead( │ │ │ │ │ +975 factory, fileName, boundarySegmentToPhysicalEntity, │ │ │ │ │ +976 elementToPhysicalEntity, verbose, insertBoundarySegments │ │ │ │ │ +977 ); │ │ │ │ │ +978 │ │ │ │ │ +979 return factory._c_r_e_a_t_e_G_r_i_d(); │ │ │ │ │ +980 } │ │ │ │ │ +981 │ │ │ │ │ +_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, const std::string& │ │ │ │ │ +fileName, │ │ │ │ │ +984 bool verbose = true, bool insertBoundarySegments=true) │ │ │ │ │ +985 { │ │ │ │ │ +986 doRead( │ │ │ │ │ +987 factory, fileName, discarded(std::vector{}), │ │ │ │ │ +988 discarded(std::vector{}), verbose, insertBoundarySegments │ │ │ │ │ +989 ); │ │ │ │ │ +990 } │ │ │ │ │ +991 │ │ │ │ │ +993 │ │ │ │ │ +_1_0_1_6 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, │ │ │ │ │ +1017 const std::string &fileName, │ │ │ │ │ +1018 DataFlagArg boundarySegmentData, │ │ │ │ │ +1019 DataArg _e_l_e_m_e_n_t_D_a_t_a, │ │ │ │ │ +1020 bool verbose=true) │ │ │ │ │ +1021 { │ │ │ │ │ +1022 doRead( │ │ │ │ │ +1023 factory, fileName, │ │ │ │ │ +1024 boundarySegmentData.data_ │ │ │ │ │ +1025 ? *boundarySegmentData.data_ : discarded(std::vector{}), │ │ │ │ │ +1026 _e_l_e_m_e_n_t_D_a_t_a.data_ │ │ │ │ │ +1027 ? *_e_l_e_m_e_n_t_D_a_t_a.data_ : discarded(std::vector{}), │ │ │ │ │ +1028 verbose, │ │ │ │ │ +1029 boundarySegmentData.flag_ || boundarySegmentData.data_ │ │ │ │ │ +1030 ); │ │ │ │ │ +1031 } │ │ │ │ │ +1032 │ │ │ │ │ +_1_0_5_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, │ │ │ │ │ +1054 const std::string& fileName, │ │ │ │ │ +1055 std::vector& boundarySegmentToPhysicalEntity, │ │ │ │ │ +1056 std::vector& elementToPhysicalEntity, │ │ │ │ │ +1057 bool verbose, bool insertBoundarySegments) │ │ │ │ │ +1058 { │ │ │ │ │ +1059 doRead( │ │ │ │ │ +1060 factory, fileName, boundarySegmentToPhysicalEntity, │ │ │ │ │ +1061 elementToPhysicalEntity, verbose, insertBoundarySegments │ │ │ │ │ +1062 ); │ │ │ │ │ +1063 } │ │ │ │ │ +1064 │ │ │ │ │ +1066 //\{ │ │ │ │ │ +1067 │ │ │ │ │ +_1_0_6_8 using _O_p_t_s = _G_m_s_h_:_:_R_e_a_d_e_r_O_p_t_i_o_n_s; │ │ │ │ │ +1069 │ │ │ │ │ +_1_0_7_0 static constexpr _O_p_t_s _d_e_f_a_u_l_t_O_p_t_s = │ │ │ │ │ +1071 Opts::verbose | Opts::insertBoundarySegments | Opts::readElementData | │ │ │ │ │ +Opts::readBoundaryData; │ │ │ │ │ +1072 │ │ │ │ │ +1074 │ │ │ │ │ +_1_0_9_7 _G_m_s_h_R_e_a_d_e_r(const std::string& fileName, │ │ │ │ │ +1098 _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) │ │ │ │ │ +1099 { │ │ │ │ │ +1100 gridFactory_ = std::make_unique>(); │ │ │ │ │ +1101 readGridFile(fileName, *gridFactory_, options); │ │ │ │ │ +1102 } │ │ │ │ │ +1103 │ │ │ │ │ +_1_1_1_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, │ │ │ │ │ +1112 _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) │ │ │ │ │ +1113 { │ │ │ │ │ +1114 readGridFile(fileName, factory, options); │ │ │ │ │ +1115 } │ │ │ │ │ +1116 │ │ │ │ │ +_1_1_1_8 const std::vector& _e_l_e_m_e_n_t_D_a_t_a () const │ │ │ │ │ +1119 { │ │ │ │ │ +1120 checkElementData(); │ │ │ │ │ +1121 return elementIndexToGmshPhysicalEntity_; │ │ │ │ │ +1122 } │ │ │ │ │ +1123 │ │ │ │ │ +_1_1_2_5 const std::vector& _b_o_u_n_d_a_r_y_D_a_t_a () const │ │ │ │ │ +1126 { │ │ │ │ │ +1127 checkBoundaryData(); │ │ │ │ │ +1128 return boundarySegmentIndexToGmshPhysicalEntity_; │ │ │ │ │ +1129 } │ │ │ │ │ +1130 │ │ │ │ │ +_1_1_3_5 bool _h_a_s_E_l_e_m_e_n_t_D_a_t_a () const │ │ │ │ │ +1136 { return hasElementData_ && !extractedElementData_; } │ │ │ │ │ +1137 │ │ │ │ │ +_1_1_4_2 bool _h_a_s_B_o_u_n_d_a_r_y_D_a_t_a () const │ │ │ │ │ +1143 { return hasBoundaryData_ && !extractedBoundaryData_; } │ │ │ │ │ +1144 │ │ │ │ │ +_1_1_4_6 std::vector _e_x_t_r_a_c_t_E_l_e_m_e_n_t_D_a_t_a () │ │ │ │ │ +1147 { │ │ │ │ │ +1148 checkElementData(); │ │ │ │ │ +1149 extractedElementData_ = true; │ │ │ │ │ +1150 return std::move(elementIndexToGmshPhysicalEntity_); │ │ │ │ │ +1151 } │ │ │ │ │ +1152 │ │ │ │ │ +_1_1_5_4 std::vector _e_x_t_r_a_c_t_B_o_u_n_d_a_r_y_D_a_t_a () │ │ │ │ │ +1155 { │ │ │ │ │ +1156 checkBoundaryData(); │ │ │ │ │ +1157 extractedBoundaryData_ = true; │ │ │ │ │ +1158 return std::move(boundarySegmentIndexToGmshPhysicalEntity_); │ │ │ │ │ +1159 } │ │ │ │ │ +1160 │ │ │ │ │ +_1_1_6_2 std::unique_ptr _c_r_e_a_t_e_G_r_i_d () │ │ │ │ │ +1163 { │ │ │ │ │ +1164 if (!gridFactory_) │ │ │ │ │ +1165 DUNE_THROW(Dune::InvalidStateException, │ │ │ │ │ +1166 "This GmshReader has been constructed with a Dune::GridFactory. " │ │ │ │ │ +1167 << "This grid factory has been filled with all information to create a │ │ │ │ │ +grid. " │ │ │ │ │ +1168 << "Please use this factory to create the grid by calling │ │ │ │ │ +factory.createGrid(). " │ │ │ │ │ +1169 << "Alternatively use the constructor without passing the factory in │ │ │ │ │ +combination with this member function." │ │ │ │ │ +1170 ); │ │ │ │ │ +1171 │ │ │ │ │ +1172 return gridFactory_->createGrid(); │ │ │ │ │ +1173 } │ │ │ │ │ +1174 │ │ │ │ │ +1175 //\} │ │ │ │ │ +1176 │ │ │ │ │ +1177 private: │ │ │ │ │ +1178 void checkElementData () const │ │ │ │ │ +1179 { │ │ │ │ │ +1180 if (!hasElementData_) │ │ │ │ │ +1181 DUNE_THROW(Dune::InvalidStateException, │ │ │ │ │ +1182 "This GmshReader has been constructed without the option │ │ │ │ │ +'readElementData'. " │ │ │ │ │ +1183 << "Please enable reading element data by passing the option 'Gmsh:: │ │ │ │ │ +ReaderOpts::readElementData' " │ │ │ │ │ +1184 << "to the constructor of this class." │ │ │ │ │ +1185 ); │ │ │ │ │ +1186 │ │ │ │ │ +1187 if (extractedElementData_) │ │ │ │ │ +1188 DUNE_THROW(Dune::InvalidStateException, │ │ │ │ │ +1189 "The element data has already been extracted from this GmshReader " │ │ │ │ │ +1190 << "via a function call to reader.extractElementData(). Use the extracted │ │ │ │ │ +data or " │ │ │ │ │ +1191 << "read the grid data from file again by constructing a new reader." │ │ │ │ │ +1192 ); │ │ │ │ │ +1193 } │ │ │ │ │ +1194 │ │ │ │ │ +1195 void checkBoundaryData () const │ │ │ │ │ +1196 { │ │ │ │ │ +1197 if (!hasBoundaryData_) │ │ │ │ │ +1198 DUNE_THROW(Dune::InvalidStateException, │ │ │ │ │ +1199 "This GmshReader has been constructed without the option │ │ │ │ │ +'readBoundaryData'. " │ │ │ │ │ +1200 << "Please enable reading boundary data by passing the option 'Gmsh:: │ │ │ │ │ +ReaderOpts::readBoundaryData' " │ │ │ │ │ +1201 << "to the constructor of this class." │ │ │ │ │ +1202 ); │ │ │ │ │ +1203 │ │ │ │ │ +1204 if (extractedBoundaryData_) │ │ │ │ │ +1205 DUNE_THROW(Dune::InvalidStateException, │ │ │ │ │ +1206 "The boundary data has already been extracted from this GmshReader " │ │ │ │ │ +1207 << "via a function call to reader.extractBoundaryData(). Use the extracted │ │ │ │ │ +data or " │ │ │ │ │ +1208 << "read the grid data from file again by constructing a new reader." │ │ │ │ │ +1209 ); │ │ │ │ │ +1210 } │ │ │ │ │ +1211 │ │ │ │ │ +1212 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) │ │ │ │ │ +1213 { │ │ │ │ │ +1214 const bool _v_e_r_b_o_s_e = options & Opts::verbose; │ │ │ │ │ +1215 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; │ │ │ │ │ +1216 const bool _r_e_a_d_B_o_u_n_d_a_r_y_D_a_t_a = options & Opts::readBoundaryData; │ │ │ │ │ +1217 const bool _r_e_a_d_E_l_e_m_e_n_t_D_a_t_a = options & Opts::readElementData; │ │ │ │ │ +1218 │ │ │ │ │ +1219 doRead( │ │ │ │ │ +1220 factory, fileName, boundarySegmentIndexToGmshPhysicalEntity_, │ │ │ │ │ +1221 elementIndexToGmshPhysicalEntity_, verbose, │ │ │ │ │ +1222 readBoundaryData || insertBoundarySegments │ │ │ │ │ +1223 ); │ │ │ │ │ +1224 │ │ │ │ │ +1225 // clear unwanted data │ │ │ │ │ +1226 if (!readBoundaryData) │ │ │ │ │ +1227 boundarySegmentIndexToGmshPhysicalEntity_ = std::vector{}; │ │ │ │ │ +1228 if (!readElementData) │ │ │ │ │ +1229 elementIndexToGmshPhysicalEntity_ = std::vector{}; │ │ │ │ │ +1230 │ │ │ │ │ +1231 hasElementData_ = _r_e_a_d_E_l_e_m_e_n_t_D_a_t_a; │ │ │ │ │ +1232 hasBoundaryData_ = _r_e_a_d_B_o_u_n_d_a_r_y_D_a_t_a; │ │ │ │ │ +1233 } │ │ │ │ │ +1234 │ │ │ │ │ +1235 std::unique_ptr> gridFactory_; │ │ │ │ │ +1236 │ │ │ │ │ +1237 std::vector elementIndexToGmshPhysicalEntity_; │ │ │ │ │ +1238 std::vector boundarySegmentIndexToGmshPhysicalEntity_; │ │ │ │ │ +1239 │ │ │ │ │ +1240 bool hasElementData_; │ │ │ │ │ +1241 bool hasBoundaryData_; │ │ │ │ │ +1242 │ │ │ │ │ +1243 // for better error messages, we keep track of these separately │ │ │ │ │ +1244 bool extractedElementData_ = false; │ │ │ │ │ +1245 bool extractedBoundaryData_ = false; │ │ │ │ │ +1246 }; │ │ │ │ │ +1247 │ │ │ │ │ +1250} // namespace Dune │ │ │ │ │ +1251 │ │ │ │ │ +1252#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:791 │ │ │ │ │ +_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_:_:_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:93 │ │ │ │ │ -_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_:_:_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:807 │ │ │ │ │ +_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:799 │ │ │ │ │ +_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:258 │ │ │ │ │ +_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:275 │ │ │ │ │ +_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:333 │ │ │ │ │ +_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_h_y_s_i_c_a_l_E_n_t_i_t_y_N_a_m_e_s │ │ │ │ │ +std::vector< std::string > & physicalEntityNames() │ │ │ │ │ +Returns the names of the gmsh physical entities (0-based index) │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:373 │ │ │ │ │ +_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:545 │ │ │ │ │ +_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:321 │ │ │ │ │ +_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:361 │ │ │ │ │ +_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,...) │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:331 │ │ │ │ │ +_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() │ │ │ │ │ +Returns a map for the gmsh physical entity id (1-based index) for each entity │ │ │ │ │ +of codim 0. │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:367 │ │ │ │ │ +_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:608 │ │ │ │ │ +_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:358 │ │ │ │ │ +_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:378 │ │ │ │ │ +_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:348 │ │ │ │ │ +_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:633 │ │ │ │ │ +_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:320 │ │ │ │ │ +_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:325 │ │ │ │ │ +_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_:_:_p_h_y_s_i_c_a_l___e_n_t_i_t_y___n_a_m_e_s │ │ │ │ │ +std::vector< std::string > physical_entity_names │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:317 │ │ │ │ │ +_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:597 │ │ │ │ │ +_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:840 │ │ │ │ │ +_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:966 │ │ │ │ │ +_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:1118 │ │ │ │ │ +_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:1016 │ │ │ │ │ +_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:937 │ │ │ │ │ +_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:983 │ │ │ │ │ +_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_:_:_G_r_i_d │ │ │ │ │ +GridType Grid │ │ │ │ │ +DDeeffiinniittiioonn gmshreader.hh:929 │ │ │ │ │ +_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:1162 │ │ │ │ │ +_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:1154 │ │ │ │ │ +_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:1053 │ │ │ │ │ +_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:1135 │ │ │ │ │ +_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:1142 │ │ │ │ │ +_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:1070 │ │ │ │ │ +_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:1111 │ │ │ │ │ +_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:1097 │ │ │ │ │ +_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:1146 │ │ │ │ │ +_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:1125 │ │ │ │ │ +_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/a00833.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: boundarydom.cc File Reference │ │ │ │ +dune-grid: dgfug.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,24 +65,26 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Namespaces
│ │ │ │ -
boundarydom.cc File Reference
│ │ │ │ +
dgfug.cc File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/grid/io/file/dgfparser/blocks/boundarydom.hh>
│ │ │ │ +
#include <dune/geometry/utility/typefromvertexcount.hh>
│ │ │ │ +#include <dune-grid-config.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/dgfug.hh>
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,18 +3,19 @@ │ │ │ │ │ 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 <_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> │ │ │ │ │ +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. │ │ │ │ │   │ │ │ │ │ namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00836.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dim.cc File Reference │ │ │ │ +dune-grid: gmsh2dgf.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,33 +65,70 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Namespaces
│ │ │ │ -
dim.cc File Reference
│ │ │ │ +Functions
│ │ │ │ +
gmsh2dgf.cc File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/grid/io/file/dgfparser/blocks/dim.hh>
│ │ │ │ + │ │ │ │ +

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

│ │ │ │ +
#include <iostream>
│ │ │ │ +#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.
 
namespace  Dune::dgf
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ -Namespaces

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

│ │ │ │ +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[] 
)
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,19 +3,33 @@ │ │ │ │ │ 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 │ │ │ │ │ -dim.cc File Reference │ │ │ │ │ -#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 │ │ │ │ │ + * _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 <_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 ********** │ │ │ │ │ +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/a00839.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: gridparameter.cc File Reference │ │ │ │ +dune-grid: dgf2dgf.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,33 +65,74 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Namespaces
│ │ │ │ -
gridparameter.cc File Reference
│ │ │ │ +Functions
│ │ │ │ +
dgf2dgf.cc File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/grid/io/file/dgfparser/blocks/gridparameter.hh>
│ │ │ │ + │ │ │ │ +

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

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

│ │ │ │ -Namespaces

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

│ │ │ │ +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 {} │ │ │ │ │ @@ -3,19 +3,41 @@ │ │ │ │ │ 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 <_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 │ │ │ │ │ + * _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 <_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/a00842.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: basic.hh File Reference │ │ │ │ +dune-grid: dgfgridfactory.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,53 +65,47 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces | │ │ │ │ -Functions
│ │ │ │ -
basic.hh File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
dgfgridfactory.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <cassert>
│ │ │ │ -#include <cctype>
│ │ │ │ -#include <iostream>
│ │ │ │ +
#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>
│ │ │ │ +#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>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::dgf::BasicBlock
struct  Dune::DGFGridFactory< G >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ Namespaces

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

│ │ │ │ -Functions

void Dune::dgf::makeupcase (std ::string &s)
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,33 +3,29 @@ │ │ │ │ │ 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 │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +dgfgridfactory.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 │ │ │ │ │ +#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_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k │ │ │ │ │ +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_:_:_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/a00842_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: basic.hh Source File │ │ │ │ +dune-grid: dgfgridfactory.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,172 +70,271 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
basic.hh
│ │ │ │ +
dgfgridfactory.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_GRIDFACTORY_HH
│ │ │ │ +
6#define DUNE_DGF_GRIDFACTORY_HH
│ │ │ │
7
│ │ │ │ -
8#include <cassert>
│ │ │ │ -
9#include <cctype>
│ │ │ │ -
10#include <iostream>
│ │ │ │ -
11#include <string>
│ │ │ │ -
12#include <sstream>
│ │ │ │ +
8#include <iostream>
│ │ │ │ +
9#include <string>
│ │ │ │ +
10#include <vector>
│ │ │ │ +
11#include <map>
│ │ │ │ +
12#include <assert.h>
│ │ │ │
13
│ │ │ │ -
14#include <dune/common/stdstreams.hh>
│ │ │ │ - │ │ │ │ - │ │ │ │ +
14#include <dune/common/parallel/mpihelper.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 );
│ │ │ │ +
21
│ │ │ │ +
22namespace Dune
│ │ │ │ +
23{
│ │ │ │ +
24
│ │ │ │ +
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 // count the number of lines in the block
│ │ │ │ -
44 // int countlines ();
│ │ │ │ +
43 private:
│ │ │ │ +
44 typedef typename Grid::template Codim< 0 >::Entity Element;
│ │ │ │
45
│ │ │ │ -
46 protected:
│ │ │ │ -
47 std::stringstream line; // the active line as string buffer
│ │ │ │ -
48 // for use in the derived classes
│ │ │ │ +
46 typedef typename Grid::template Codim< dimension >::Entity Vertex;
│ │ │ │ +
47
│ │ │ │ +
48 public:
│ │ │ │
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
│ │ │ │ - │ │ │ │ - │ │ │ │ +
│ │ │ │ +
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;
│ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
void makeupcase(std ::string &s)
Definition basic.hh:24
│ │ │ │ -
Definition basic.hh:31
│ │ │ │ -
void reset()
Definition basic.hh:51
│ │ │ │ -
bool getnextline()
Definition basic.cc:93
│ │ │ │ -
bool findtoken(std ::string token)
Definition basic.cc:122
│ │ │ │ -
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:103
│ │ │ │ +
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 {} │ │ │ │ │ @@ -3,174 +3,308 @@ │ │ │ │ │ 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 │ │ │ │ │ +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 © 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_GRIDFACTORY_HH │ │ │ │ │ +6#define DUNE_DGF_GRIDFACTORY_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11#include │ │ │ │ │ -12#include │ │ │ │ │ +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> │ │ │ │ │ +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{ │ │ │ │ │ +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 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 │ │ │ │ │ +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 // count the number of lines in the block │ │ │ │ │ -44 // int countlines (); │ │ │ │ │ +43 private: │ │ │ │ │ +44 typedef typename _G_r_i_d_:_:_t_e_m_p_l_a_t_e Codim< 0 >::Entity Element; │ │ │ │ │ 45 │ │ │ │ │ -46 protected: │ │ │ │ │ -_4_7 std::stringstream _l_i_n_e; // the active line as string buffer │ │ │ │ │ -48 // for use in the derived classes │ │ │ │ │ +46 typedef typename _G_r_i_d_:_:_t_e_m_p_l_a_t_e Codim< dimension >::Entity Vertex; │ │ │ │ │ +47 │ │ │ │ │ +48 public: │ │ │ │ │ 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 () │ │ │ │ │ +_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 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 │ │ │ │ │ +79 std::vector< double > coord; │ │ │ │ │ +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() ); │ │ │ │ │ +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 │ │ │ │ │ +_p_a_r_s_e_r_._h_h │ │ │ │ │ +_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 │ │ │ │ │ -_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:93 │ │ │ │ │ -_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:122 │ │ │ │ │ -_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:103 │ │ │ │ │ +_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/a00845.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: cube.hh File Reference │ │ │ │ +dune-grid: dgfwriter.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,44 +65,59 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
cube.hh File Reference
│ │ │ │ +
dgfwriter.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ + │ │ │ │ +

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

│ │ │ │
#include <cassert>
│ │ │ │ -#include <iostream>
│ │ │ │ +#include <cstddef>
│ │ │ │ +#include <algorithm>
│ │ │ │ +#include <fstream>
│ │ │ │ +#include <string>
│ │ │ │ +#include <type_traits>
│ │ │ │ +#include <utility>
│ │ │ │ #include <vector>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/blocks/basic.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

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

│ │ │ │ Namespaces

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

Detailed Description

│ │ │ │ +

write a GridView to a DGF file

│ │ │ │ +
Author
Martin Nolte
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,26 +3,39 @@ │ │ │ │ │ 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 │ │ │ │ │ +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_/_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 <_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 │ │ │ │ │ -class   _D_u_n_e_:_:_d_g_f_:_:_C_u_b_e_B_l_o_c_k │ │ │ │ │ +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_:_:_d_g_f │ │ │ │ │ -  │ │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ +write a GridView to a DGF file │ │ │ │ │ + Author │ │ │ │ │ + Martin Nolte │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00845_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: cube.hh Source File │ │ │ │ +dune-grid: dgfwriter.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,96 +70,466 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
cube.hh
│ │ │ │ +
dgfwriter.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_GRID_IO_FILE_DGFPARSER_DGFWRITER_HH
│ │ │ │ +
6#define DUNE_GRID_IO_FILE_DGFPARSER_DGFWRITER_HH
│ │ │ │
7
│ │ │ │ -
8#include <cassert>
│ │ │ │ -
9#include <iostream>
│ │ │ │ -
10#include <vector>
│ │ │ │ -
11
│ │ │ │ - │ │ │ │ -
13
│ │ │ │ -
14
│ │ │ │ -
15namespace Dune
│ │ │ │ -
16{
│ │ │ │ -
17
│ │ │ │ -
18 namespace dgf
│ │ │ │ -
19 {
│ │ │ │ -
20
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ +
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:134
│ │ │ │ +
Traits::Intersection Intersection
type of the intersection
Definition common/gridview.hh:89
│ │ │ │
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:102
│ │ │ │ -
int nofsimplex()
Definition cube.hh:44
│ │ │ │ -
bool ok()
Definition cube.hh:39
│ │ │ │ +
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 common/indexidset.hh:92
│ │ │ │ +
A struct that collects all associated types of one implementation from the Traits class.
Definition common/gridview.hh:104
│ │ │ │ +
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 {} │ │ │ │ │ @@ -3,96 +3,557 @@ │ │ │ │ │ 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 │ │ │ │ │ +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 © 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_GRID_IO_FILE_DGFPARSER_DGFWRITER_HH │ │ │ │ │ +6#define DUNE_GRID_IO_FILE_DGFPARSER_DGFWRITER_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 { │ │ │ │ │ -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 } │ │ │ │ │ +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 │ │ │ │ │ -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 │ │ │ │ │ +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:134 │ │ │ │ │ +_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_:_:_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:102 │ │ │ │ │ -_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_:_:_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 common/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:104 │ │ │ │ │ +_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. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00848.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: macrogrid.hh File Reference │ │ │ │ +dune-grid: parser.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,26 +72,32 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
macrogrid.hh File Reference
│ │ │ │ +
parser.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include <iostream>
│ │ │ │ -#include <dune/common/parallel/mpihelper.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/parser.hh>
│ │ │ │ +#include <string>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <map>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/entitykey.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::MacroGrid
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...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -4,21 +4,28 @@ │ │ │ │ │ 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 │ │ │ │ │ +parser.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> │ │ │ │ │ +#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> │ │ │ │ │ _G_o_ _t_o_ _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 │ │ │ │ │ +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. │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00848_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: macrogrid.hh Source File │ │ │ │ +dune-grid: parser.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,114 +74,226 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
macrogrid.hh
│ │ │ │ +
parser.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │ +
5#ifndef DUNE_DGF_DUNEGRIDFORMATPARSER_HH
│ │ │ │ +
6#define DUNE_DGF_DUNEGRIDFORMATPARSER_HH
│ │ │ │
7
│ │ │ │ -
8
│ │ │ │ -
9#include <iostream>
│ │ │ │ -
10
│ │ │ │ -
11#include <dune/common/parallel/mpihelper.hh>
│ │ │ │ - │ │ │ │ -
13
│ │ │ │ +
8#include <iostream>
│ │ │ │ +
9#include <string>
│ │ │ │ +
10#include <vector>
│ │ │ │ +
11#include <map>
│ │ │ │ +
12
│ │ │ │ + │ │ │ │
14
│ │ │ │
15namespace Dune
│ │ │ │
16{
│ │ │ │ -
17 // forward declarations
│ │ │ │ -
18 // --------------------
│ │ │ │ -
19 class DuneGridFormatParser;
│ │ │ │ -
20
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
22 : protected DuneGridFormatParser
│ │ │ │ +
17
│ │ │ │ +
18 class DGFPrintInfo;
│ │ │ │ +
19
│ │ │ │ +
│ │ │ │ + │ │ │ │
23 {
│ │ │ │ -
24 template< class GridType >
│ │ │ │ -
25 friend struct DGFGridFactory;
│ │ │ │ +
25 typedef std::string type;
│ │ │ │
26
│ │ │ │ -
27 public:
│ │ │ │ -
28 typedef MPIHelper::MPICommunicator MPICommunicatorType;
│ │ │ │ -
29
│ │ │ │ -
30 protected:
│ │ │ │ -
│ │ │ │ -
32 MacroGrid(const char* filename, MPICommunicatorType MPICOMM = MPIHelper::getCommunicator())
│ │ │ │ -
33 : DuneGridFormatParser( rank(MPICOMM), size(MPICOMM) )
│ │ │ │ -
34 , filename_(filename)
│ │ │ │ -
35 , MPICOMM_(MPICOMM) {}
│ │ │ │ -
│ │ │ │ -
36
│ │ │ │ -
│ │ │ │ -
38 MacroGrid(MPICommunicatorType MPICOMM = MPIHelper::getCommunicator())
│ │ │ │ -
39 : DuneGridFormatParser( rank(MPICOMM), size(MPICOMM) )
│ │ │ │ -
40 , filename_(0)
│ │ │ │ -
41 , MPICOMM_(MPICOMM) {}
│ │ │ │ -
│ │ │ │ -
42
│ │ │ │ -
44 template <class GridType>
│ │ │ │ -
│ │ │ │ -
45 inline GridType * createGrid ()
│ │ │ │ -
46 {
│ │ │ │ -
47 return Impl<GridType>::generate(*this,filename_,MPICOMM_);
│ │ │ │ -
48 }
│ │ │ │ -
│ │ │ │ -
49 private:
│ │ │ │ -
50 static int rank( [[maybe_unused]] MPICommunicatorType MPICOMM )
│ │ │ │ -
51 {
│ │ │ │ -
52 int rank = 0;
│ │ │ │ -
53#if HAVE_MPI
│ │ │ │ -
54 MPI_Comm_rank( MPICOMM, &rank );
│ │ │ │ -
55#endif
│ │ │ │ -
56 return rank;
│ │ │ │ -
57 }
│ │ │ │ -
58 static int size( [[maybe_unused]] MPICommunicatorType MPICOMM )
│ │ │ │ -
59 {
│ │ │ │ -
60 int size = 1;
│ │ │ │ -
61#if HAVE_MPI
│ │ │ │ -
62 MPI_Comm_size( MPICOMM, &size );
│ │ │ │ -
63#endif
│ │ │ │ -
64 return size;
│ │ │ │ -
65 }
│ │ │ │ -
77 template< class GridType >
│ │ │ │ -
78 struct Impl
│ │ │ │ -
79 {
│ │ │ │ -
80 static GridType* generate(MacroGrid& mg,
│ │ │ │ -
81 const char* filename, MPICommunicatorType MPICOMM = MPIHelper::getCommunicator() )
│ │ │ │ -
82 {
│ │ │ │ -
83 // make assertion depend on the template argument but always evaluate to false
│ │ │ │ -
84 static_assert( GridType::dimension<0,"DGF grid factory missing. Did you forget to add the corresponding dgf header?");
│ │ │ │ -
85 }
│ │ │ │ -
86 };
│ │ │ │ -
87
│ │ │ │ -
88 const char* filename_;
│ │ │ │ -
89 MPICommunicatorType MPICOMM_;
│ │ │ │ -
90 };
│ │ │ │ -
│ │ │ │ -
91
│ │ │ │ -
92} // end namespace Dune
│ │ │ │ -
93
│ │ │ │ -
94#endif
│ │ │ │ - │ │ │ │ +
│ │ │ │ +
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
│ │ │ │ +
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
│ │ │ │ +
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 interval 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
│ │ │ │ + │ │ │ │
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
│ │ │ │ +
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 {} │ │ │ │ │ @@ -3,124 +3,331 @@ │ │ │ │ │ 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 │ │ │ │ │ -macrogrid.hh │ │ │ │ │ +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 © 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 │ │ │ │ │ +5#ifndef DUNE_DGF_DUNEGRIDFORMATPARSER_HH │ │ │ │ │ +6#define DUNE_DGF_DUNEGRIDFORMATPARSER_HH │ │ │ │ │ 7 │ │ │ │ │ -8 │ │ │ │ │ -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_/_p_a_r_s_e_r_._h_h> │ │ │ │ │ -13 │ │ │ │ │ +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 │ │ │ │ │ 15namespace _D_u_n_e │ │ │ │ │ 16{ │ │ │ │ │ -17 // forward declarations │ │ │ │ │ -18 // -------------------- │ │ │ │ │ -19 class DuneGridFormatParser; │ │ │ │ │ -20 │ │ │ │ │ -_2_1 class _M_a_c_r_o_G_r_i_d │ │ │ │ │ -22 : protected _D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r │ │ │ │ │ +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 { │ │ │ │ │ -24 template< class GridType > │ │ │ │ │ -_2_5 friend struct _D_G_F_G_r_i_d_F_a_c_t_o_r_y; │ │ │ │ │ +_2_5 typedef std::string _t_y_p_e; │ │ │ │ │ 26 │ │ │ │ │ -27 public: │ │ │ │ │ -_2_8 typedef MPIHelper::MPICommunicator _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e; │ │ │ │ │ -29 │ │ │ │ │ -30 protected: │ │ │ │ │ -_3_2 _M_a_c_r_o_G_r_i_d(const char* filename, _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e MPICOMM = MPIHelper:: │ │ │ │ │ -getCommunicator()) │ │ │ │ │ -33 : _D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r( rank(MPICOMM), size(MPICOMM) ) │ │ │ │ │ -34 , filename_(filename) │ │ │ │ │ -35 , MPICOMM_(MPICOMM) {} │ │ │ │ │ -36 │ │ │ │ │ -_3_8 _M_a_c_r_o_G_r_i_d(_M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e MPICOMM = MPIHelper::getCommunicator()) │ │ │ │ │ -39 : _D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r( rank(MPICOMM), size(MPICOMM) ) │ │ │ │ │ -40 , filename_(0) │ │ │ │ │ -41 , MPICOMM_(MPICOMM) {} │ │ │ │ │ -42 │ │ │ │ │ -44 template │ │ │ │ │ -_4_5 inline GridType * _c_r_e_a_t_e_G_r_i_d () │ │ │ │ │ -46 { │ │ │ │ │ -47 return Impl::generate(*this,filename_,MPICOMM_); │ │ │ │ │ -48 } │ │ │ │ │ -49 private: │ │ │ │ │ -50 static int rank( [[maybe_unused]] _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e MPICOMM ) │ │ │ │ │ -51 { │ │ │ │ │ -52 int rank = 0; │ │ │ │ │ -53#if HAVE_MPI │ │ │ │ │ -54 MPI_Comm_rank( MPICOMM, &rank ); │ │ │ │ │ -55#endif │ │ │ │ │ -56 return rank; │ │ │ │ │ -57 } │ │ │ │ │ -58 static int size( [[maybe_unused]] _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e MPICOMM ) │ │ │ │ │ -59 { │ │ │ │ │ -60 int size = 1; │ │ │ │ │ -61#if HAVE_MPI │ │ │ │ │ -62 MPI_Comm_size( MPICOMM, &size ); │ │ │ │ │ -63#endif │ │ │ │ │ -64 return size; │ │ │ │ │ -65 } │ │ │ │ │ -77 template< class GridType > │ │ │ │ │ -78 struct Impl │ │ │ │ │ -79 { │ │ │ │ │ -80 static GridType* generate(MacroGrid& mg, │ │ │ │ │ -81 const char* filename, _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e MPICOMM = MPIHelper:: │ │ │ │ │ -getCommunicator() ) │ │ │ │ │ -82 { │ │ │ │ │ -83 // make assertion depend on the template argument but always evaluate to │ │ │ │ │ -false │ │ │ │ │ -84 static_assert( GridType::dimension<0,"DGF grid factory missing. Did you │ │ │ │ │ -forget to add the corresponding dgf header?"); │ │ │ │ │ -85 } │ │ │ │ │ -86 }; │ │ │ │ │ -87 │ │ │ │ │ -88 const char* filename_; │ │ │ │ │ -89 _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e MPICOMM_; │ │ │ │ │ -90 }; │ │ │ │ │ -91 │ │ │ │ │ -92} // end namespace Dune │ │ │ │ │ -93 │ │ │ │ │ -94#endif │ │ │ │ │ -_p_a_r_s_e_r_._h_h │ │ │ │ │ +_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 │ │ │ │ │ +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 │ │ │ │ │ +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 interval 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 │ │ │ │ │ _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_:_:_M_a_c_r_o_G_r_i_d │ │ │ │ │ -DDeeffiinniittiioonn macrogrid.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_M_a_c_r_o_G_r_i_d_:_:_M_a_c_r_o_G_r_i_d │ │ │ │ │ -MacroGrid(const char *filename, MPICommunicatorType MPICOMM=MPIHelper:: │ │ │ │ │ -getCommunicator()) │ │ │ │ │ -constructor given the name of a DGF file │ │ │ │ │ -DDeeffiinniittiioonn macrogrid.hh:32 │ │ │ │ │ -_D_u_n_e_:_:_M_a_c_r_o_G_r_i_d_:_:_M_a_c_r_o_G_r_i_d │ │ │ │ │ -MacroGrid(MPICommunicatorType MPICOMM=MPIHelper::getCommunicator()) │ │ │ │ │ -constructor given the name of a DGF file │ │ │ │ │ -DDeeffiinniittiioonn macrogrid.hh:38 │ │ │ │ │ -_D_u_n_e_:_:_M_a_c_r_o_G_r_i_d_:_:_c_r_e_a_t_e_G_r_i_d │ │ │ │ │ -GridType * createGrid() │ │ │ │ │ -returns pointer to a new instance of type GridType created from a DGF file │ │ │ │ │ -DDeeffiinniittiioonn macrogrid.hh:45 │ │ │ │ │ -_D_u_n_e_:_:_M_a_c_r_o_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 │ │ │ │ │ -DDeeffiinniittiioonn macrogrid.hh:28 │ │ │ │ │ +_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/a00851.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dgfgridfactory.hh File Reference │ │ │ │ +dune-grid: dgfoned.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,33 +72,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
dgfgridfactory.hh File Reference
│ │ │ │ +
dgfoned.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <iostream>
│ │ │ │ -#include <string>
│ │ │ │ +
#include <algorithm>
│ │ │ │ +#include <fstream>
│ │ │ │ +#include <iostream>
│ │ │ │ +#include <istream>
│ │ │ │ #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/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::DGFGridFactory< G >
struct  Dune::DGFGridInfo< OneDGrid >
 
struct  Dune::DGFGridFactory< OneDGrid >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -4,28 +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 │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -dgfgridfactory.hh File Reference │ │ │ │ │ +dgfoned.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_/_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 │ │ │ │ │ #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_F_a_c_t_o_r_y_<_ _G_ _> │ │ │ │ │ +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. │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00851_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dgfgridfactory.hh Source File │ │ │ │ +dune-grid: dgfoned.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,266 +74,290 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dgfgridfactory.hh
│ │ │ │ +
dgfoned.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │ +
5#ifndef DUNE_GRID_FILE_IO_DGFPARSER_DGFONED_HH
│ │ │ │ +
6#define DUNE_GRID_FILE_IO_DGFPARSER_DGFONED_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>
│ │ │ │ - │ │ │ │ - │ │ │ │ +
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
│ │ │ │ +
20#include <dune/grid/onedgrid.hh>
│ │ │ │
21
│ │ │ │ -
22namespace Dune
│ │ │ │ -
23{
│ │ │ │ +
22//- local includes
│ │ │ │ +
23#include "dgfparser.hh"
│ │ │ │
24
│ │ │ │ -
25 // External Forward Declarations
│ │ │ │ -
26 // -----------------------------
│ │ │ │ -
27
│ │ │ │ -
28 template < class GridImp, class IntersectionImp >
│ │ │ │ -
29 class Intersection;
│ │ │ │ -
30
│ │ │ │ -
31
│ │ │ │ -
32
│ │ │ │ -
33 // DGFGridFactory
│ │ │ │ -
34 // --------------
│ │ │ │ +
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 template < class G >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
38 {
│ │ │ │ -
39 typedef G Grid;
│ │ │ │ -
40 const static int dimension = Grid::dimension;
│ │ │ │ -
41 typedef MPIHelper::MPICommunicator MPICommunicatorType;
│ │ │ │ +
36
│ │ │ │ +
37namespace Dune
│ │ │ │ +
38{
│ │ │ │ +
39
│ │ │ │ +
40 // DGFGridInfo
│ │ │ │ +
41 // -----------
│ │ │ │
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 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;
│ │ │ │ +
43 template< >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
45 {
│ │ │ │ +
│ │ │ │ +
46 static int refineStepsForHalf ()
│ │ │ │ +
47 {
│ │ │ │ +
48 return 1;
│ │ │ │ +
49 }
│ │ │ │ +
│ │ │ │ +
50
│ │ │ │ +
│ │ │ │ +
51 static double refineWeight ()
│ │ │ │ +
52 {
│ │ │ │ +
53 return 0.5;
│ │ │ │ +
54 }
│ │ │ │ +
│ │ │ │ +
55 };
│ │ │ │ +
│ │ │ │ +
56
│ │ │ │ +
57
│ │ │ │ +
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
│ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ -
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() );
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
132 InsertOrderIterator it = elInsertOrder_.find( coord );
│ │ │ │ -
133 if( it != elInsertOrder_.end() )
│ │ │ │ -
134 return macroGrid_.elParams[ it->second ];
│ │ │ │ -
135 assert(0);
│ │ │ │ -
136 return emptyParam;
│ │ │ │ +
133 template< int codim >
│ │ │ │ +
│ │ │ │ +
134 std::vector< double > &parameter ( [[maybe_unused]] const typename Grid::Codim< codim >::Entity &element )
│ │ │ │ +
135 {
│ │ │ │ +
136 return emptyParameters_;
│ │ │ │
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 }
│ │ │ │ -
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
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 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
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
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 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
│ │ │ │ +
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
│ │ │ │ -
A Traits struct that collects all associated types of one implementation.
Definition common/grid.hh:411
│ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ +
One-dimensional adaptive grid.
Definition onedgrid.hh:97
│ │ │ │ + │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,308 +3,344 @@ │ │ │ │ │ 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 │ │ │ │ │ +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 © 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 │ │ │ │ │ +5#ifndef DUNE_GRID_FILE_IO_DGFPARSER_DGFONED_HH │ │ │ │ │ +6#define DUNE_GRID_FILE_IO_DGFPARSER_DGFONED_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> │ │ │ │ │ +8//- C++ includes │ │ │ │ │ +9#include │ │ │ │ │ +10#include │ │ │ │ │ +11#include │ │ │ │ │ +12#include │ │ │ │ │ +13#include │ │ │ │ │ +14 │ │ │ │ │ +15//- dune-common includes │ │ │ │ │ +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> │ │ │ │ │ +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 │ │ │ │ │ +20#include <_d_u_n_e_/_g_r_i_d_/_o_n_e_d_g_r_i_d_._h_h> │ │ │ │ │ 21 │ │ │ │ │ -22namespace _D_u_n_e │ │ │ │ │ -23{ │ │ │ │ │ +22//- local includes │ │ │ │ │ +23#include "_d_g_f_p_a_r_s_e_r_._h_h" │ │ │ │ │ 24 │ │ │ │ │ -25 // External Forward Declarations │ │ │ │ │ -26 // ----------------------------- │ │ │ │ │ -27 │ │ │ │ │ -28 template < class GridImp, class IntersectionImp > │ │ │ │ │ -29 class Intersection; │ │ │ │ │ -30 │ │ │ │ │ -31 │ │ │ │ │ -32 │ │ │ │ │ -33 // DGFGridFactory │ │ │ │ │ -34 // -------------- │ │ │ │ │ +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 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; │ │ │ │ │ +36 │ │ │ │ │ +37namespace _D_u_n_e │ │ │ │ │ +38{ │ │ │ │ │ +39 │ │ │ │ │ +40 // DGFGridInfo │ │ │ │ │ +41 // ----------- │ │ │ │ │ 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 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; │ │ │ │ │ +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 │ │ │ │ │ +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 │ │ │ │ │ -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() ); │ │ │ │ │ +_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 │ │ │ │ │ -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; │ │ │ │ │ +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_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 } │ │ │ │ │ +_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 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 │ │ │ │ │ +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 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 │ │ │ │ │ +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_:_:_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_:_:_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_:_:_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_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_:_:_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 │ │ │ │ │ +_D_u_n_e_:_:_O_n_e_D_G_r_i_d │ │ │ │ │ +One-dimensional adaptive grid. │ │ │ │ │ +DDeeffiinniittiioonn onedgrid.hh:97 │ │ │ │ │ +_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/a00854.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: gridptr.hh File Reference │ │ │ │ +dune-grid: periodicfacetrans.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,62 +65,32 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ Namespaces
│ │ │ │ -
gridptr.hh File Reference
│ │ │ │ +
periodicfacetrans.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.

│ │ │ │ -

│ │ │ │ Namespaces

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

│ │ │ │ -Classes

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
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,44 +3,19 @@ │ │ │ │ │ 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 │ │ │ │ │ +periodicfacetrans.cc File Reference │ │ │ │ │ +#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. │ │ │ │ │   │ │ │ │ │ +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/a00857.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: entitykey_inline.hh File Reference │ │ │ │ +dune-grid: general.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,34 +65,32 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Namespaces
│ │ │ │ -
entitykey_inline.hh File Reference
│ │ │ │ +
general.cc File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <algorithm>
│ │ │ │ -#include <dune/geometry/referenceelements.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/entitykey.hh>
│ │ │ │ -
│ │ │ │ -

Go to the source code of this file.

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

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,19 +3,19 @@ │ │ │ │ │ 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 │ │ │ │ │ -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_. │ │ │ │ │ +general.cc File Reference │ │ │ │ │ +#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/a00860.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dgfidentitygrid.hh File Reference │ │ │ │ +dune-grid: basic.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,43 +65,32 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ Namespaces
│ │ │ │ -
dgfidentitygrid.hh File Reference
│ │ │ │ +
basic.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 <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,25 +3,19 @@ │ │ │ │ │ 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 │ │ │ │ │ +basic.cc File Reference │ │ │ │ │ +#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/a00863.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dgfug.cc File Reference │ │ │ │ +dune-grid: interval.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,26 +65,24 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Namespaces
│ │ │ │ -
dgfug.cc File Reference
│ │ │ │ +
interval.cc File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/geometry/utility/typefromvertexcount.hh>
│ │ │ │ -#include <dune-grid-config.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/dgfug.hh>
│ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,19 +3,18 @@ │ │ │ │ │ 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 │ │ │ │ │ -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> │ │ │ │ │ +interval.cc File Reference │ │ │ │ │ +#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 │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00866.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dgfwriter.hh File Reference │ │ │ │ +dune-grid: basic.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,59 +65,54 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces
│ │ │ │ -
dgfwriter.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Functions
│ │ │ │ +
basic.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ - │ │ │ │ -

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

│ │ │ │
#include <cassert>
│ │ │ │ -#include <cstddef>
│ │ │ │ -#include <algorithm>
│ │ │ │ -#include <fstream>
│ │ │ │ +#include <cctype>
│ │ │ │ +#include <iostream>
│ │ │ │ #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 <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.

│ │ │ │

│ │ │ │ Namespaces

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

│ │ │ │ Classes

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

│ │ │ │ Namespaces

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

│ │ │ │ +Functions

void Dune::dgf::makeupcase (std ::string &s)
 
│ │ │ │ -

Detailed Description

│ │ │ │ -

write a GridView to a DGF file

│ │ │ │ -
Author
Martin Nolte
│ │ │ │ -
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,39 +3,33 @@ │ │ │ │ │ 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 │ │ │ │ │ -dgfwriter.hh File Reference │ │ │ │ │ -write a GridView to a DGF file _M_o_r_e_._._. │ │ │ │ │ + * _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 │ │ │ │ │ #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_/_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> │ │ │ │ │ +#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 │ │ │ │ │ -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_:_:_B_a_s_i_c_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 │ │ │ │ │ +  │ │ │ │ │ +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/a00866_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dgfwriter.hh Source File │ │ │ │ +dune-grid: basic.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,466 +70,172 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dgfwriter.hh
│ │ │ │ +
basic.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_BASICBLOCK_HH
│ │ │ │ +
6#define DUNE_DGF_BASICBLOCK_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
│ │ │ │ -
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 {}
│ │ │ │ +
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
│ │ │ │ -
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 }
│ │ │ │ +
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
│ │ │ │ -
│ │ │ │ -
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:134
│ │ │ │ -
Traits::Intersection Intersection
type of the intersection
Definition common/gridview.hh:89
│ │ │ │ +
112} // end namespace Dune
│ │ │ │ +
113
│ │ │ │ +
114#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 common/indexidset.hh:92
│ │ │ │ -
A struct that collects all associated types of one implementation from the Traits class.
Definition common/gridview.hh:104
│ │ │ │ -
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.
│ │ │ │ +
void makeupcase(std ::string &s)
Definition basic.hh:24
│ │ │ │ +
Definition basic.hh:31
│ │ │ │ +
void reset()
Definition basic.hh:51
│ │ │ │ +
bool getnextline()
Definition basic.cc:93
│ │ │ │ +
bool findtoken(std ::string token)
Definition basic.cc:122
│ │ │ │ +
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:103
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,557 +3,174 @@ │ │ │ │ │ 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 │ │ │ │ │ +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 © 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_BASICBLOCK_HH │ │ │ │ │ +6#define DUNE_DGF_BASICBLOCK_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 │ │ │ │ │ -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; │ │ │ │ │ +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::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 {} │ │ │ │ │ +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 │ │ │ │ │ -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 ) │ │ │ │ │ +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 │ │ │ │ │ ) │ │ │ │ │ -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:134 │ │ │ │ │ -_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 │ │ │ │ │ +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 │ │ │ │ │ +_e_n_t_i_t_y_k_e_y_._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_:_:_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 common/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:104 │ │ │ │ │ -_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_:_:_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:93 │ │ │ │ │ +_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:122 │ │ │ │ │ +_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:103 │ │ │ │ │ =============================================================================== │ │ │ │ │ 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: dgfug.hh File Reference │ │ │ │ +dune-grid: polyhedron.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,46 +65,32 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
dgfug.hh File Reference
│ │ │ │ +
polyhedron.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <fstream>
│ │ │ │ -#include <istream>
│ │ │ │ -#include <string>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/common/exceptions.hh>
│ │ │ │ -#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/common/parallel/mpihelper.hh>
│ │ │ │ -#include <dune-grid-config.hh>
│ │ │ │ -#include <dune/grid/common/intersection.hh>
│ │ │ │ -#include <dune/grid/uggrid.hh>
│ │ │ │ -#include "dgfparser.hh"
│ │ │ │ -#include "blocks/gridparameter.hh"
│ │ │ │ +
#include <algorithm>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/polygon.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

struct  Dune::dgf::UGGridParameterBlock
 
struct  Dune::DGFGridInfo< UGGrid< dim > >
 
struct  Dune::DGFGridFactory< UGGrid< dim > >
struct  Dune::dgf::PolyhedronBlock
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,35 +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 │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -dgfug.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#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_/_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" │ │ │ │ │ +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 │ │ │ │ │ -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_ _>_ _> │ │ │ │ │ +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_:_:_d_g_f │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00869_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dgfug.hh Source File │ │ │ │ +dune-grid: polyhedron.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,317 +70,109 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dgfug.hh
│ │ │ │ +
polyhedron.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │ +
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//- 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
│ │ │ │ -
20#include <dune-grid-config.hh> // HAVE_DUNE_UGGRID
│ │ │ │ - │ │ │ │ -
22#include <dune/grid/uggrid.hh>
│ │ │ │ -
23
│ │ │ │ -
24//- local includes
│ │ │ │ -
25#include "dgfparser.hh"
│ │ │ │ - │ │ │ │ -
27
│ │ │ │ -
28
│ │ │ │ -
29namespace Dune
│ │ │ │ -
30{
│ │ │ │ -
31
│ │ │ │ -
32 namespace dgf
│ │ │ │ -
33 {
│ │ │ │ -
34
│ │ │ │ -
35 // UGGridParameterBlock
│ │ │ │ -
36 // --------------------
│ │ │ │ -
37
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
39 : public GridParameterBlock
│ │ │ │ -
40 {
│ │ │ │ -
42 explicit UGGridParameterBlock ( std::istream &input );
│ │ │ │ -
43
│ │ │ │ -
45 bool noClosure () const { return noClosure_; }
│ │ │ │ -
47 bool noCopy () const { return noCopy_; }
│ │ │ │ -
49 size_t heapSize () const { return heapSize_; }
│ │ │ │ -
50
│ │ │ │ -
51 protected:
│ │ │ │ -
52 bool noClosure_; // no closure for UGGrid
│ │ │ │ -
53 bool noCopy_; // no copies for UGGrid
│ │ │ │ -
54 size_t heapSize_; // heap size for UGGrid
│ │ │ │ -
55 };
│ │ │ │ -
│ │ │ │ -
56
│ │ │ │ -
57 } // namespace dgf
│ │ │ │ -
58
│ │ │ │ -
59
│ │ │ │ -
60
│ │ │ │ -
61#if HAVE_DUNE_UGGRID
│ │ │ │ -
62 template< int dim >
│ │ │ │ -
│ │ │ │ -
63 struct DGFGridInfo< UGGrid< dim > >
│ │ │ │ -
64 {
│ │ │ │ -
│ │ │ │ -
65 static int refineStepsForHalf ()
│ │ │ │ -
66 {
│ │ │ │ -
67 return 1;
│ │ │ │ -
68 }
│ │ │ │ -
│ │ │ │ -
69
│ │ │ │ -
│ │ │ │ -
70 static double refineWeight ()
│ │ │ │ -
71 {
│ │ │ │ -
72 return -1.;
│ │ │ │ -
73 }
│ │ │ │ -
│ │ │ │ -
74 };
│ │ │ │ -
│ │ │ │ -
75
│ │ │ │ -
76
│ │ │ │ -
77
│ │ │ │ -
78 // DGFGridFactory< UGGrid< dim > >
│ │ │ │ -
79 // -------------------------------
│ │ │ │ -
80
│ │ │ │ -
81 template< int dim >
│ │ │ │ -
│ │ │ │ -
82 struct DGFGridFactory< UGGrid< dim > >
│ │ │ │ -
83 {
│ │ │ │ - │ │ │ │ -
87 static const int dimension = dim;
│ │ │ │ -
89 typedef MPIHelper::MPICommunicator MPICommunicatorType;
│ │ │ │ -
90
│ │ │ │ -
│ │ │ │ -
92 explicit DGFGridFactory ( std::istream &input,
│ │ │ │ -
93 MPICommunicatorType comm = MPIHelper::getCommunicator() )
│ │ │ │ -
94 : grid_( 0 ),
│ │ │ │ -
95 factory_(),
│ │ │ │ -
96 dgf_( rank( comm ), size( comm ) )
│ │ │ │ -
97 {
│ │ │ │ -
98 generate( input );
│ │ │ │ -
99 }
│ │ │ │ -
│ │ │ │ -
100
│ │ │ │ -
│ │ │ │ -
102 explicit DGFGridFactory ( const std::string &filename,
│ │ │ │ -
103 MPICommunicatorType comm = MPIHelper::getCommunicator() )
│ │ │ │ -
104 : grid_( 0 ),
│ │ │ │ -
105 factory_(),
│ │ │ │ -
106 dgf_( rank( comm ), size( comm ) )
│ │ │ │ -
107 {
│ │ │ │ -
108 std::ifstream input( filename.c_str() );
│ │ │ │ -
109 if ( !input )
│ │ │ │ -
110 DUNE_THROW( DGFException, "Error: Macrofile " << filename << " not found" );
│ │ │ │ -
111 generate( input );
│ │ │ │ -
112 }
│ │ │ │ -
│ │ │ │ -
113
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
116 {
│ │ │ │ -
117 return grid_;
│ │ │ │ -
118 }
│ │ │ │ -
│ │ │ │ -
119
│ │ │ │ -
121 template< class GG, class II >
│ │ │ │ -
│ │ │ │ -
122 bool wasInserted ( const Dune::Intersection< GG, II > &intersection ) const
│ │ │ │ -
123 {
│ │ │ │ -
124 return factory_.wasInserted( intersection );
│ │ │ │ -
125 }
│ │ │ │ -
│ │ │ │ -
126
│ │ │ │ -
128 template< class GG, class II >
│ │ │ │ -
│ │ │ │ -
129 int boundaryId ( const Dune::Intersection< GG, II > &intersection ) const
│ │ │ │ -
130 {
│ │ │ │ -
131 return intersection.boundarySegmentIndex();
│ │ │ │ -
132 }
│ │ │ │ +
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 {}
│ │ │ │
│ │ │ │ -
133
│ │ │ │ -
135 template< int codim >
│ │ │ │ -
│ │ │ │ -
136 int numParameters () const
│ │ │ │ -
137 {
│ │ │ │ -
138 if( codim == 0 )
│ │ │ │ -
139 return dgf_.nofelparams;
│ │ │ │ -
140 else if( codim == dimension )
│ │ │ │ -
141 return dgf_.nofvtxparams;
│ │ │ │ -
142 else
│ │ │ │ -
143 return 0;
│ │ │ │ -
144 }
│ │ │ │ -
│ │ │ │ -
145
│ │ │ │ -
147 template< class Entity >
│ │ │ │ -
│ │ │ │ -
148 int numParameters ( const Entity & ) const
│ │ │ │ -
149 {
│ │ │ │ -
150 return numParameters< Entity::codimension >();
│ │ │ │ -
151 }
│ │ │ │ -
│ │ │ │ -
152
│ │ │ │ -
│ │ │ │ -
154 std::vector< double > &parameter ( const typename Grid::template Codim< 0 >::Entity &element )
│ │ │ │ -
155 {
│ │ │ │ -
156 if( numParameters< 0 >() <= 0 )
│ │ │ │ -
157 {
│ │ │ │ -
158 DUNE_THROW( InvalidStateException,
│ │ │ │ -
159 "Calling DGFGridFactory::parameter is only allowed if there are parameters." );
│ │ │ │ -
160 }
│ │ │ │ -
161 return dgf_.elParams[ factory_.insertionIndex( element ) ];
│ │ │ │ -
162 }
│ │ │ │ -
│ │ │ │ -
163
│ │ │ │ -
│ │ │ │ -
165 std::vector< double > &parameter ( const typename Grid::template Codim< dimension >::Entity &vertex )
│ │ │ │ -
166 {
│ │ │ │ -
167 if( numParameters< dimension >() <= 0 )
│ │ │ │ -
168 {
│ │ │ │ -
169 DUNE_THROW( InvalidStateException,
│ │ │ │ -
170 "Calling DGFGridFactory::parameter is only allowed if there are parameters." );
│ │ │ │ -
171 }
│ │ │ │ -
172 return dgf_.vtxParams[ factory_.insertionIndex( vertex ) ];
│ │ │ │ -
173 }
│ │ │ │ -
│ │ │ │ -
174
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
177 {
│ │ │ │ -
178 return dgf_.haveBndParameters;
│ │ │ │ -
179 }
│ │ │ │ -
│ │ │ │ -
180
│ │ │ │ -
182 template< class GG, class II >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
184 {
│ │ │ │ - │ │ │ │ -
186 typename Intersection::Entity entity = intersection.inside();
│ │ │ │ -
187 const int face = intersection.indexInInside();
│ │ │ │ -
188
│ │ │ │ -
189 auto refElem = referenceElement< double, dimension >( entity.type() );
│ │ │ │ -
190 int corners = refElem.size( face, 1, dimension );
│ │ │ │ -
191 std::vector< unsigned int > bound( corners );
│ │ │ │ -
192 for( int i = 0; i < corners; ++i )
│ │ │ │ -
193 {
│ │ │ │ -
194 const int k = refElem.subEntity( face, 1, i, dimension );
│ │ │ │ -
195 bound[ i ] = factory_.insertionIndex( entity.template subEntity< dimension >( k ) );
│ │ │ │ -
196 }
│ │ │ │ -
197
│ │ │ │ -
198 DuneGridFormatParser::facemap_t::key_type key( bound, false );
│ │ │ │ -
199 const DuneGridFormatParser::facemap_t::const_iterator pos = dgf_.facemap.find( key );
│ │ │ │ -
200 if( pos != dgf_.facemap.end() )
│ │ │ │ -
201 return dgf_.facemap.find( key )->second.second;
│ │ │ │ -
202 else
│ │ │ │ - │ │ │ │ -
204 }
│ │ │ │ -
│ │ │ │ -
205
│ │ │ │ -
206 private:
│ │ │ │ -
207 // create grid
│ │ │ │ -
208 void generate ( std::istream &input );
│ │ │ │ -
209
│ │ │ │ -
210 // return rank
│ │ │ │ -
211 static int rank( MPICommunicatorType MPICOMM )
│ │ │ │ -
212 {
│ │ │ │ -
213 int rank = 0;
│ │ │ │ -
214#if HAVE_MPI
│ │ │ │ -
215 MPI_Comm_rank( MPICOMM, &rank );
│ │ │ │ -
216#endif
│ │ │ │ -
217 return rank;
│ │ │ │ -
218 }
│ │ │ │ -
219
│ │ │ │ -
220 // return size
│ │ │ │ -
221 static int size( MPICommunicatorType MPICOMM )
│ │ │ │ -
222 {
│ │ │ │ -
223 int size = 1;
│ │ │ │ -
224#if HAVE_MPI
│ │ │ │ -
225 MPI_Comm_size( MPICOMM, &size );
│ │ │ │ -
226#endif
│ │ │ │ -
227 return size;
│ │ │ │ -
228 }
│ │ │ │ -
229
│ │ │ │ -
230 Grid *grid_;
│ │ │ │ -
231 GridFactory< UGGrid< dim > > factory_;
│ │ │ │ -
232 DuneGridFormatParser dgf_;
│ │ │ │ -
233 };
│ │ │ │ -
│ │ │ │ -
234#endif // #if HAVE_DUNE_UGGRID
│ │ │ │ -
235
│ │ │ │ -
236} // namespace Dune
│ │ │ │ -
237
│ │ │ │ -
238#endif // #ifndef DUNE_GRID_IO_FILE_DGFPARSER_DGFUG_HH
│ │ │ │ - │ │ │ │ -
The UGGrid class.
│ │ │ │ +
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
│ │ │ │ + │ │ │ │
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
│ │ │ │ +
Definition basic.hh:31
│ │ │ │ +
void reset()
Definition basic.hh:51
│ │ │ │ +
bool getnextline()
Definition basic.cc:93
│ │ │ │ +
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
│ │ │ │ -
Some simple static information for a given GridType.
Definition io/file/dgfparser/dgfparser.hh:56
│ │ │ │ -
Definition dgfug.hh:40
│ │ │ │ -
size_t heapSize() const
returns heap size used on construction of the grid
Definition dgfug.hh:49
│ │ │ │ -
bool noCopy_
Definition dgfug.hh:53
│ │ │ │ -
size_t heapSize_
Definition dgfug.hh:54
│ │ │ │ -
bool noClosure_
Definition dgfug.hh:52
│ │ │ │ -
bool noCopy() const
returns true if no copies are made for UGGrid elements
Definition dgfug.hh:47
│ │ │ │ -
bool noClosure() const
returns true if no closure should be used for UGGrid
Definition dgfug.hh:45
│ │ │ │ -
static double refineWeight()
Definition dgfug.hh:70
│ │ │ │ -
static int refineStepsForHalf()
Definition dgfug.hh:65
│ │ │ │ -
const DGFBoundaryParameter::type & boundaryParameter(const Dune::Intersection< GG, II > &intersection) const
return invalid value
Definition dgfug.hh:183
│ │ │ │ -
std::vector< double > & parameter(const typename Grid::template Codim< dimension >::Entity &vertex)
return parameter for vertex
Definition dgfug.hh:165
│ │ │ │ -
DGFGridFactory(const std::string &filename, MPICommunicatorType comm=MPIHelper::getCommunicator())
constructor taking filename
Definition dgfug.hh:102
│ │ │ │ -
MPIHelper::MPICommunicator MPICommunicatorType
MPI communicator type.
Definition dgfug.hh:89
│ │ │ │ -
int numParameters(const Entity &) const
return number of parameters
Definition dgfug.hh:148
│ │ │ │ -
int boundaryId(const Dune::Intersection< GG, II > &intersection) const
will return boundary segment index
Definition dgfug.hh:129
│ │ │ │ -
UGGrid< dim > Grid
grid type
Definition dgfug.hh:85
│ │ │ │ -
bool wasInserted(const Dune::Intersection< GG, II > &intersection) const
please doc me
Definition dgfug.hh:122
│ │ │ │ -
DGFGridFactory(std::istream &input, MPICommunicatorType comm=MPIHelper::getCommunicator())
constructor taking istream
Definition dgfug.hh:92
│ │ │ │ -
int numParameters() const
return number of parameters
Definition dgfug.hh:136
│ │ │ │ -
bool haveBoundaryParameters() const
UGGrid does not support boundary parameters.
Definition dgfug.hh:176
│ │ │ │ -
std::vector< double > & parameter(const typename Grid::template Codim< 0 >::Entity &element)
return parameter for codim 0 entity
Definition dgfug.hh:154
│ │ │ │ -
Grid * grid()
return grid
Definition dgfug.hh:115
│ │ │ │ -
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:208
│ │ │ │ - │ │ │ │ - │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,393 +3,114 @@ │ │ │ │ │ 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 │ │ │ │ │ +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 © 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 │ │ │ │ │ +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//- 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 // HAVE_DUNE_UGGRID │ │ │ │ │ -21#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> │ │ │ │ │ -22#include <_d_u_n_e_/_g_r_i_d_/_u_g_g_r_i_d_._h_h> │ │ │ │ │ -23 │ │ │ │ │ -24//- local includes │ │ │ │ │ -25#include "_d_g_f_p_a_r_s_e_r_._h_h" │ │ │ │ │ -26#include "_b_l_o_c_k_s_/_g_r_i_d_p_a_r_a_m_e_t_e_r_._h_h" │ │ │ │ │ +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 │ │ │ │ │ -28 │ │ │ │ │ -29namespace _D_u_n_e │ │ │ │ │ -30{ │ │ │ │ │ -31 │ │ │ │ │ -32 namespace dgf │ │ │ │ │ -33 { │ │ │ │ │ -34 │ │ │ │ │ -35 // UGGridParameterBlock │ │ │ │ │ -36 // -------------------- │ │ │ │ │ -37 │ │ │ │ │ -_3_8 struct _U_G_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 { │ │ │ │ │ -42 explicit _U_G_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k ( std::istream &input ); │ │ │ │ │ -43 │ │ │ │ │ -_4_5 bool _n_o_C_l_o_s_u_r_e () const { return _n_o_C_l_o_s_u_r_e__; } │ │ │ │ │ -_4_7 bool _n_o_C_o_p_y () const { return _n_o_C_o_p_y__; } │ │ │ │ │ -_4_9 size_t _h_e_a_p_S_i_z_e () const { return _h_e_a_p_S_i_z_e__; } │ │ │ │ │ -50 │ │ │ │ │ -51 protected: │ │ │ │ │ -_5_2 bool _n_o_C_l_o_s_u_r_e__; // no closure for UGGrid │ │ │ │ │ -_5_3 bool _n_o_C_o_p_y__; // no copies for UGGrid │ │ │ │ │ -_5_4 size_t _h_e_a_p_S_i_z_e__; // heap size for UGGrid │ │ │ │ │ -55 }; │ │ │ │ │ -56 │ │ │ │ │ -57 } // namespace dgf │ │ │ │ │ -58 │ │ │ │ │ -59 │ │ │ │ │ -60 │ │ │ │ │ -61#if HAVE_DUNE_UGGRID │ │ │ │ │ -62 template< int dim > │ │ │ │ │ -_6_3 struct _D_G_F_G_r_i_d_I_n_f_o< _U_G_G_r_i_d< dim > > │ │ │ │ │ -64 { │ │ │ │ │ -_6_5 static int _r_e_f_i_n_e_S_t_e_p_s_F_o_r_H_a_l_f () │ │ │ │ │ -66 { │ │ │ │ │ -67 return 1; │ │ │ │ │ -68 } │ │ │ │ │ -69 │ │ │ │ │ -_7_0 static double _r_e_f_i_n_e_W_e_i_g_h_t () │ │ │ │ │ -71 { │ │ │ │ │ -72 return -1.; │ │ │ │ │ -73 } │ │ │ │ │ -74 }; │ │ │ │ │ -75 │ │ │ │ │ -76 │ │ │ │ │ -77 │ │ │ │ │ -78 // DGFGridFactory< UGGrid< dim > > │ │ │ │ │ -79 // ------------------------------- │ │ │ │ │ -80 │ │ │ │ │ -81 template< int dim > │ │ │ │ │ -_8_2 struct _D_G_F_G_r_i_d_F_a_c_t_o_r_y< _U_G_G_r_i_d< dim > > │ │ │ │ │ -83 { │ │ │ │ │ -_8_5 typedef _U_G_G_r_i_d_<_ _d_i_m_ _> _G_r_i_d; │ │ │ │ │ -_8_7 static const int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ -_8_9 typedef MPIHelper::MPICommunicator _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e; │ │ │ │ │ -90 │ │ │ │ │ -_9_2 explicit _D_G_F_G_r_i_d_F_a_c_t_o_r_y ( std::istream &input, │ │ │ │ │ -93 _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e comm = MPIHelper::getCommunicator() ) │ │ │ │ │ -94 : grid_( 0 ), │ │ │ │ │ -95 factory_(), │ │ │ │ │ -96 dgf_( rank( comm ), size( comm ) ) │ │ │ │ │ -97 { │ │ │ │ │ -98 generate( input ); │ │ │ │ │ -99 } │ │ │ │ │ -100 │ │ │ │ │ -_1_0_2 explicit _D_G_F_G_r_i_d_F_a_c_t_o_r_y ( const std::string &filename, │ │ │ │ │ -103 _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e comm = MPIHelper::getCommunicator() ) │ │ │ │ │ -104 : grid_( 0 ), │ │ │ │ │ -105 factory_(), │ │ │ │ │ -106 dgf_( rank( comm ), size( comm ) ) │ │ │ │ │ -107 { │ │ │ │ │ -108 std::ifstream input( filename.c_str() ); │ │ │ │ │ -109 if ( !input ) │ │ │ │ │ -110 DUNE_THROW( _D_G_F_E_x_c_e_p_t_i_o_n, "Error: Macrofile " << filename << " not found" │ │ │ │ │ -); │ │ │ │ │ -111 generate( input ); │ │ │ │ │ -112 } │ │ │ │ │ -113 │ │ │ │ │ -_1_1_5 _G_r_i_d *_g_r_i_d () │ │ │ │ │ -116 { │ │ │ │ │ -117 return grid_; │ │ │ │ │ -118 } │ │ │ │ │ -119 │ │ │ │ │ -121 template< class GG, class II > │ │ │ │ │ -_1_2_2 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 │ │ │ │ │ -123 { │ │ │ │ │ -124 return factory_.wasInserted( intersection ); │ │ │ │ │ -125 } │ │ │ │ │ -126 │ │ │ │ │ -128 template< class GG, class II > │ │ │ │ │ -_1_2_9 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 │ │ │ │ │ -130 { │ │ │ │ │ -131 return intersection._b_o_u_n_d_a_r_y_S_e_g_m_e_n_t_I_n_d_e_x(); │ │ │ │ │ -132 } │ │ │ │ │ -133 │ │ │ │ │ -135 template< int codim > │ │ │ │ │ -_1_3_6 int _n_u_m_P_a_r_a_m_e_t_e_r_s () const │ │ │ │ │ -137 { │ │ │ │ │ -138 if( codim == 0 ) │ │ │ │ │ -139 return dgf_.nofelparams; │ │ │ │ │ -140 else if( codim == _d_i_m_e_n_s_i_o_n ) │ │ │ │ │ -141 return dgf_.nofvtxparams; │ │ │ │ │ -142 else │ │ │ │ │ -143 return 0; │ │ │ │ │ -144 } │ │ │ │ │ -145 │ │ │ │ │ -147 template< class Entity > │ │ │ │ │ -_1_4_8 int _n_u_m_P_a_r_a_m_e_t_e_r_s ( const _E_n_t_i_t_y & ) const │ │ │ │ │ -149 { │ │ │ │ │ -150 return numParameters< Entity::codimension >(); │ │ │ │ │ -151 } │ │ │ │ │ -152 │ │ │ │ │ -_1_5_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< 0 │ │ │ │ │ ->::Entity &element ) │ │ │ │ │ -155 { │ │ │ │ │ -156 if( numParameters< 0 >() <= 0 ) │ │ │ │ │ -157 { │ │ │ │ │ -158 DUNE_THROW( InvalidStateException, │ │ │ │ │ -159 "Calling DGFGridFactory::parameter is only allowed if there are │ │ │ │ │ -parameters." ); │ │ │ │ │ -160 } │ │ │ │ │ -161 return dgf_.elParams[ factory_.insertionIndex( element ) ]; │ │ │ │ │ -162 } │ │ │ │ │ -163 │ │ │ │ │ -_1_6_5 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 ) │ │ │ │ │ -166 { │ │ │ │ │ -167 if( numParameters< dimension >() <= 0 ) │ │ │ │ │ -168 { │ │ │ │ │ -169 DUNE_THROW( InvalidStateException, │ │ │ │ │ -170 "Calling DGFGridFactory::parameter is only allowed if there are │ │ │ │ │ -parameters." ); │ │ │ │ │ -171 } │ │ │ │ │ -172 return dgf_.vtxParams[ factory_.insertionIndex( vertex ) ]; │ │ │ │ │ -173 } │ │ │ │ │ -174 │ │ │ │ │ -_1_7_6 bool _h_a_v_e_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_s () const │ │ │ │ │ -177 { │ │ │ │ │ -178 return dgf_.haveBndParameters; │ │ │ │ │ -179 } │ │ │ │ │ -180 │ │ │ │ │ -182 template< class GG, class II > │ │ │ │ │ -_1_8_3 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 │ │ │ │ │ -184 { │ │ │ │ │ -185 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; │ │ │ │ │ -186 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(); │ │ │ │ │ -187 const int face = intersection._i_n_d_e_x_I_n_I_n_s_i_d_e(); │ │ │ │ │ -188 │ │ │ │ │ -189 auto refElem = referenceElement< double, dimension >( entity.type() ); │ │ │ │ │ -190 int corners = refElem.size( face, 1, _d_i_m_e_n_s_i_o_n ); │ │ │ │ │ -191 std::vector< unsigned int > bound( corners ); │ │ │ │ │ -192 for( int i = 0; i < corners; ++i ) │ │ │ │ │ -193 { │ │ │ │ │ -194 const int k = refElem.subEntity( face, 1, i, _d_i_m_e_n_s_i_o_n ); │ │ │ │ │ -195 bound[ i ] = factory_.insertionIndex( entity.template subEntity< dimension │ │ │ │ │ ->( k ) ); │ │ │ │ │ -196 } │ │ │ │ │ -197 │ │ │ │ │ -198 DuneGridFormatParser::facemap_t::key_type key( bound, false ); │ │ │ │ │ -199 const DuneGridFormatParser::facemap_t::const_iterator pos = │ │ │ │ │ -dgf_.facemap.find( key ); │ │ │ │ │ -200 if( pos != dgf_.facemap.end() ) │ │ │ │ │ -201 return dgf_.facemap.find( key )->second.second; │ │ │ │ │ -202 else │ │ │ │ │ -203 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(); │ │ │ │ │ -204 } │ │ │ │ │ -205 │ │ │ │ │ -206 private: │ │ │ │ │ -207 // create grid │ │ │ │ │ -208 void generate ( std::istream &input ); │ │ │ │ │ -209 │ │ │ │ │ -210 // return rank │ │ │ │ │ -211 static int rank( _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e MPICOMM ) │ │ │ │ │ -212 { │ │ │ │ │ -213 int rank = 0; │ │ │ │ │ -214#if HAVE_MPI │ │ │ │ │ -215 MPI_Comm_rank( MPICOMM, &rank ); │ │ │ │ │ -216#endif │ │ │ │ │ -217 return rank; │ │ │ │ │ -218 } │ │ │ │ │ -219 │ │ │ │ │ -220 // return size │ │ │ │ │ -221 static int size( _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e MPICOMM ) │ │ │ │ │ -222 { │ │ │ │ │ -223 int size = 1; │ │ │ │ │ -224#if HAVE_MPI │ │ │ │ │ -225 MPI_Comm_size( MPICOMM, &size ); │ │ │ │ │ -226#endif │ │ │ │ │ -227 return size; │ │ │ │ │ -228 } │ │ │ │ │ -229 │ │ │ │ │ -230 _G_r_i_d *grid_; │ │ │ │ │ -231 GridFactory< UGGrid< dim > > factory_; │ │ │ │ │ -232 DuneGridFormatParser dgf_; │ │ │ │ │ -233 }; │ │ │ │ │ -234#endif // #if HAVE_DUNE_UGGRID │ │ │ │ │ -235 │ │ │ │ │ -236} // namespace Dune │ │ │ │ │ -237 │ │ │ │ │ -238#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. │ │ │ │ │ +_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::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_:_:_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:93 │ │ │ │ │ +_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_:_:_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:40 │ │ │ │ │ -_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:49 │ │ │ │ │ -_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: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_:_:_h_e_a_p_S_i_z_e__ │ │ │ │ │ -size_t heapSize_ │ │ │ │ │ -DDeeffiinniittiioonn dgfug.hh:54 │ │ │ │ │ -_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: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_:_:_n_o_C_o_p_y │ │ │ │ │ -bool noCopy() const │ │ │ │ │ -returns true if no copies are made for UGGrid elements │ │ │ │ │ -DDeeffiinniittiioonn dgfug.hh:47 │ │ │ │ │ -_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:45 │ │ │ │ │ -_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:70 │ │ │ │ │ -_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:65 │ │ │ │ │ -_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:183 │ │ │ │ │ -_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:165 │ │ │ │ │ -_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:102 │ │ │ │ │ -_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:89 │ │ │ │ │ -_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:148 │ │ │ │ │ -_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:129 │ │ │ │ │ -_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:85 │ │ │ │ │ -_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:122 │ │ │ │ │ -_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:92 │ │ │ │ │ -_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:136 │ │ │ │ │ -_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:176 │ │ │ │ │ -_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:154 │ │ │ │ │ -_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:115 │ │ │ │ │ -_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:208 │ │ │ │ │ -_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/a00872.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: parser.hh File Reference │ │ │ │ +dune-grid: polygon.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,46 +65,43 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
parser.hh File Reference
│ │ │ │ +
polygon.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include <iostream>
│ │ │ │ -#include <string>
│ │ │ │ #include <vector>
│ │ │ │ -#include <map>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/entitykey.hh>
│ │ │ │ +#include <dune/common/typetraits.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...
struct  Dune::dgf::PolygonBlock
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ 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 │ │ │ │ │ +polygon.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 │ │ │ │ │ +#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_._._. │ │ │ │ │ +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/a00872_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: parser.hh Source File │ │ │ │ +dune-grid: polygon.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,230 +70,95 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
parser.hh
│ │ │ │ +
polygon.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │ +
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 <iostream>
│ │ │ │ -
9#include <string>
│ │ │ │ -
10#include <vector>
│ │ │ │ -
11#include <map>
│ │ │ │ -
12
│ │ │ │ - │ │ │ │ -
14
│ │ │ │ -
15namespace Dune
│ │ │ │ -
16{
│ │ │ │ -
17
│ │ │ │ -
18 class DGFPrintInfo;
│ │ │ │ +
9#include <vector>
│ │ │ │ +
10
│ │ │ │ +
11#include <dune/common/typetraits.hh>
│ │ │ │ + │ │ │ │ +
13
│ │ │ │ +
14namespace Dune
│ │ │ │ +
15{
│ │ │ │ +
16
│ │ │ │ +
17 namespace dgf
│ │ │ │ +
18 {
│ │ │ │
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 };
│ │ │ │ -
│ │ │ │ +
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
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
47 {
│ │ │ │ -
48 public:
│ │ │ │ -
49 typedef enum {Simplex,Cube,General} element_t;
│ │ │ │ -
50
│ │ │ │ - │ │ │ │ +
44 polygons.push_back( polygon );
│ │ │ │ +
45 }
│ │ │ │ +
46 return polygons.size();
│ │ │ │ +
47 }
│ │ │ │ +
│ │ │ │ +
48
│ │ │ │ +
49 protected:
│ │ │ │ + │ │ │ │ +
51 };
│ │ │ │ +
│ │ │ │
52
│ │ │ │ -
54 DuneGridFormatParser ( int rank, int size );
│ │ │ │ +
53 } // namespace dgf
│ │ │ │ +
54} // end namespace Dune
│ │ │ │
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 );
│ │ │ │ -
97
│ │ │ │ -
98 protected:
│ │ │ │ -
99 void generateBoundaries ( std::istream &, bool );
│ │ │ │ -
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 interval 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
│ │ │ │ - │ │ │ │ +
56#endif // #ifndef DUNE_POLYGON_HH
│ │ │ │ + │ │ │ │
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
│ │ │ │ +
void reset()
Definition basic.hh:51
│ │ │ │ +
bool getnextline()
Definition basic.cc:93
│ │ │ │ +
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
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,331 +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 │ │ │ │ │ -parser.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 © 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 │ │ │ │ │ +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#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 │ │ │ │ │ -15namespace _D_u_n_e │ │ │ │ │ -16{ │ │ │ │ │ -17 │ │ │ │ │ -18 class DGFPrintInfo; │ │ │ │ │ +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 │ │ │ │ │ -_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 }; │ │ │ │ │ +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 │ │ │ │ │ -_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; │ │ │ │ │ +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 │ │ │ │ │ -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 ); │ │ │ │ │ +53 } // namespace dgf │ │ │ │ │ +54} // end namespace Dune │ │ │ │ │ 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 │ │ │ │ │ -); │ │ │ │ │ -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 │ │ │ │ │ -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 interval 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 │ │ │ │ │ +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_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_:_:_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:93 │ │ │ │ │ +_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 │ │ │ │ │ =============================================================================== │ │ │ │ │ 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: dgfoned.hh File Reference │ │ │ │ +dune-grid: boundaryseg.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,48 +65,32 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ Namespaces
│ │ │ │ -
dgfoned.hh File Reference
│ │ │ │ +
boundaryseg.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.

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

│ │ │ │ -Classes

struct  Dune::DGFGridInfo< OneDGrid >
 
struct  Dune::DGFGridFactory< OneDGrid >
 
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,30 +3,19 @@ │ │ │ │ │ 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 │ │ │ │ │ +boundaryseg.cc File Reference │ │ │ │ │ +#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 │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ 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: dgfgeogrid.hh File Reference │ │ │ │ +dune-grid: cube.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,54 +65,43 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
dgfgeogrid.hh File Reference
│ │ │ │ +
cube.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 <cassert>
│ │ │ │ +#include <iostream>
│ │ │ │ +#include <vector>
│ │ │ │ +#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 > >
class  Dune::dgf::CubeBlock
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ 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 │ │ │ │ │ -#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> │ │ │ │ │ +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 │ │ │ │ │ - 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_ _> │ │ │ │ │ - _> │ │ │ │ │ +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 │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00878_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dgfgeogrid.hh Source File │ │ │ │ +dune-grid: cube.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,348 +70,96 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dgfgeogrid.hh
│ │ │ │ +
cube.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │ +
5#ifndef DUNE_DGF_CUBEBLOCK_HH
│ │ │ │ +
6#define DUNE_DGF_CUBEBLOCK_HH
│ │ │ │
7
│ │ │ │ -
8#include <dune/common/typetraits.hh>
│ │ │ │ -
9
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
15
│ │ │ │ - │ │ │ │ +
8#include <cassert>
│ │ │ │ +
9#include <iostream>
│ │ │ │ +
10#include <vector>
│ │ │ │ +
11
│ │ │ │ + │ │ │ │ +
13
│ │ │ │ +
14
│ │ │ │ +
15namespace Dune
│ │ │ │ +
16{
│ │ │ │
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 ************************************************************************/
│ │ │ │ +
18 namespace dgf
│ │ │ │ +
19 {
│ │ │ │ +
20
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
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 // External Forward Declarations
│ │ │ │ -
32 // -----------------------------
│ │ │ │ +
31 public:
│ │ │ │ +
32 CubeBlock ( std :: istream &in, int pnofvtx, int pvtxoffset, int &pdimgrid );
│ │ │ │
33
│ │ │ │ -
34 template< class GridImp, class IntersectionImp >
│ │ │ │ -
35 class Intersection;
│ │ │ │ -
36
│ │ │ │ +
34 int get ( std :: vector< std :: vector< unsigned int> > &simplex,
│ │ │ │ +
35 std :: vector< std :: vector< double > > &params,
│ │ │ │ +
36 int &nofp );
│ │ │ │
37
│ │ │ │ -
38
│ │ │ │ -
39 // DGFCoordFunction
│ │ │ │ -
40 // ----------------
│ │ │ │ -
41
│ │ │ │ -
42 template< int dimD, int dimR >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
44 : public AnalyticalCoordFunction< double, dimD, dimR, DGFCoordFunction< dimD, dimR > >
│ │ │ │ -
45 {
│ │ │ │ - │ │ │ │ - │ │ │ │ +
38 // some information
│ │ │ │ +
│ │ │ │ +
39 bool ok ()
│ │ │ │ +
40 {
│ │ │ │ +
41 return goodline;
│ │ │ │ +
42 }
│ │ │ │ +
│ │ │ │ +
43
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
45 {
│ │ │ │ +
46 return noflines();
│ │ │ │ +
47 }
│ │ │ │ +
│ │ │ │
48
│ │ │ │ -
49 public:
│ │ │ │ - │ │ │ │ - │ │ │ │ -
52
│ │ │ │ - │ │ │ │ -
54
│ │ │ │ -
│ │ │ │ -
55 DGFCoordFunction ( const Expression *expression )
│ │ │ │ -
56 : expression_( expression )
│ │ │ │ -
57 {}
│ │ │ │ +
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 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 }
│ │ │ │ -
│ │ │ │ -
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 };
│ │ │ │ -
│ │ │ │ -
225
│ │ │ │ -
226}
│ │ │ │ -
227
│ │ │ │ -
228#endif // #ifndef DUNE_DGFGEOGRID_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
59} // end namespace Dune
│ │ │ │ +
60
│ │ │ │ +
61#endif
│ │ │ │ + │ │ │ │
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:606
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
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:102
│ │ │ │ +
int nofsimplex()
Definition cube.hh:44
│ │ │ │ +
bool ok()
Definition cube.hh:39
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,424 +3,96 @@ │ │ │ │ │ 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 │ │ │ │ │ +cube.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 © 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 │ │ │ │ │ +5#ifndef DUNE_DGF_CUBEBLOCK_HH │ │ │ │ │ +6#define DUNE_DGF_CUBEBLOCK_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> │ │ │ │ │ +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 │ │ │ │ │ -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 ************************************************************************/ │ │ │ │ │ +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 // External Forward Declarations │ │ │ │ │ -32 // ----------------------------- │ │ │ │ │ +31 public: │ │ │ │ │ +32 _C_u_b_e_B_l_o_c_k ( std :: istream &in, int pnofvtx, int pvtxoffset, int &pdimgrid │ │ │ │ │ +); │ │ │ │ │ 33 │ │ │ │ │ -34 template< class GridImp, class IntersectionImp > │ │ │ │ │ -35 class Intersection; │ │ │ │ │ -36 │ │ │ │ │ +34 int _g_e_t ( std :: vector< std :: vector< unsigned int> > &simplex, │ │ │ │ │ +35 std :: vector< std :: vector< double > > ¶ms, │ │ │ │ │ +36 int &nofp ); │ │ │ │ │ 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 > > │ │ │ │ │ +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 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; │ │ │ │ │ +46 return _n_o_f_l_i_n_e_s(); │ │ │ │ │ +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; │ │ │ │ │ -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 {} │ │ │ │ │ +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 │ │ │ │ │ -_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 │ │ │ │ │ +59} // end namespace Dune │ │ │ │ │ +60 │ │ │ │ │ +61#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_:_:_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:606 │ │ │ │ │ -_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 │ │ │ │ │ +_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:102 │ │ │ │ │ +_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 │ │ │ │ │ =============================================================================== │ │ │ │ │ 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: gmsh2dgf.cc File Reference │ │ │ │ +dune-grid: interval.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,70 +65,52 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ +Classes | │ │ │ │ +Namespaces | │ │ │ │ Functions
│ │ │ │ -
gmsh2dgf.cc File Reference
│ │ │ │ +
interval.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ -

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

│ │ │ │
#include <iostream>
│ │ │ │ -#include <dune/common/parallel/mpihelper.hh>
│ │ │ │ -#include <dune/grid/io/file/gmshreader.hh>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/dgfwriter.hh>
│ │ │ │ -
│ │ │ │ +#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

int main (int argc, char *argv[])
 
std::ostream & Dune::dgf::operator<< (std::ostream &out, const IntervalBlock::Interval &interval)
 
│ │ │ │ -

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[] 
)
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,33 +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 │ │ │ │ │ - * _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_._._. │ │ │ │ │ + * _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 <_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> │ │ │ │ │ +#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 │ │ │ │ │ -int  _m_a_i_n (int argc, char *argv[]) │ │ │ │ │ +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 ********** │ │ │ │ │ -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/a00884.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dgf2dgf.cc File Reference │ │ │ │ +dune-grid: dim.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,74 +65,42 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Functions
│ │ │ │ -
dgf2dgf.cc File Reference
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
dim.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ - │ │ │ │ -

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

│ │ │ │
#include <iostream>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/dgfwriter.hh>
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -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[] 
)
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │ │
│ │ │ │ +

Go to the source code of this file.

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

│ │ │ │ +Classes

class  Dune::dgf::DimBlock
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,41 +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 │ │ │ │ │ - * _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_._._. │ │ │ │ │ + * _b_l_o_c_k_s │ │ │ │ │ +_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_/_d_g_f_w_r_i_t_e_r_._h_h> │ │ │ │ │ -FFuunnccttiioonnss │ │ │ │ │ -int  _m_a_i_n (int argc, char *argv[]) │ │ │ │ │ +#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_:_:_D_i_m_B_l_o_c_k │ │ │ │ │ +  │ │ │ │ │ +NNaammeessppaacceess │ │ │ │ │ +namespace   _D_u_n_e │ │ │ │ │ +  Include standard header files. │ │ │ │ │ +  │ │ │ │ │ +namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │   │ │ │ │ │ -********** 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/a00887.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: entitykey.hh File Reference │ │ │ │ +dune-grid: boundaryseg.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,43 +65,46 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
entitykey.hh File Reference
│ │ │ │ +
boundaryseg.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <iostream>
│ │ │ │ +
#include <cassert>
│ │ │ │ +#include <iostream>
│ │ │ │ +#include <string>
│ │ │ │ #include <vector>
│ │ │ │ -#include <dune/grid/io/file/dgfparser/dgfexception.hh>
│ │ │ │ -#include "entitykey_inline.hh"
│ │ │ │ +#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

struct  Dune::DGFEntityKey< A >
 
struct  Dune::ElementFaceUtil
class  Dune::dgf::BoundarySegBlock
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,25 +3,29 @@ │ │ │ │ │ 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 │ │ │ │ │ -entitykey.hh File Reference │ │ │ │ │ +boundaryseg.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_/_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" │ │ │ │ │ +#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 │ │ │ │ │ -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 │ │ │ │ │ +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 │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00887_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: entitykey.hh Source File │ │ │ │ +dune-grid: boundaryseg.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,221 +70,122 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
entitykey.hh
│ │ │ │ +
boundaryseg.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_DGF_BOUNDARYSEGBLOCK_HH
│ │ │ │ +
6#define DUNE_DGF_BOUNDARYSEGBLOCK_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
│ │ │ │ - │ │ │ │ -
28
│ │ │ │ -
│ │ │ │ -
29 inline const A &operator[] ( int i ) const;
│ │ │ │ -
│ │ │ │ -
30 inline bool operator < ( const DGFEntityKey< A > &k ) const;
│ │ │ │ -
31
│ │ │ │ -
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 template< class A >
│ │ │ │ -
│ │ │ │ -
46 inline const A &DGFEntityKey< A > :: operator[] ( int i ) const
│ │ │ │ -
47 {
│ │ │ │ -
48 return key_[ i ];
│ │ │ │ -
49 }
│ │ │ │ +
8#include <cassert>
│ │ │ │ +
9#include <iostream>
│ │ │ │ +
10#include <string>
│ │ │ │ +
11#include <vector>
│ │ │ │ +
12#include <map>
│ │ │ │ +
13
│ │ │ │ + │ │ │ │ + │ │ │ │ +
16
│ │ │ │ +
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 }
│ │ │ │
│ │ │ │ -
50
│ │ │ │ -
51
│ │ │ │ -
52 template< class A >
│ │ │ │ +
52
│ │ │ │
│ │ │ │ - │ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
79
│ │ │ │ + │ │ │ │ +
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} // end namespace Dune
│ │ │ │
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// include inline implementation
│ │ │ │ -
154#include "entitykey_inline.hh"
│ │ │ │ -
155#endif
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ +
81#endif
│ │ │ │ + │ │ │ │ + │ │ │ │
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:34
│ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ +
std::string type
type of additional boundary parameters
Definition parser.hh:25
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,217 +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 │ │ │ │ │ -entitykey.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 © 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_DGF_BOUNDARYSEGBLOCK_HH │ │ │ │ │ +6#define DUNE_DGF_BOUNDARYSEGBLOCK_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 │ │ │ │ │ -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 │ │ │ │ │ -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 │ │ │ │ │ -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 │ │ │ │ │ +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 │ │ │ │ │ +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 // 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(); │ │ │ │ │ -78 } │ │ │ │ │ -79 │ │ │ │ │ +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 │ │ │ │ │ -&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// include 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 │ │ │ │ │ +81#endif │ │ │ │ │ +_p_a_r_s_e_r_._h_h │ │ │ │ │ +_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_:_:_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:34 │ │ │ │ │ +_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_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_:_:_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/a00890.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dgfyasp.hh File Reference │ │ │ │ +dune-grid: gridparameter.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,47 +65,25 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ Namespaces
│ │ │ │ -
dgfyasp.hh File Reference
│ │ │ │ +
gridparameter.cc File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#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::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 > >
 
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,39 +3,18 @@ │ │ │ │ │ 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 │ │ │ │ │ -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_:_:_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_ _>_ _> │ │ │ │ │ -  │ │ │ │ │ + * _b_l_o_c_k_s │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +gridparameter.cc File Reference │ │ │ │ │ +#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/a00893.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: gnuplot.hh File Reference │ │ │ │ +dune-grid: cube.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,58 +65,33 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ Namespaces
│ │ │ │ -
gnuplot.hh File Reference
│ │ │ │ +
cube.cc File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ -

Provides gnuplot output for 1D Grids. │ │ │ │ -More...

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

Go to the source code of this file.

│ │ │ │ -

│ │ │ │ Namespaces

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

│ │ │ │ -Classes

class  Dune::GnuplotWriter< GridView >
 Writer for 1D grids in gnuplot format. More...
 
class  Dune::LeafGnuplotWriter< G >
 GnuplotWriter on the leaf grid. More...
 
class  Dune::LevelGnuplotWriter< G >
 GnuplotWriter on a given level grid. More...
 
│ │ │ │ +
#include <dune/grid/io/file/dgfparser/blocks/cube.hh>
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ Namespaces

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

Detailed Description

│ │ │ │ -

Provides gnuplot output for 1D Grids.

│ │ │ │ -
Author
Christian Engwer
│ │ │ │ -
│ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,38 +2,20 @@ │ │ │ │ │ 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 │ │ │ │ │ -gnuplot.hh File Reference │ │ │ │ │ -Provides gnuplot output for 1D Grids. _M_o_r_e_._._. │ │ │ │ │ -#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 "_g_n_u_p_l_o_t_/_g_n_u_p_l_o_t_._c_c" │ │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ -CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_G_n_u_p_l_o_t_W_r_i_t_e_r_<_ _G_r_i_d_V_i_e_w_ _> │ │ │ │ │ -  Writer for 1D grids in gnuplot format. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_L_e_a_f_G_n_u_p_l_o_t_W_r_i_t_e_r_<_ _G_ _> │ │ │ │ │ -  _G_n_u_p_l_o_t_W_r_i_t_e_r on the leaf grid. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_L_e_v_e_l_G_n_u_p_l_o_t_W_r_i_t_e_r_<_ _G_ _> │ │ │ │ │ -  _G_n_u_p_l_o_t_W_r_i_t_e_r on a given level grid. _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 │ │ │ │ │ +cube.cc File Reference │ │ │ │ │ +#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. │ │ │ │ │   │ │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -Provides gnuplot output for 1D Grids. │ │ │ │ │ - Author │ │ │ │ │ - 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/a00896.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: vtk.hh File Reference │ │ │ │ +dune-grid: projection.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,33 +65,76 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
vtk.hh File Reference
│ │ │ │ +
│ │ │ │ +Classes | │ │ │ │ +Namespaces | │ │ │ │ +Functions
│ │ │ │ +
projection.cc 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"
│ │ │ │ -
│ │ │ │ -

Go to the source code of this file.

│ │ │ │ -

Detailed Description

│ │ │ │ -

Convenience header which includes all available VTK writers.

│ │ │ │ -
│ │ │ │ +
#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 {} │ │ │ │ │ @@ -2,19 +2,58 @@ │ │ │ │ │ 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" │ │ │ │ │ -_G_o_ _t_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. │ │ │ │ │ + * _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 <_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/a00899.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dataarraywriter.hh File Reference │ │ │ │ +dune-grid: vertex.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,78 +65,43 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
dataarraywriter.hh File Reference
│ │ │ │ +
vertex.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ -

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>
│ │ │ │ +
#include <iostream>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/basic.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...
 
class  Dune::VTK::NakedRawDataArrayWriter
 a streaming writer for appended data arrays, uses raw format More...
 
class  Dune::VTK::DataArrayWriterFactory
 a factory for DataArrayWriters More...
class  Dune::dgf::VertexBlock
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ 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,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 │ │ │ │ │ + * _b_l_o_c_k_s │ │ │ │ │ _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 │ │ │ │ │ +vertex.hh File Reference │ │ │ │ │ #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 <_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_:_:_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_._._. │ │ │ │ │ +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_:_:_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/a00899_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dataarraywriter.hh Source File │ │ │ │ +dune-grid: vertex.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,526 +70,93 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dataarraywriter.hh
│ │ │ │ +
vertex.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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>
│ │ │ │ -
11#include <string>
│ │ │ │ -
12#include <iomanip>
│ │ │ │ -
13#include <cstdint>
│ │ │ │ -
14#include <cmath>
│ │ │ │ +
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#include <dune/common/exceptions.hh>
│ │ │ │ -
17#include <dune/common/indent.hh>
│ │ │ │ +
16 namespace dgf
│ │ │ │ +
17 {
│ │ │ │
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; // invalid 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.
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
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
│ │ │ │ +
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
│ │ │ │ + │ │ │ │
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 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:62
│ │ │ │ +
int offset() const
Definition vertex.hh:42
│ │ │ │ +
bool ok() const
Definition vertex.hh:37
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,598 +2,93 @@ │ │ │ │ │ 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 │ │ │ │ │ + * _b_l_o_c_k_s │ │ │ │ │ +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 © 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 │ │ │ │ │ -11#include │ │ │ │ │ -12#include │ │ │ │ │ -13#include │ │ │ │ │ -14#include │ │ │ │ │ +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#include │ │ │ │ │ -17#include │ │ │ │ │ +16 namespace dgf │ │ │ │ │ +17 { │ │ │ │ │ 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 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; // invalid 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. │ │ │ │ │ +_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 │ │ │ │ │ +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 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 │ │ │ │ │ _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_:_:_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:62 │ │ │ │ │ +_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/a00902.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: b64enc.hh File Reference │ │ │ │ +dune-grid: dim.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,54 +65,33 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ Namespaces
│ │ │ │ -
b64enc.hh File Reference
│ │ │ │ +
dim.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 <dune/grid/io/file/dgfparser/blocks/dim.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,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 │ │ │ │ │ -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 │ │ │ │ │ + * _b_l_o_c_k_s │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +dim.cc File Reference │ │ │ │ │ +#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. │ │ │ │ │   │ │ │ │ │ -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/a00905.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: vtksequencewriter.hh File Reference │ │ │ │ +dune-grid: simplex.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,42 +65,42 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
vtksequencewriter.hh File Reference
│ │ │ │ +
simplex.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 <iostream>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::VTKSequenceWriter< GridView >
 Writer for the output of grid functions in the vtk format. More...
class  Dune::dgf::SimplexBlock
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,25 +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 │ │ │ │ │ + * _b_l_o_c_k_s │ │ │ │ │ _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> │ │ │ │ │ +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> │ │ │ │ │ _G_o_ _t_o_ _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 output of grid functions in the vtk format. _M_o_r_e_._._. │ │ │ │ │ +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 │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ 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: vtksequencewriter.hh Source File │ │ │ │ +dune-grid: simplex.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,102 +70,102 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
vtksequencewriter.hh
│ │ │ │ +
simplex.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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>
│ │ │ │ +
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
│ │ │ │ -
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.
│ │ │ │ +
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
│ │ │ │ + │ │ │ │
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 output 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 output of grid functions in the vtk format.
Definition vtkwriter.hh:95
│ │ │ │ +
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:145
│ │ │ │ +
int get(std ::vector< std ::vector< unsigned int > > &simplex, std ::vector< std ::vector< double > > &params, int &nofp)
Definition simplex.cc:68
│ │ │ │ +
int nofsimplex()
Definition simplex.hh:49
│ │ │ │ +
bool ok()
Definition simplex.hh:44
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,121 +2,107 @@ │ │ │ │ │ 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 │ │ │ │ │ + * _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 © 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 │ │ │ │ │ +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_/_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> │ │ │ │ │ +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_/_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> │ │ │ │ │ +13namespace _D_u_n_e │ │ │ │ │ +14{ │ │ │ │ │ 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 { │ │ │ │ │ +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: │ │ │ │ │ -_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. │ │ │ │ │ +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 │ │ │ │ │ _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 output 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 output of grid functions in the vtk format. │ │ │ │ │ -DDeeffiinniittiioonn vtkwriter.hh:95 │ │ │ │ │ +_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:145 │ │ │ │ │ +_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:68 │ │ │ │ │ +_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/a00908.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: corner.hh File Reference │ │ │ │ +dune-grid: simplex.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,40 +65,31 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ Namespaces
│ │ │ │ -
corner.hh File Reference
│ │ │ │ +
simplex.cc File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/grid/io/file/vtk/common.hh>
│ │ │ │ -
│ │ │ │ -

Go to the source code of this file.

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

│ │ │ │ -Classes

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

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::VTK
namespace  Dune::dgf
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,24 +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 │ │ │ │ │ -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_:_:_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_._._. │ │ │ │ │ -  │ │ │ │ │ + * _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 <_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_:_:_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: vertex.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,59 +65,33 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ Namespaces
│ │ │ │ -
function.hh File Reference
│ │ │ │ +
vertex.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...
 
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ 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,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 │ │ │ │ │ -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 │ │ │ │ │ +vertex.cc File Reference │ │ │ │ │ +#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. │ │ │ │ │   │ │ │ │ │ -********** 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: volumeiterators.hh File Reference │ │ │ │ +dune-grid: simplexgeneration.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,45 +65,40 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
volumeiterators.hh File Reference
│ │ │ │ +
simplexgeneration.hh 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>
│ │ │ │ +
#include <iostream>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

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

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::VTK
namespace  Dune::dgf
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,29 +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 │ │ │ │ │ -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> │ │ │ │ │ +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_. │ │ │ │ │ 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_ _> │ │ │ │ │ +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_:_:_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: volumeiterators.hh Source File │ │ │ │ +dune-grid: simplexgeneration.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,240 +70,156 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
volumeiterators.hh
│ │ │ │ +
simplexgeneration.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
24 const GV& gv;
│ │ │ │ -
25
│ │ │ │ -
26 typedef typename GV::IndexSet IndexSet;
│ │ │ │ -
27 const IndexSet& indexSet() const { return gv.indexSet(); }
│ │ │ │ - │ │ │ │ - │ │ │ │ -
30
│ │ │ │ -
31 public:
│ │ │ │ -
32 static const unsigned dimCell = GV::dimension;
│ │ │ │ -
33
│ │ │ │ -
34 typedef typename GV::template Codim<0>::Entity Cell;
│ │ │ │ -
35 typedef typename GV::template Codim<0>::
│ │ │ │ -
36 template Partition<InteriorBorder_Partition>::Iterator CellIterator;
│ │ │ │ -
37
│ │ │ │ - │ │ │ │ - │ │ │ │ +
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
│ │ │ │ - │ │ │ │ - │ │ │ │ -
43 typename GV::IndexSet> PointIterator;
│ │ │ │ -
44
│ │ │ │ - │ │ │ │ - │ │ │ │ -
47 typedef typename GV::Communication Communication;
│ │ │ │ -
48
│ │ │ │ -
│ │ │ │ -
49 explicit ConformingVolumeIteratorFactory(const GV& gv_)
│ │ │ │ -
50 : gv(gv_)
│ │ │ │ -
51 { }
│ │ │ │ -
│ │ │ │ -
52
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
54 return gv.template begin<0, InteriorBorder_Partition>();
│ │ │ │ -
55 }
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │
│ │ │ │ - │ │ │ │ -
57 return gv.template end<0, InteriorBorder_Partition>();
│ │ │ │ -
58 }
│ │ │ │ -
│ │ │ │ -
59
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
62 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
64 return CornerIterator(endCells());
│ │ │ │ -
65 }
│ │ │ │ -
│ │ │ │ -
66
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
68 return PointIterator(beginCells(), endCells(), gv.indexSet());
│ │ │ │ +
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 }
│ │ │ │
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
71 return PointIterator(endCells());
│ │ │ │ -
72 }
│ │ │ │ -
│ │ │ │ -
73
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
75 return ConnectivityWriter(*this);
│ │ │ │ -
76 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
77 const Communication& comm() const {
│ │ │ │ -
78 return gv.comm();
│ │ │ │ +
70
│ │ │ │ +
│ │ │ │ +
71 std :: string filetype ()
│ │ │ │ +
72 {
│ │ │ │ +
73 return filetype_;
│ │ │ │ +
74 }
│ │ │ │ +
│ │ │ │ +
75
│ │ │ │ +
│ │ │ │ +
76 int dimension ()
│ │ │ │ +
77 {
│ │ │ │ +
78 return dimension_;
│ │ │ │
79 }
│ │ │ │
│ │ │ │ -
80 };
│ │ │ │ +
80
│ │ │ │ +
│ │ │ │ +
81 std :: string parameter ()
│ │ │ │ +
82 {
│ │ │ │ +
83 return parameter_;
│ │ │ │ +
84 }
│ │ │ │
│ │ │ │ -
81
│ │ │ │ -
82 template<typename GV>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
84 const GV& gv;
│ │ │ │
85
│ │ │ │ -
86 public:
│ │ │ │ -
87 static const unsigned dimCell = GV::dimension;
│ │ │ │ -
88
│ │ │ │ -
89 typedef typename GV::template Codim<0>::Entity Cell;
│ │ │ │ -
90 typedef typename GV::template Codim<0>::
│ │ │ │ -
91 template Partition<InteriorBorder_Partition>::Iterator CellIterator;
│ │ │ │ -
92
│ │ │ │ - │ │ │ │ - │ │ │ │ +
│ │ │ │ +
86 const std::string dumpFileName ( ) const
│ │ │ │ +
87 {
│ │ │ │ +
88 return dumpfilename_;
│ │ │ │ +
89 }
│ │ │ │ +
│ │ │ │ +
90 };
│ │ │ │ +
│ │ │ │ +
91
│ │ │ │ +
92 } // end namespace dgf
│ │ │ │ +
93
│ │ │ │ +
94} // end namespace Dune
│ │ │ │
95
│ │ │ │ -
96 typedef Corner Point;
│ │ │ │ - │ │ │ │ -
98
│ │ │ │ - │ │ │ │ -
100 typedef typename GV::Communication Communication;
│ │ │ │ -
101
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
103 : gv(gv_)
│ │ │ │ -
104 { }
│ │ │ │ -
│ │ │ │ -
105
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
107 return gv.template begin<0, InteriorBorder_Partition>();
│ │ │ │ -
108 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
110 return gv.template end<0, InteriorBorder_Partition>();
│ │ │ │ -
111 }
│ │ │ │ -
│ │ │ │ -
112
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
115 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
117 return CornerIterator(endCells());
│ │ │ │ -
118 }
│ │ │ │ -
│ │ │ │ -
119
│ │ │ │ - │ │ │ │ -
121 PointIterator endPoints() const { return endCorners(); }
│ │ │ │ -
122
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
124 return ConnectivityWriter();
│ │ │ │ -
125 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
126 const Communication& comm() const {
│ │ │ │ -
127 return gv.comm();
│ │ │ │ -
128 }
│ │ │ │ -
│ │ │ │ -
129 };
│ │ │ │ -
│ │ │ │ -
130
│ │ │ │ -
131 } // namespace VTK
│ │ │ │ -
132
│ │ │ │ -
134
│ │ │ │ -
135} // namespace Dune
│ │ │ │ -
136
│ │ │ │ -
137#endif // DUNE_GRID_IO_FILE_VTK_VOLUMEITERATORS_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
96#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
│ │ │ │ -
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
│ │ │ │ -
CornerIterator endCorners() const
Definition volumeiterators.hh:63
│ │ │ │ -
VTK::CornerIterator< CellIterator > CornerIterator
Definition volumeiterators.hh:39
│ │ │ │ -
VTK::Corner< Cell > Corner
Definition volumeiterators.hh:38
│ │ │ │ -
CellIterator endCells() const
Definition volumeiterators.hh:56
│ │ │ │ -
GV::Communication Communication
Definition volumeiterators.hh:47
│ │ │ │ -
VTK::PointIterator< CellIterator, typename GV::IndexSet > PointIterator
Definition volumeiterators.hh:43
│ │ │ │ -
ConformingConnectivityWriter< ConformingVolumeIteratorFactory< GV > > ConnectivityWriter
Definition volumeiterators.hh:46
│ │ │ │ -
CornerIterator beginCorners() const
Definition volumeiterators.hh:60
│ │ │ │ -
static const unsigned dimCell
Definition volumeiterators.hh:32
│ │ │ │ -
PointIterator endPoints() const
Definition volumeiterators.hh:70
│ │ │ │ -
const Communication & comm() const
Definition volumeiterators.hh:77
│ │ │ │ -
ConformingVolumeIteratorFactory(const GV &gv_)
Definition volumeiterators.hh:49
│ │ │ │ -
VTK::Corner< Cell > Point
Definition volumeiterators.hh:41
│ │ │ │ -
ConnectivityWriter makeConnectivity() const
Definition volumeiterators.hh:74
│ │ │ │ -
CellIterator beginCells() const
Definition volumeiterators.hh:53
│ │ │ │ -
GV::template Codim< 0 >::Entity Cell
Definition volumeiterators.hh:34
│ │ │ │ -
PointIterator beginPoints() const
Definition volumeiterators.hh:67
│ │ │ │ -
GV::template Codim< 0 >::template Partition< InteriorBorder_Partition >::Iterator CellIterator
Definition volumeiterators.hh:36
│ │ │ │ -
Definition volumeiterators.hh:83
│ │ │ │ -
const Communication & comm() const
Definition volumeiterators.hh:126
│ │ │ │ -
PointIterator beginPoints() const
Definition volumeiterators.hh:120
│ │ │ │ -
GV::Communication Communication
Definition volumeiterators.hh:100
│ │ │ │ -
CellIterator beginCells() const
Definition volumeiterators.hh:106
│ │ │ │ -
GV::template Codim< 0 >::Entity Cell
Definition volumeiterators.hh:89
│ │ │ │ -
NonConformingVolumeIteratorFactory(const GV &gv_)
Definition volumeiterators.hh:102
│ │ │ │ -
ConnectivityWriter makeConnectivity() const
Definition volumeiterators.hh:123
│ │ │ │ -
NonConformingConnectivityWriter< Cell > ConnectivityWriter
Definition volumeiterators.hh:99
│ │ │ │ -
static const unsigned dimCell
Definition volumeiterators.hh:87
│ │ │ │ -
CellIterator endCells() const
Definition volumeiterators.hh:109
│ │ │ │ -
CornerIterator endCorners() const
Definition volumeiterators.hh:116
│ │ │ │ -
VTK::CornerIterator< CellIterator > CornerIterator
Definition volumeiterators.hh:94
│ │ │ │ -
VTK::Corner< Cell > Corner
Definition volumeiterators.hh:93
│ │ │ │ -
CornerIterator PointIterator
Definition volumeiterators.hh:97
│ │ │ │ -
GV::template Codim< 0 >::template Partition< InteriorBorder_Partition >::Iterator CellIterator
Definition volumeiterators.hh:91
│ │ │ │ -
PointIterator endPoints() const
Definition volumeiterators.hh:121
│ │ │ │ -
Corner Point
Definition volumeiterators.hh:96
│ │ │ │ -
CornerIterator beginCorners() const
Definition volumeiterators.hh:113
│ │ │ │ +
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,286 +2,151 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ -volumeiterators.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 © 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 │ │ │ │ │ -9#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> │ │ │ │ │ -10 │ │ │ │ │ -11#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> │ │ │ │ │ -12#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> │ │ │ │ │ -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_/_p_o_i_n_t_i_t_e_r_a_t_o_r_._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_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y { │ │ │ │ │ -24 const GV& gv; │ │ │ │ │ -25 │ │ │ │ │ -26 typedef typename GV::IndexSet IndexSet; │ │ │ │ │ -_2_7 const IndexSet& indexSet() const { return gv.indexSet(); } │ │ │ │ │ -28 friend 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< │ │ │ │ │ -29 _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 >; │ │ │ │ │ -30 │ │ │ │ │ -31 public: │ │ │ │ │ -_3_2 static const unsigned _d_i_m_C_e_l_l = GV::dimension; │ │ │ │ │ -33 │ │ │ │ │ -_3_4 typedef typename GV::template Codim<0>::Entity _C_e_l_l; │ │ │ │ │ -35 typedef typename GV::template Codim<0>:: │ │ │ │ │ -_3_6 template Partition::Iterator _C_e_l_l_I_t_e_r_a_t_o_r; │ │ │ │ │ -37 │ │ │ │ │ -_3_8 typedef _V_T_K_:_:_C_o_r_n_e_r_<_C_e_l_l_> _C_o_r_n_e_r; │ │ │ │ │ -_3_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; │ │ │ │ │ +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 typedef _V_T_K_:_:_C_o_r_n_e_r_<_C_e_l_l_> _P_o_i_n_t; │ │ │ │ │ -42 typedef _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, │ │ │ │ │ -_4_3 typename GV::IndexSet> _P_o_i_n_t_I_t_e_r_a_t_o_r; │ │ │ │ │ -44 │ │ │ │ │ -45 typedef _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_V_o_l_u_m_e_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_<_G_V_> │ │ │ │ │ -_4_6 > _C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r; │ │ │ │ │ -_4_7 typedef typename GV::Communication _C_o_m_m_u_n_i_c_a_t_i_o_n; │ │ │ │ │ -48 │ │ │ │ │ -_4_9 explicit _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(const GV& gv_) │ │ │ │ │ -50 : gv(gv_) │ │ │ │ │ -51 { } │ │ │ │ │ -52 │ │ │ │ │ -_5_3 _C_e_l_l_I_t_e_r_a_t_o_r _b_e_g_i_n_C_e_l_l_s() const { │ │ │ │ │ -54 return gv.template begin<0, InteriorBorder_Partition>(); │ │ │ │ │ -55 } │ │ │ │ │ -_5_6 _C_e_l_l_I_t_e_r_a_t_o_r _e_n_d_C_e_l_l_s() const { │ │ │ │ │ -57 return gv.template end<0, InteriorBorder_Partition>(); │ │ │ │ │ -58 } │ │ │ │ │ -59 │ │ │ │ │ -_6_0 _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 { │ │ │ │ │ -61 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()); │ │ │ │ │ -62 } │ │ │ │ │ -_6_3 _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 { │ │ │ │ │ -64 return _C_o_r_n_e_r_I_t_e_r_a_t_o_r(_e_n_d_C_e_l_l_s()); │ │ │ │ │ -65 } │ │ │ │ │ -66 │ │ │ │ │ -_6_7 _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 { │ │ │ │ │ -68 return _P_o_i_n_t_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(), gv.indexSet()); │ │ │ │ │ +_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 } │ │ │ │ │ -_7_0 _P_o_i_n_t_I_t_e_r_a_t_o_r _e_n_d_P_o_i_n_t_s() const { │ │ │ │ │ -71 return _P_o_i_n_t_I_t_e_r_a_t_o_r(_e_n_d_C_e_l_l_s()); │ │ │ │ │ -72 } │ │ │ │ │ -73 │ │ │ │ │ -_7_4 _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 { │ │ │ │ │ -75 return _C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r(*this); │ │ │ │ │ -76 } │ │ │ │ │ -_7_7 const _C_o_m_m_u_n_i_c_a_t_i_o_n& _c_o_m_m() const { │ │ │ │ │ -78 return gv.comm(); │ │ │ │ │ +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 }; │ │ │ │ │ -81 │ │ │ │ │ -82 template │ │ │ │ │ -_8_3 class _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 { │ │ │ │ │ -84 const GV& gv; │ │ │ │ │ +80 │ │ │ │ │ +_8_1 std :: string _p_a_r_a_m_e_t_e_r () │ │ │ │ │ +82 { │ │ │ │ │ +83 return parameter_; │ │ │ │ │ +84 } │ │ │ │ │ 85 │ │ │ │ │ -86 public: │ │ │ │ │ -_8_7 static const unsigned _d_i_m_C_e_l_l = GV::dimension; │ │ │ │ │ -88 │ │ │ │ │ -_8_9 typedef typename GV::template Codim<0>::Entity _C_e_l_l; │ │ │ │ │ -90 typedef typename GV::template Codim<0>:: │ │ │ │ │ -_9_1 template Partition::Iterator _C_e_l_l_I_t_e_r_a_t_o_r; │ │ │ │ │ -92 │ │ │ │ │ -_9_3 typedef _V_T_K_:_:_C_o_r_n_e_r_<_C_e_l_l_> _C_o_r_n_e_r; │ │ │ │ │ -_9_4 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; │ │ │ │ │ +_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 │ │ │ │ │ -_9_6 typedef _C_o_r_n_e_r _P_o_i_n_t; │ │ │ │ │ -_9_7 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; │ │ │ │ │ -98 │ │ │ │ │ -_9_9 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_0_0 typedef typename GV::Communication _C_o_m_m_u_n_i_c_a_t_i_o_n; │ │ │ │ │ -101 │ │ │ │ │ -_1_0_2 explicit _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(const GV& gv_) │ │ │ │ │ -103 : gv(gv_) │ │ │ │ │ -104 { } │ │ │ │ │ -105 │ │ │ │ │ -_1_0_6 _C_e_l_l_I_t_e_r_a_t_o_r _b_e_g_i_n_C_e_l_l_s() const { │ │ │ │ │ -107 return gv.template begin<0, InteriorBorder_Partition>(); │ │ │ │ │ -108 } │ │ │ │ │ -_1_0_9 _C_e_l_l_I_t_e_r_a_t_o_r _e_n_d_C_e_l_l_s() const { │ │ │ │ │ -110 return gv.template end<0, InteriorBorder_Partition>(); │ │ │ │ │ -111 } │ │ │ │ │ -112 │ │ │ │ │ -_1_1_3 _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 { │ │ │ │ │ -114 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()); │ │ │ │ │ -115 } │ │ │ │ │ -_1_1_6 _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 { │ │ │ │ │ -117 return _C_o_r_n_e_r_I_t_e_r_a_t_o_r(_e_n_d_C_e_l_l_s()); │ │ │ │ │ -118 } │ │ │ │ │ -119 │ │ │ │ │ -_1_2_0 _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_2_1 _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(); } │ │ │ │ │ -122 │ │ │ │ │ -_1_2_3 _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 { │ │ │ │ │ -124 return _C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r(); │ │ │ │ │ -125 } │ │ │ │ │ -_1_2_6 const _C_o_m_m_u_n_i_c_a_t_i_o_n& _c_o_m_m() const { │ │ │ │ │ -127 return gv.comm(); │ │ │ │ │ -128 } │ │ │ │ │ -129 }; │ │ │ │ │ -130 │ │ │ │ │ -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 │ │ │ │ │ -_p_o_i_n_t_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_i_t_e_r_a_t_o_r_._h_h │ │ │ │ │ +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_:_:_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_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_:_:_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_:_:_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_:_:_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_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 volumeiterators.hh:63 │ │ │ │ │ -_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_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r │ │ │ │ │ -VTK::CornerIterator< CellIterator > CornerIterator │ │ │ │ │ -DDeeffiinniittiioonn volumeiterators.hh:39 │ │ │ │ │ -_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_:_:_C_o_r_n_e_r │ │ │ │ │ -VTK::Corner< Cell > Corner │ │ │ │ │ -DDeeffiinniittiioonn volumeiterators.hh:38 │ │ │ │ │ -_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_:_:_e_n_d_C_e_l_l_s │ │ │ │ │ -CellIterator endCells() const │ │ │ │ │ -DDeeffiinniittiioonn volumeiterators.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_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 volumeiterators.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_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 │ │ │ │ │ -VTK::PointIterator< CellIterator, typename GV::IndexSet > PointIterator │ │ │ │ │ -DDeeffiinniittiioonn volumeiterators.hh:43 │ │ │ │ │ -_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_:_:_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r │ │ │ │ │ -ConformingConnectivityWriter< ConformingVolumeIteratorFactory< GV > > │ │ │ │ │ -ConnectivityWriter │ │ │ │ │ -DDeeffiinniittiioonn volumeiterators.hh:46 │ │ │ │ │ -_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_:_:_b_e_g_i_n_C_o_r_n_e_r_s │ │ │ │ │ -CornerIterator beginCorners() const │ │ │ │ │ -DDeeffiinniittiioonn volumeiterators.hh:60 │ │ │ │ │ -_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_:_:_d_i_m_C_e_l_l │ │ │ │ │ -static const unsigned dimCell │ │ │ │ │ -DDeeffiinniittiioonn volumeiterators.hh:32 │ │ │ │ │ -_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_:_:_e_n_d_P_o_i_n_t_s │ │ │ │ │ -PointIterator endPoints() const │ │ │ │ │ -DDeeffiinniittiioonn volumeiterators.hh:70 │ │ │ │ │ -_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_:_:_c_o_m_m │ │ │ │ │ -const Communication & comm() const │ │ │ │ │ -DDeeffiinniittiioonn volumeiterators.hh:77 │ │ │ │ │ -_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_:_:_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 │ │ │ │ │ -ConformingVolumeIteratorFactory(const GV &gv_) │ │ │ │ │ -DDeeffiinniittiioonn volumeiterators.hh:49 │ │ │ │ │ -_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_:_:_P_o_i_n_t │ │ │ │ │ -VTK::Corner< Cell > Point │ │ │ │ │ -DDeeffiinniittiioonn volumeiterators.hh:41 │ │ │ │ │ -_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_:_:_m_a_k_e_C_o_n_n_e_c_t_i_v_i_t_y │ │ │ │ │ -ConnectivityWriter makeConnectivity() const │ │ │ │ │ -DDeeffiinniittiioonn volumeiterators.hh:74 │ │ │ │ │ -_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_:_:_b_e_g_i_n_C_e_l_l_s │ │ │ │ │ -CellIterator beginCells() const │ │ │ │ │ -DDeeffiinniittiioonn volumeiterators.hh:53 │ │ │ │ │ -_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_:_:_C_e_l_l │ │ │ │ │ -GV::template Codim< 0 >::Entity Cell │ │ │ │ │ -DDeeffiinniittiioonn volumeiterators.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_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 volumeiterators.hh:67 │ │ │ │ │ -_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_:_:_C_e_l_l_I_t_e_r_a_t_o_r │ │ │ │ │ -GV::template Codim< 0 >::template Partition< InteriorBorder_Partition >:: │ │ │ │ │ -Iterator CellIterator │ │ │ │ │ -DDeeffiinniittiioonn volumeiterators.hh:36 │ │ │ │ │ -_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 │ │ │ │ │ -DDeeffiinniittiioonn volumeiterators.hh:83 │ │ │ │ │ -_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_:_:_c_o_m_m │ │ │ │ │ -const Communication & comm() const │ │ │ │ │ -DDeeffiinniittiioonn volumeiterators.hh:126 │ │ │ │ │ -_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_:_:_b_e_g_i_n_P_o_i_n_t_s │ │ │ │ │ -PointIterator beginPoints() const │ │ │ │ │ -DDeeffiinniittiioonn volumeiterators.hh:120 │ │ │ │ │ -_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_:_:_C_o_m_m_u_n_i_c_a_t_i_o_n │ │ │ │ │ -GV::Communication Communication │ │ │ │ │ -DDeeffiinniittiioonn volumeiterators.hh:100 │ │ │ │ │ -_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_:_:_b_e_g_i_n_C_e_l_l_s │ │ │ │ │ -CellIterator beginCells() const │ │ │ │ │ -DDeeffiinniittiioonn volumeiterators.hh:106 │ │ │ │ │ -_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_:_:_C_e_l_l │ │ │ │ │ -GV::template Codim< 0 >::Entity Cell │ │ │ │ │ -DDeeffiinniittiioonn volumeiterators.hh:89 │ │ │ │ │ -_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_:_: │ │ │ │ │ -_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 │ │ │ │ │ -NonConformingVolumeIteratorFactory(const GV &gv_) │ │ │ │ │ -DDeeffiinniittiioonn volumeiterators.hh:102 │ │ │ │ │ -_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_:_:_m_a_k_e_C_o_n_n_e_c_t_i_v_i_t_y │ │ │ │ │ -ConnectivityWriter makeConnectivity() const │ │ │ │ │ -DDeeffiinniittiioonn volumeiterators.hh:123 │ │ │ │ │ -_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_:_:_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r │ │ │ │ │ -NonConformingConnectivityWriter< Cell > ConnectivityWriter │ │ │ │ │ -DDeeffiinniittiioonn volumeiterators.hh:99 │ │ │ │ │ -_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_:_:_d_i_m_C_e_l_l │ │ │ │ │ -static const unsigned dimCell │ │ │ │ │ -DDeeffiinniittiioonn volumeiterators.hh:87 │ │ │ │ │ -_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_:_:_e_n_d_C_e_l_l_s │ │ │ │ │ -CellIterator endCells() const │ │ │ │ │ -DDeeffiinniittiioonn volumeiterators.hh:109 │ │ │ │ │ -_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_:_:_e_n_d_C_o_r_n_e_r_s │ │ │ │ │ -CornerIterator endCorners() const │ │ │ │ │ -DDeeffiinniittiioonn volumeiterators.hh:116 │ │ │ │ │ -_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_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r │ │ │ │ │ -VTK::CornerIterator< CellIterator > CornerIterator │ │ │ │ │ -DDeeffiinniittiioonn volumeiterators.hh:94 │ │ │ │ │ -_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_:_:_C_o_r_n_e_r │ │ │ │ │ -VTK::Corner< Cell > Corner │ │ │ │ │ -DDeeffiinniittiioonn volumeiterators.hh:93 │ │ │ │ │ -_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_:_:_P_o_i_n_t_I_t_e_r_a_t_o_r │ │ │ │ │ -CornerIterator PointIterator │ │ │ │ │ -DDeeffiinniittiioonn volumeiterators.hh:97 │ │ │ │ │ -_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_:_:_C_e_l_l_I_t_e_r_a_t_o_r │ │ │ │ │ -GV::template Codim< 0 >::template Partition< InteriorBorder_Partition >:: │ │ │ │ │ -Iterator CellIterator │ │ │ │ │ -DDeeffiinniittiioonn volumeiterators.hh:91 │ │ │ │ │ -_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_:_:_e_n_d_P_o_i_n_t_s │ │ │ │ │ -PointIterator endPoints() const │ │ │ │ │ -DDeeffiinniittiioonn volumeiterators.hh:121 │ │ │ │ │ -_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_:_:_P_o_i_n_t │ │ │ │ │ -Corner Point │ │ │ │ │ -DDeeffiinniittiioonn volumeiterators.hh:96 │ │ │ │ │ -_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_:_:_b_e_g_i_n_C_o_r_n_e_r_s │ │ │ │ │ -CornerIterator beginCorners() const │ │ │ │ │ -DDeeffiinniittiioonn volumeiterators.hh:113 │ │ │ │ │ +_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/a00917.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: vtuwriter.hh File Reference │ │ │ │ +dune-grid: boundarydom.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,45 +65,31 @@ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ Namespaces
│ │ │ │ -
vtuwriter.hh File Reference
│ │ │ │ +
boundarydom.cc File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#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::VTK::VTUWriter
 Dump a .vtu/.vtp files contents to a stream. More...
 
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::VTK
namespace  Dune::dgf
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,29 +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 │ │ │ │ │ -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_:_:_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_._._. │ │ │ │ │ -  │ │ │ │ │ + * _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 <_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. │ │ │ │ │   │ │ │ │ │ -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/a00920.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: vtkwriter.hh File Reference │ │ │ │ +dune-grid: boundarydom.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,95 +65,49 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
vtkwriter.hh File Reference
│ │ │ │ +
boundarydom.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ -

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

│ │ │ │ -
#include <cstring>
│ │ │ │ -#include <iostream>
│ │ │ │ +
#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>
│ │ │ │ +#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

class  Dune::VTKWriter< GridView >
 Writer for the output 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::dgf::DomainData
 
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::Domain
 
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...
class  Dune::dgf::BoundaryDomBlock
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ Namespaces

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

Detailed Description

│ │ │ │ -

Provides file i/o for the visualization toolkit.

│ │ │ │ -
Author
Peter Bastian, Christian Engwer
│ │ │ │ -
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,79 +2,32 @@ │ │ │ │ │ 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 │ │ │ │ │ -vtkwriter.hh File Reference │ │ │ │ │ -Provides file i/o for the visualization toolkit. _M_o_r_e_._._. │ │ │ │ │ -#include │ │ │ │ │ +boundarydom.hh File Reference │ │ │ │ │ #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> │ │ │ │ │ +#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 │ │ │ │ │ - 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 output of grid functions in the vtk format. _M_o_r_e_._._. │ │ │ │ │ +struct   _D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_D_a_t_a │ │ │ │ │   │ │ │ │ │ - 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_:_:_d_g_f_:_:_D_o_m_a_i_n │ │ │ │ │   │ │ │ │ │ -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_._._. │ │ │ │ │ + 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. │ │ │ │ │   │ │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -Provides file i/o for the visualization toolkit. │ │ │ │ │ - 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/a00920_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: vtkwriter.hh Source File │ │ │ │ +dune-grid: boundarydom.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,1661 +70,419 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
vtkwriter.hh
│ │ │ │ +
boundarydom.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_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
│ │ │ │ -
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{
│ │ │ │ +
5#ifndef DUNE_DGF_BOUNDARYDOMBLOCK_HH
│ │ │ │ +
6#define DUNE_DGF_BOUNDARYDOMBLOCK_HH
│ │ │ │ +
7
│ │ │ │ +
8#include <iostream>
│ │ │ │ +
9#include <string>
│ │ │ │ +
10#include <vector>
│ │ │ │ +
11
│ │ │ │ + │ │ │ │ + │ │ │ │ +
14
│ │ │ │ +
15
│ │ │ │ +
16namespace Dune
│ │ │ │ +
17{
│ │ │ │ +
18
│ │ │ │ +
19 namespace dgf
│ │ │ │ +
20 {
│ │ │ │ +
21
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
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 // return id
│ │ │ │ +
│ │ │ │ +
42 int id () const
│ │ │ │ +
43 {
│ │ │ │ +
44 return id_;
│ │ │ │ +
45 }
│ │ │ │ +
│ │ │ │ +
46
│ │ │ │ +
47 // return true, if additional parameters given
│ │ │ │ +
│ │ │ │ +
48 bool hasParameter () const
│ │ │ │ +
49 {
│ │ │ │ +
50 return (!parameter_.empty());
│ │ │ │ +
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 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 {};
│ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │
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 {};
│ │ │ │ +
67 // returns true if data origins from default boundary domain
│ │ │ │ +
│ │ │ │ +
68 bool isDefault () const
│ │ │ │ +
69 {
│ │ │ │ +
70 return defaultData_;
│ │ │ │ +
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 } // namespace Impl
│ │ │ │ -
79
│ │ │ │ -
80 // Forward-declaration here, so the class can be friend of VTKWriter
│ │ │ │ -
81 template <class GridView>
│ │ │ │ - │ │ │ │ -
83 template <class GridView>
│ │ │ │ - │ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
94 template< class GridView >
│ │ │ │ -
│ │ │ │ -
95 class VTKWriter {
│ │ │ │ -
96
│ │ │ │ -
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 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:
│ │ │ │ +
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
│ │ │ │ - │ │ │ │ -
148
│ │ │ │ -
149 protected:
│ │ │ │ -
150
│ │ │ │ +
147 left_ = other.left_;
│ │ │ │ +
148 right_= other.right_;
│ │ │ │ +
149 data_= other.data_;
│ │ │ │ +
150 return *this;
│ │ │ │ +
151 }
│ │ │ │ +
│ │ │ │
152
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
156 {
│ │ │ │ -
157
│ │ │ │ -
158 public:
│ │ │ │ -
159
│ │ │ │ - │ │ │ │ -
161
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
164 {
│ │ │ │ +
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
│ │ │ │ -
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;
│ │ │ │ +
│ │ │ │ +
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 template<typename F_>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
193 : _f(std::forward<F_>(f))
│ │ │ │ -
194 {}
│ │ │ │ -
│ │ │ │ -
195
│ │ │ │ -
│ │ │ │ -
196 virtual void bind(const Entity& e)
│ │ │ │ -
197 {
│ │ │ │ -
198 _f.bind(e);
│ │ │ │ -
199 }
│ │ │ │ +
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 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:
│ │ │ │ +
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 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 };
│ │ │ │ +
215 // destructor
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
217 {
│ │ │ │ +
218 if( default_ )
│ │ │ │ +
219 delete default_;
│ │ │ │ +
220 }
│ │ │ │
│ │ │ │ -
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 }
│ │ │ │ +
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 whether no boundary domain found
│ │ │ │ +
289 if( index.empty() )
│ │ │ │ +
290 return default_;
│ │ │ │
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 };
│ │ │ │ +
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
│ │ │ │ -
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 // for 2d vector fields should be written as 3d vector fields
│ │ │ │ -
1131 if(it->fieldInfo().type() == VTK::FieldInfo::Type::vector && writecomps == 2)
│ │ │ │ -
1132 writecomps = 3;
│ │ │ │ -
1133 writer.addArray(it->name(), writecomps, it->fieldInfo().precision());
│ │ │ │ -
1134 }
│ │ │ │ -
1135 writer.endPointData();
│ │ │ │ -
1136
│ │ │ │ -
1137 // PCellData
│ │ │ │ -
1138 {
│ │ │ │ -
1139 std::string scalars, vectors;
│ │ │ │ -
1140 std::tie(scalars,vectors) = getDataNames(celldata);
│ │ │ │ -
1141 writer.beginCellData(scalars, vectors);
│ │ │ │ -
1142 }
│ │ │ │ -
1143 for (auto it = celldata.begin(),
│ │ │ │ -
1144 end = celldata.end();
│ │ │ │ -
1145 it != end;
│ │ │ │ -
1146 ++it)
│ │ │ │ -
1147 {
│ │ │ │ -
1148 unsigned writecomps = it->fieldInfo().size();
│ │ │ │ -
1149 // for 2d vector fields should be written as 3d vector fields
│ │ │ │ -
1150 if(it->fieldInfo().type() == VTK::FieldInfo::Type::vector && writecomps == 2)
│ │ │ │ -
1151 writecomps = 3;
│ │ │ │ -
1152 writer.addArray(it->name(), writecomps, it->fieldInfo().precision());
│ │ │ │ -
1153 }
│ │ │ │ -
1154 writer.endCellData();
│ │ │ │ -
1155
│ │ │ │ -
1156 // PPoints
│ │ │ │ -
1157 writer.beginPoints();
│ │ │ │ -
1158 writer.addArray("Coordinates", 3, coordPrec);
│ │ │ │ -
1159 writer.endPoints();
│ │ │ │ -
1160
│ │ │ │ -
1161 // Pieces
│ │ │ │ -
1162 for( int i = 0; i < commSize; ++i )
│ │ │ │ -
1163 {
│ │ │ │ -
1164 const std::string& fullname = getParallelPieceName(piecename,
│ │ │ │ -
1165 piecepath, i,
│ │ │ │ -
1166 commSize);
│ │ │ │ -
1167 writer.addPiece(fullname);
│ │ │ │ -
1168 }
│ │ │ │ -
1169
│ │ │ │ -
1170 writer.endMain();
│ │ │ │ -
1171 }
│ │ │ │ -
1172
│ │ │ │ -
1174 void writeDataFile (std::ostream& s)
│ │ │ │ -
1175 {
│ │ │ │ -
1176 VTK::FileType fileType =
│ │ │ │ -
1177 (n == 1) ? VTK::polyData : VTK::unstructuredGrid;
│ │ │ │ -
1178
│ │ │ │ -
1179 VTK::VTUWriter writer(s, outputtype, fileType);
│ │ │ │ -
1180
│ │ │ │ -
1181 // Grid characteristics
│ │ │ │ -
1182 vertexmapper = new VertexMapper( gridView_, mcmgVertexLayout() );
│ │ │ │ -
1183 if (datamode == VTK::conforming)
│ │ │ │ -
1184 {
│ │ │ │ -
1185 number.resize(vertexmapper->size());
│ │ │ │ -
1186 for (std::vector<int>::size_type i=0; i<number.size(); i++) number[i] = -1;
│ │ │ │ -
1187 }
│ │ │ │ - │ │ │ │ -
1189
│ │ │ │ -
1190 writer.beginMain(ncells, nvertices);
│ │ │ │ -
1191 writeAllData(writer);
│ │ │ │ -
1192 writer.endMain();
│ │ │ │ -
1193
│ │ │ │ -
1194 // write appended binary data section
│ │ │ │ -
1195 if(writer.beginAppended())
│ │ │ │ -
1196 writeAllData(writer);
│ │ │ │ -
1197 writer.endAppended();
│ │ │ │ -
1198
│ │ │ │ -
1199 delete vertexmapper; number.clear();
│ │ │ │ -
1200 }
│ │ │ │ -
1201
│ │ │ │ -
1202 void writeAllData(VTK::VTUWriter& writer) {
│ │ │ │ -
1203 // PointData
│ │ │ │ -
1204 writeVertexData(writer);
│ │ │ │ -
1205
│ │ │ │ -
1206 // CellData
│ │ │ │ -
1207 writeCellData(writer);
│ │ │ │ -
1208
│ │ │ │ -
1209 // Points
│ │ │ │ -
1210 writeGridPoints(writer);
│ │ │ │ -
1211
│ │ │ │ -
1212 // Cells
│ │ │ │ -
1213 writeGridCells(writer);
│ │ │ │ -
1214 }
│ │ │ │ -
1215
│ │ │ │ -
1216 protected:
│ │ │ │ -
│ │ │ │ -
1217 std::string getFormatString() const
│ │ │ │ -
1218 {
│ │ │ │ - │ │ │ │ -
1220 return "ascii";
│ │ │ │ - │ │ │ │ -
1222 return "binary";
│ │ │ │ - │ │ │ │ -
1224 return "appended";
│ │ │ │ - │ │ │ │ -
1226 return "appended";
│ │ │ │ -
1227 DUNE_THROW(IOError, "VTKWriter: unsupported OutputType" << outputtype);
│ │ │ │ -
1228 }
│ │ │ │ -
│ │ │ │ -
1229
│ │ │ │ -
│ │ │ │ -
1230 std::string getTypeString() const
│ │ │ │ -
1231 {
│ │ │ │ -
1232 if (n==1)
│ │ │ │ -
1233 return "PolyData";
│ │ │ │ -
1234 else
│ │ │ │ -
1235 return "UnstructuredGrid";
│ │ │ │ -
1236 }
│ │ │ │ -
│ │ │ │ -
1237
│ │ │ │ -
│ │ │ │ -
1239 virtual void countEntities(int &nvertices_, int &ncells_, int &ncorners_)
│ │ │ │ -
1240 {
│ │ │ │ -
1241 nvertices_ = 0;
│ │ │ │ -
1242 ncells_ = 0;
│ │ │ │ -
1243 ncorners_ = 0;
│ │ │ │ -
1244 for (CellIterator it=cellBegin(); it!=cellEnd(); ++it)
│ │ │ │ -
1245 {
│ │ │ │ -
1246 ncells_++;
│ │ │ │ -
1247 // because of the use of vertexmapper->map(), this iteration must be
│ │ │ │ -
1248 // in the order of Dune's numbering.
│ │ │ │ -
1249 const int subEntities = it->subEntities(n);
│ │ │ │ -
1250 for (int i=0; i<subEntities; ++i)
│ │ │ │ -
1251 {
│ │ │ │ -
1252 ncorners_++;
│ │ │ │ -
1253 if (datamode == VTK::conforming)
│ │ │ │ -
1254 {
│ │ │ │ -
1255 int alpha = vertexmapper->subIndex(*it,i,n);
│ │ │ │ -
1256 if (number[alpha]<0)
│ │ │ │ -
1257 number[alpha] = nvertices_++;
│ │ │ │ -
1258 }
│ │ │ │ -
1259 else
│ │ │ │ -
1260 {
│ │ │ │ -
1261 nvertices_++;
│ │ │ │ -
1262 }
│ │ │ │ -
1263 }
│ │ │ │ -
1264 }
│ │ │ │ -
1265 }
│ │ │ │ -
│ │ │ │ -
1266
│ │ │ │ -
1267 template<typename T>
│ │ │ │ -
│ │ │ │ -
1268 std::tuple<std::string,std::string> getDataNames(const T& data) const
│ │ │ │ -
1269 {
│ │ │ │ -
1270 std::string scalars = "";
│ │ │ │ -
1271 for (auto it = data.begin(),
│ │ │ │ -
1272 end = data.end();
│ │ │ │ -
1273 it != end;
│ │ │ │ -
1274 ++it)
│ │ │ │ -
1275 if (it->fieldInfo().type() == VTK::FieldInfo::Type::scalar)
│ │ │ │ -
1276 {
│ │ │ │ -
1277 scalars = it->name();
│ │ │ │ -
1278 break;
│ │ │ │ -
1279 }
│ │ │ │ -
1280
│ │ │ │ -
1281 std::string vectors = "";
│ │ │ │ -
1282 for (auto it = data.begin(),
│ │ │ │ -
1283 end = data.end();
│ │ │ │ -
1284 it != end;
│ │ │ │ -
1285 ++it)
│ │ │ │ -
1286 if (it->fieldInfo().type() == VTK::FieldInfo::Type::vector)
│ │ │ │ -
1287 {
│ │ │ │ -
1288 vectors = it->name();
│ │ │ │ -
1289 break;
│ │ │ │ -
1290 }
│ │ │ │ -
1291 return std::make_tuple(scalars,vectors);
│ │ │ │ -
1292 }
│ │ │ │ -
│ │ │ │ -
1293
│ │ │ │ -
1294 template<typename Data, typename Iterator>
│ │ │ │ -
│ │ │ │ -
1295 void writeData(VTK::VTUWriter& writer, const Data& data, const Iterator begin, const Iterator end, int nentries)
│ │ │ │ -
1296 {
│ │ │ │ -
1297 for (auto it = data.begin(),
│ │ │ │ -
1298 iend = data.end();
│ │ │ │ -
1299 it != iend;
│ │ │ │ -
1300 ++it)
│ │ │ │ -
1301 {
│ │ │ │ -
1302 const auto& f = *it;
│ │ │ │ -
1303 VTK::FieldInfo fieldInfo = f.fieldInfo();
│ │ │ │ -
1304 std::size_t writecomps = fieldInfo.size();
│ │ │ │ -
1305 switch (fieldInfo.type())
│ │ │ │ -
1306 {
│ │ │ │ - │ │ │ │ -
1308 break;
│ │ │ │ - │ │ │ │ -
1310 // vtk file format: a vector data always should have 3 comps (with
│ │ │ │ -
1311 // 3rd comp = 0 in 2D case)
│ │ │ │ -
1312 if (writecomps > 3)
│ │ │ │ -
1313 DUNE_THROW(IOError,"Cannot write VTK vectors with more than 3 components (components was " << writecomps << ")");
│ │ │ │ -
1314 writecomps = 3;
│ │ │ │ -
1315 break;
│ │ │ │ - │ │ │ │ -
1317 DUNE_THROW(NotImplemented,"VTK output for tensors not implemented yet");
│ │ │ │ -
1318 }
│ │ │ │ -
1319 std::shared_ptr<VTK::DataArrayWriter> p
│ │ │ │ -
1320 (writer.makeArrayWriter(f.name(), writecomps, nentries, fieldInfo.precision()));
│ │ │ │ -
1321 if(!p->writeIsNoop())
│ │ │ │ -
1322 for (Iterator eit = begin; eit!=end; ++eit)
│ │ │ │ -
1323 {
│ │ │ │ -
1324 const Entity & e = *eit;
│ │ │ │ -
1325 f.bind(e);
│ │ │ │ -
1326 f.write(eit.position(),*p);
│ │ │ │ -
1327 f.unbind();
│ │ │ │ -
1328 // vtk file format: a vector data always should have 3 comps
│ │ │ │ -
1329 // (with 3rd comp = 0 in 2D case)
│ │ │ │ -
1330 for (std::size_t j=fieldInfo.size(); j < writecomps; ++j)
│ │ │ │ -
1331 p->write(0.0);
│ │ │ │ -
1332 }
│ │ │ │ -
1333 }
│ │ │ │ -
1334 }
│ │ │ │ -
│ │ │ │ -
1335
│ │ │ │ -
│ │ │ │ -
1337 virtual void writeCellData(VTK::VTUWriter& writer)
│ │ │ │ -
1338 {
│ │ │ │ -
1339 if(celldata.size() == 0)
│ │ │ │ -
1340 return;
│ │ │ │ -
1341
│ │ │ │ -
1342 std::string scalars, vectors;
│ │ │ │ -
1343 std::tie(scalars,vectors) = getDataNames(celldata);
│ │ │ │ -
1344
│ │ │ │ -
1345 writer.beginCellData(scalars, vectors);
│ │ │ │ - │ │ │ │ -
1347 writer.endCellData();
│ │ │ │ -
1348 }
│ │ │ │ -
│ │ │ │ -
1349
│ │ │ │ -
│ │ │ │ -
1351 virtual void writeVertexData(VTK::VTUWriter& writer)
│ │ │ │ -
1352 {
│ │ │ │ -
1353 if(vertexdata.size() == 0)
│ │ │ │ -
1354 return;
│ │ │ │ -
1355
│ │ │ │ -
1356 std::string scalars, vectors;
│ │ │ │ -
1357 std::tie(scalars,vectors) = getDataNames(vertexdata);
│ │ │ │ -
1358
│ │ │ │ -
1359 writer.beginPointData(scalars, vectors);
│ │ │ │ - │ │ │ │ -
1361 writer.endPointData();
│ │ │ │ -
1362 }
│ │ │ │ -
│ │ │ │ -
1363
│ │ │ │ -
│ │ │ │ -
1365 virtual void writeGridPoints(VTK::VTUWriter& writer)
│ │ │ │ -
1366 {
│ │ │ │ -
1367 writer.beginPoints();
│ │ │ │ -
1368
│ │ │ │ -
1369 std::shared_ptr<VTK::DataArrayWriter> p
│ │ │ │ -
1370 (writer.makeArrayWriter("Coordinates", 3, nvertices, coordPrec));
│ │ │ │ -
1371 if(!p->writeIsNoop()) {
│ │ │ │ -
1372 VertexIterator vEnd = vertexEnd();
│ │ │ │ -
1373 for (VertexIterator vit=vertexBegin(); vit!=vEnd; ++vit)
│ │ │ │ -
1374 {
│ │ │ │ -
1375 int dimw=w;
│ │ │ │ -
1376 for (int j=0; j<std::min(dimw,3); j++)
│ │ │ │ -
1377 p->write((*vit).geometry().corner(vit.localindex())[j]);
│ │ │ │ -
1378 for (int j=std::min(dimw,3); j<3; j++)
│ │ │ │ -
1379 p->write(0.0);
│ │ │ │ -
1380 }
│ │ │ │ -
1381 }
│ │ │ │ -
1382 // free the VTK::DataArrayWriter before touching the stream
│ │ │ │ -
1383 p.reset();
│ │ │ │ -
1384
│ │ │ │ -
1385 writer.endPoints();
│ │ │ │ -
1386 }
│ │ │ │ -
│ │ │ │ -
1387
│ │ │ │ -
│ │ │ │ -
1389 virtual void writeGridCells(VTK::VTUWriter& writer)
│ │ │ │ -
1390 {
│ │ │ │ -
1391 writer.beginCells();
│ │ │ │ -
1392
│ │ │ │ -
1393 // connectivity
│ │ │ │ -
1394 {
│ │ │ │ -
1395 std::shared_ptr<VTK::DataArrayWriter> p1
│ │ │ │ -
1396 (writer.makeArrayWriter("connectivity", 1, ncorners, VTK::Precision::int32));
│ │ │ │ -
1397 if(!p1->writeIsNoop())
│ │ │ │ -
1398 for (CornerIterator it=cornerBegin(); it!=cornerEnd(); ++it)
│ │ │ │ -
1399 p1->write(it.id());
│ │ │ │ -
1400 }
│ │ │ │ -
1401
│ │ │ │ -
1402 // offsets
│ │ │ │ -
1403 {
│ │ │ │ -
1404 std::shared_ptr<VTK::DataArrayWriter> p2
│ │ │ │ -
1405 (writer.makeArrayWriter("offsets", 1, ncells, VTK::Precision::int32));
│ │ │ │ -
1406 if(!p2->writeIsNoop()) {
│ │ │ │ -
1407 int offset = 0;
│ │ │ │ -
1408 for (CellIterator it=cellBegin(); it!=cellEnd(); ++it)
│ │ │ │ -
1409 {
│ │ │ │ -
1410 offset += it->subEntities(n);
│ │ │ │ -
1411 p2->write(offset);
│ │ │ │ -
1412 }
│ │ │ │ -
1413 }
│ │ │ │ -
1414 }
│ │ │ │ -
1415
│ │ │ │ -
1416 // types
│ │ │ │ -
1417 if (n>1)
│ │ │ │ -
1418 {
│ │ │ │ -
1419 {
│ │ │ │ -
1420 std::shared_ptr<VTK::DataArrayWriter> p3
│ │ │ │ -
1421 (writer.makeArrayWriter("types", 1, ncells, VTK::Precision::uint8));
│ │ │ │ -
1422
│ │ │ │ -
1423 if(!p3->writeIsNoop())
│ │ │ │ -
1424 {
│ │ │ │ -
1425 for (CellIterator it=cellBegin(); it!=cellEnd(); ++it)
│ │ │ │ -
1426 {
│ │ │ │ -
1427 int vtktype = VTK::geometryType(it->type());
│ │ │ │ -
1428 p3->write(vtktype);
│ │ │ │ -
1429 }
│ │ │ │ -
1430 }
│ │ │ │ -
1431 }
│ │ │ │ -
1432
│ │ │ │ -
1433
│ │ │ │ -
1434 // if polyhedron cells found also cell faces need to be written
│ │ │ │ -
1435 if( polyhedralCellsPresent_ )
│ │ │ │ -
1436 {
│ │ │ │ -
1437 writeCellFaces( writer );
│ │ │ │ -
1438 }
│ │ │ │ -
1439 }
│ │ │ │ -
1440
│ │ │ │ -
1441 writer.endCells();
│ │ │ │ -
1442 }
│ │ │ │ -
│ │ │ │ -
1443
│ │ │ │ -
1444 protected:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
1446 {
│ │ │ │ -
1447 // check if polyhedron cells are present
│ │ │ │ -
1448 for( const auto& geomType : gridView_.indexSet().types( 0 ) )
│ │ │ │ -
1449 {
│ │ │ │ -
1450 if( VTK::geometryType( geomType ) == VTK::polyhedron )
│ │ │ │ -
1451 {
│ │ │ │ -
1452 return true;
│ │ │ │ -
1453 }
│ │ │ │ -
1454 }
│ │ │ │ -
1455 return false;
│ │ │ │ -
1456 }
│ │ │ │ -
│ │ │ │ -
1457
│ │ │ │ -
│ │ │ │ -
1459 virtual void writeCellFaces(VTK::VTUWriter& writer)
│ │ │ │ -
1460 {
│ │ │ │ -
1461 if( ! faceVertices_ )
│ │ │ │ -
1462 {
│ │ │ │ -
1463 faceVertices_.reset( new std::pair< std::vector<int>, std::vector<int> > () );
│ │ │ │ -
1464 // fill face vertex structure
│ │ │ │ - │ │ │ │ -
1466 faceVertices_->first, faceVertices_->second );
│ │ │ │ -
1467 }
│ │ │ │ -
1468
│ │ │ │ -
1469 std::vector< int >& faces = faceVertices_->first;
│ │ │ │ -
1470 std::vector< int >& faceOffsets = faceVertices_->second;
│ │ │ │ -
1471 assert( int(faceOffsets.size()) == ncells );
│ │ │ │ -
1472
│ │ │ │ -
1473 {
│ │ │ │ -
1474 std::shared_ptr<VTK::DataArrayWriter> p4
│ │ │ │ -
1475 (writer.makeArrayWriter("faces", 1, faces.size(), VTK::Precision::int32));
│ │ │ │ -
1476 if(!p4->writeIsNoop())
│ │ │ │ -
1477 {
│ │ │ │ -
1478 for( const auto& face : faces )
│ │ │ │ -
1479 p4->write( face );
│ │ │ │ -
1480 }
│ │ │ │ -
1481 }
│ │ │ │ -
1482
│ │ │ │ -
1483 {
│ │ │ │ -
1484 std::shared_ptr<VTK::DataArrayWriter> p5
│ │ │ │ -
1485 (writer.makeArrayWriter("faceoffsets", 1, ncells, VTK::Precision::int32));
│ │ │ │ -
1486 if(!p5->writeIsNoop())
│ │ │ │ -
1487 {
│ │ │ │ -
1488 for( const auto& offset : faceOffsets )
│ │ │ │ -
1489 p5->write( offset );
│ │ │ │ -
1490
│ │ │ │ -
1491 // clear face vertex structure
│ │ │ │ -
1492 faceVertices_.reset();
│ │ │ │ -
1493 }
│ │ │ │ -
1494 }
│ │ │ │ -
1495 }
│ │ │ │ -
│ │ │ │ -
1496
│ │ │ │ -
1497 template <class CornerIterator, class IndexSet, class T>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
1499 const CornerIterator end,
│ │ │ │ -
1500 const IndexSet& indexSet,
│ │ │ │ -
1501 std::vector<T>& faces,
│ │ │ │ -
1502 std::vector<T>& faceOffsets )
│ │ │ │ -
1503 {
│ │ │ │ -
1504 if( n == 3 && it != end )
│ │ │ │ -
1505 {
│ │ │ │ -
1506 // clear output arrays
│ │ │ │ -
1507 faces.clear();
│ │ │ │ -
1508 faces.reserve( 15 * ncells );
│ │ │ │ -
1509 faceOffsets.clear();
│ │ │ │ -
1510 faceOffsets.reserve( ncells );
│ │ │ │ -
1511
│ │ │ │ -
1512 int offset = 0;
│ │ │ │ -
1513
│ │ │ │ -
1514 Cell element = *it;
│ │ │ │ -
1515 int elIndex = indexSet.index( element );
│ │ │ │ -
1516 std::vector< T > vertices;
│ │ │ │ -
1517 vertices.reserve( 30 );
│ │ │ │ -
1518 for( ; it != end; ++it )
│ │ │ │ -
1519 {
│ │ │ │ -
1520 const Cell& cell = *it ;
│ │ │ │ -
1521 const int cellIndex = indexSet.index( cell ) ;
│ │ │ │ -
1522 if( elIndex != cellIndex )
│ │ │ │ -
1523 {
│ │ │ │ -
1524 fillFacesForElement( element, indexSet, vertices, offset, faces, faceOffsets );
│ │ │ │ -
1525
│ │ │ │ -
1526 vertices.clear();
│ │ │ │ -
1527 element = cell ;
│ │ │ │ -
1528 elIndex = cellIndex ;
│ │ │ │ -
1529 }
│ │ │ │ -
1530 vertices.push_back( it.id() );
│ │ │ │ -
1531 }
│ │ │ │ -
1532
│ │ │ │ -
1533 // fill faces for last element
│ │ │ │ -
1534 fillFacesForElement( element, indexSet, vertices, offset, faces, faceOffsets );
│ │ │ │ -
1535 }
│ │ │ │ -
1536 }
│ │ │ │ -
│ │ │ │ -
1537
│ │ │ │ -
1538 template <class Entity, class IndexSet, class T>
│ │ │ │ -
│ │ │ │ -
1539 static void fillFacesForElement( const Entity& element,
│ │ │ │ -
1540 const IndexSet& indexSet,
│ │ │ │ -
1541 const std::vector<T>& vertices,
│ │ │ │ -
1542 T& offset,
│ │ │ │ -
1543 std::vector<T>& faces,
│ │ │ │ -
1544 std::vector<T>& faceOffsets )
│ │ │ │ -
1545 {
│ │ │ │ -
1546 const int dim = n;
│ │ │ │ -
1547
│ │ │ │ -
1548 std::map< T, T > vxMap;
│ │ │ │ -
1549
│ │ │ │ -
1550 // get number of local faces
│ │ │ │ -
1551 const int nVertices = element.subEntities( dim );
│ │ │ │ -
1552 for( int vx = 0; vx < nVertices; ++ vx )
│ │ │ │ -
1553 {
│ │ │ │ -
1554 const int vxIdx = indexSet.subIndex( element, vx, dim );
│ │ │ │ -
1555 vxMap[ vxIdx ] = vertices[ vx ];
│ │ │ │ -
1556 }
│ │ │ │ -
1557
│ │ │ │ -
1558 // get number of local faces
│ │ │ │ -
1559 const int nFaces = element.subEntities( 1 );
│ │ │ │ -
1560 // store number of faces for current element
│ │ │ │ -
1561 faces.push_back( nFaces );
│ │ │ │ -
1562 ++offset;
│ │ │ │ -
1563 // extract each face as a set of vertex indices
│ │ │ │ -
1564 for( int fce = 0; fce < nFaces; ++ fce )
│ │ │ │ -
1565 {
│ │ │ │ -
1566 // obtain face
│ │ │ │ -
1567 const auto face = element.template subEntity< 1 > ( fce );
│ │ │ │ -
1568
│ │ │ │ -
1569 // get all vertex indices from current face
│ │ │ │ -
1570 const int nVxFace = face.subEntities( dim );
│ │ │ │ -
1571 faces.push_back( nVxFace );
│ │ │ │ -
1572 ++offset ;
│ │ │ │ -
1573 for( int i=0; i<nVxFace; ++i )
│ │ │ │ -
1574 {
│ │ │ │ -
1575 const T vxIndex = indexSet.subIndex( face, i, dim );
│ │ │ │ -
1576 assert( vxMap.find( vxIndex ) != vxMap.end() );
│ │ │ │ -
1577 faces.push_back( vxMap[ vxIndex ] );
│ │ │ │ -
1578 ++offset ;
│ │ │ │ -
1579 }
│ │ │ │ -
1580 }
│ │ │ │ -
1581
│ │ │ │ -
1582 // store face offset for each element
│ │ │ │ -
1583 faceOffsets.push_back( offset );
│ │ │ │ -
1584 }
│ │ │ │ -
│ │ │ │ -
1585
│ │ │ │ -
1586 protected:
│ │ │ │ -
1587 // the list of registered functions
│ │ │ │ -
1588 std::list<VTKLocalFunction> celldata;
│ │ │ │ -
1589 std::list<VTKLocalFunction> vertexdata;
│ │ │ │ -
1590
│ │ │ │ -
1591 // the grid
│ │ │ │ - │ │ │ │ -
1593
│ │ │ │ -
1594 // temporary grid information
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
1598 private:
│ │ │ │ -
1599 VertexMapper* vertexmapper;
│ │ │ │ -
1600 // in conforming mode, for each vertex id (as obtained by vertexmapper)
│ │ │ │ -
1601 // hold its number in the iteration order (VertexIterator)
│ │ │ │ -
1602 std::vector<int> number;
│ │ │ │ -
1603 VTK::DataMode datamode;
│ │ │ │ -
1604 VTK::Precision coordPrec;
│ │ │ │ -
1605
│ │ │ │ -
1606 // true if polyhedral cells are present in the grid
│ │ │ │ -
1607 const bool polyhedralCellsPresent_;
│ │ │ │ -
1608
│ │ │ │ -
1609 // pointer holding face vertex connectivity if needed
│ │ │ │ -
1610 std::shared_ptr< std::pair< std::vector<int>, std::vector<int> > > faceVertices_;
│ │ │ │ -
1611
│ │ │ │ -
1612 protected:
│ │ │ │ - │ │ │ │ -
1614 };
│ │ │ │ -
│ │ │ │ -
1615
│ │ │ │ -
1616}
│ │ │ │ -
1617
│ │ │ │ -
1618#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:177
│ │ │ │ -
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:273
│ │ │ │ -
static constexpr int dimension
The dimension of the grid.
Definition common/gridview.hh:134
│ │ │ │ -
Grid::ctype ctype
type used for coordinates in grid
Definition common/gridview.hh:131
│ │ │ │ -
static constexpr int dimensionworld
The dimension of the world the grid lives in.
Definition common/gridview.hh:137
│ │ │ │ -
MCMGLayout mcmgVertexLayout()
layout for vertices (dim-0 entities)
Definition mcmgmapper.hh:107
│ │ │ │ -
STL namespace.
│ │ │ │ +
305} // end namespace Dune
│ │ │ │ +
306
│ │ │ │ +
307#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
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
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:104
│ │ │ │ -
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 output 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 output 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:1230
│ │ │ │ -
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:1589
│ │ │ │ -
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:1217
│ │ │ │ -
bool checkForPolyhedralCells() const
Definition vtkwriter.hh:1445
│ │ │ │ -
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:1337
│ │ │ │ -
virtual void countEntities(int &nvertices_, int &ncells_, int &ncorners_)
count the vertices, cells and corners
Definition vtkwriter.hh:1239
│ │ │ │ -
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:1613
│ │ │ │ -
virtual void writeGridCells(VTK::VTUWriter &writer)
write the connectivity array
Definition vtkwriter.hh:1389
│ │ │ │ -
GridView gridView_
Definition vtkwriter.hh:1592
│ │ │ │ -
virtual void writeCellFaces(VTK::VTUWriter &writer)
write the connectivity array
Definition vtkwriter.hh:1459
│ │ │ │ -
void fillFaceVertices(CornerIterator it, const CornerIterator end, const IndexSet &indexSet, std::vector< T > &faces, std::vector< T > &faceOffsets)
Definition vtkwriter.hh:1498
│ │ │ │ -
std::list< VTKLocalFunction > celldata
Definition vtkwriter.hh:1588
│ │ │ │ -
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:1268
│ │ │ │ -
virtual void writeGridPoints(VTK::VTUWriter &writer)
write the positions of vertices
Definition vtkwriter.hh:1365
│ │ │ │ -
virtual void writeVertexData(VTK::VTUWriter &writer)
write vertex data
Definition vtkwriter.hh:1351
│ │ │ │ -
int nvertices
Definition vtkwriter.hh:1596
│ │ │ │ -
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:1539
│ │ │ │ -
void writeData(VTK::VTUWriter &writer, const Data &data, const Iterator begin, const Iterator end, int nentries)
Definition vtkwriter.hh:1295
│ │ │ │ -
int ncells
Definition vtkwriter.hh:1595
│ │ │ │ -
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:1597
│ │ │ │ -
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
│ │ │ │ +
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:137
│ │ │ │ +
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 {} │ │ │ │ │ @@ -2,1980 +2,437 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ -vtkwriter.hh │ │ │ │ │ + * _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 © DUNE Project contributors, see file │ │ │ │ │ +1// SPDX-FileCopyrightText: Copyright © 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_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 │ │ │ │ │ -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{ │ │ │ │ │ +5#ifndef DUNE_DGF_BOUNDARYDOMBLOCK_HH │ │ │ │ │ +6#define DUNE_DGF_BOUNDARYDOMBLOCK_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 │ │ │ │ │ +15 │ │ │ │ │ +16namespace _D_u_n_e │ │ │ │ │ +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 { } │ │ │ │ │ +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 │ │ │ │ │ +43 { │ │ │ │ │ +44 return id_; │ │ │ │ │ +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 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 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 {}; │ │ │ │ │ +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 // 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 {}; │ │ │ │ │ +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 │ │ │ │ │ -73 template< class F > │ │ │ │ │ -74 struct HasLocalFunction< F, _s_t_d::void_t< decltype( localFunction( std:: │ │ │ │ │ -declval< F& >() ) ) > > │ │ │ │ │ -75 : std::true_type │ │ │ │ │ -76 {}; │ │ │ │ │ -77 │ │ │ │ │ -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; │ │ │ │ │ +_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 │ │ │ │ │ -94 template< class GridView > │ │ │ │ │ -_9_5 class _V_T_K_W_r_i_t_e_r { │ │ │ │ │ -96 │ │ │ │ │ -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 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: │ │ │ │ │ +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 │ │ │ │ │ -_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 │ │ │ │ │ +147 left_ = other.left_; │ │ │ │ │ +148 right_= other.right_; │ │ │ │ │ +149 data_= other.data_; │ │ │ │ │ +150 return *this; │ │ │ │ │ +151 } │ │ │ │ │ 152 │ │ │ │ │ -_1_5_5 class _V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n │ │ │ │ │ +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 │ │ │ │ │ -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 { │ │ │ │ │ +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_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; │ │ │ │ │ +_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 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 } │ │ │ │ │ +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 │ │ │ │ │ -_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: │ │ │ │ │ +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 template │ │ │ │ │ -216 void do_write(_W_r_i_t_e_r& w, const R& r, std::size_t count, std::true_type) │ │ │ │ │ -const │ │ │ │ │ +215 // destructor │ │ │ │ │ +_2_1_6 _~_B_o_u_n_d_a_r_y_D_o_m_B_l_o_c_k () │ │ │ │ │ 217 { │ │ │ │ │ -218 for (std::size_t i = 0; i < count; ++i) │ │ │ │ │ -219 w._w_r_i_t_e(r[i]); │ │ │ │ │ +218 if( default_ ) │ │ │ │ │ +219 delete default_; │ │ │ │ │ 220 } │ │ │ │ │ 221 │ │ │ │ │ -222 template │ │ │ │ │ -223 void do_write(Writer& w, const R& r, std::size_t count, std::false_type) │ │ │ │ │ -const │ │ │ │ │ +222 // go to next domain in block │ │ │ │ │ +_2_2_3 bool _n_e_x_t () │ │ │ │ │ 224 { │ │ │ │ │ -225 assert(count == 1); │ │ │ │ │ -226 w.write(r); │ │ │ │ │ +225 counter_++; │ │ │ │ │ +226 return ( counter_ < ndomains_ ); │ │ │ │ │ 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; │ │ │ │ │ +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 │ │ │ │ │ -_2_8_7 virtual void _u_n_b_i_n_d() │ │ │ │ │ -288 { │ │ │ │ │ -289 _entity = nullptr; │ │ │ │ │ -290 } │ │ │ │ │ +286 } │ │ │ │ │ +287 │ │ │ │ │ +288 // check whether no boundary domain found │ │ │ │ │ +289 if( index.empty() ) │ │ │ │ │ +290 return default_; │ │ │ │ │ 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; │ │ │ │ │ +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 }; │ │ │ │ │ +303 } // end namespace dgf │ │ │ │ │ 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 // for 2d vector fields should be written as 3d vector fields │ │ │ │ │ -1131 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 && writecomps == │ │ │ │ │ -2) │ │ │ │ │ -1132 writecomps = 3; │ │ │ │ │ -1133 writer.addArray(it->name(), writecomps, it->fieldInfo().precision()); │ │ │ │ │ -1134 } │ │ │ │ │ -1135 writer.endPointData(); │ │ │ │ │ -1136 │ │ │ │ │ -1137 // PCellData │ │ │ │ │ -1138 { │ │ │ │ │ -1139 std::string scalars, vectors; │ │ │ │ │ -1140 std::tie(scalars,vectors) = _g_e_t_D_a_t_a_N_a_m_e_s(_c_e_l_l_d_a_t_a); │ │ │ │ │ -1141 writer.beginCellData(scalars, vectors); │ │ │ │ │ -1142 } │ │ │ │ │ -1143 for (auto it = _c_e_l_l_d_a_t_a.begin(), │ │ │ │ │ -1144 end = _c_e_l_l_d_a_t_a.end(); │ │ │ │ │ -1145 it != end; │ │ │ │ │ -1146 ++it) │ │ │ │ │ -1147 { │ │ │ │ │ -1148 unsigned writecomps = it->fieldInfo().size(); │ │ │ │ │ -1149 // for 2d vector fields should be written as 3d vector fields │ │ │ │ │ -1150 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 && writecomps == │ │ │ │ │ -2) │ │ │ │ │ -1151 writecomps = 3; │ │ │ │ │ -1152 writer.addArray(it->name(), writecomps, it->fieldInfo().precision()); │ │ │ │ │ -1153 } │ │ │ │ │ -1154 writer.endCellData(); │ │ │ │ │ -1155 │ │ │ │ │ -1156 // PPoints │ │ │ │ │ -1157 writer.beginPoints(); │ │ │ │ │ -1158 writer.addArray("Coordinates", 3, coordPrec); │ │ │ │ │ -1159 writer.endPoints(); │ │ │ │ │ -1160 │ │ │ │ │ -1161 // Pieces │ │ │ │ │ -1162 for( int i = 0; i < commSize; ++i ) │ │ │ │ │ -1163 { │ │ │ │ │ -1164 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, │ │ │ │ │ -1165 piecepath, i, │ │ │ │ │ -1166 commSize); │ │ │ │ │ -1167 writer.addPiece(fullname); │ │ │ │ │ -1168 } │ │ │ │ │ -1169 │ │ │ │ │ -1170 writer.endMain(); │ │ │ │ │ -1171 } │ │ │ │ │ -1172 │ │ │ │ │ -1174 void writeDataFile (std::ostream& s) │ │ │ │ │ -1175 { │ │ │ │ │ -1176 _V_T_K_:_:_F_i_l_e_T_y_p_e fileType = │ │ │ │ │ -1177 (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; │ │ │ │ │ -1178 │ │ │ │ │ -1179 VTK::VTUWriter writer(s, _o_u_t_p_u_t_t_y_p_e, fileType); │ │ │ │ │ -1180 │ │ │ │ │ -1181 // Grid characteristics │ │ │ │ │ -1182 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() ); │ │ │ │ │ -1183 if (datamode == _V_T_K_:_:_c_o_n_f_o_r_m_i_n_g) │ │ │ │ │ -1184 { │ │ │ │ │ -1185 number.resize(vertexmapper->_s_i_z_e()); │ │ │ │ │ -1186 for (std::vector::size_type i=0; imap(), this iteration must be │ │ │ │ │ -1248 // in the order of Dune's numbering. │ │ │ │ │ -1249 const int subEntities = it->subEntities(n); │ │ │ │ │ -1250 for (int i=0; i_s_u_b_I_n_d_e_x(*it,i,n); │ │ │ │ │ -1256 if (number[alpha]<0) │ │ │ │ │ -1257 number[alpha] = nvertices_++; │ │ │ │ │ -1258 } │ │ │ │ │ -1259 else │ │ │ │ │ -1260 { │ │ │ │ │ -1261 nvertices_++; │ │ │ │ │ -1262 } │ │ │ │ │ -1263 } │ │ │ │ │ -1264 } │ │ │ │ │ -1265 } │ │ │ │ │ -1266 │ │ │ │ │ -1267 template │ │ │ │ │ -_1_2_6_8 std::tuple _g_e_t_D_a_t_a_N_a_m_e_s(const T& data) const │ │ │ │ │ -1269 { │ │ │ │ │ -1270 std::string scalars = ""; │ │ │ │ │ -1271 for (auto it = data.begin(), │ │ │ │ │ -1272 end = data.end(); │ │ │ │ │ -1273 it != end; │ │ │ │ │ -1274 ++it) │ │ │ │ │ -1275 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) │ │ │ │ │ -1276 { │ │ │ │ │ -1277 scalars = it->name(); │ │ │ │ │ -1278 break; │ │ │ │ │ -1279 } │ │ │ │ │ -1280 │ │ │ │ │ -1281 std::string vectors = ""; │ │ │ │ │ -1282 for (auto it = data.begin(), │ │ │ │ │ -1283 end = data.end(); │ │ │ │ │ -1284 it != end; │ │ │ │ │ -1285 ++it) │ │ │ │ │ -1286 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) │ │ │ │ │ -1287 { │ │ │ │ │ -1288 vectors = it->name(); │ │ │ │ │ -1289 break; │ │ │ │ │ -1290 } │ │ │ │ │ -1291 return std::make_tuple(scalars,vectors); │ │ │ │ │ -1292 } │ │ │ │ │ -1293 │ │ │ │ │ -1294 template │ │ │ │ │ -_1_2_9_5 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) │ │ │ │ │ -1296 { │ │ │ │ │ -1297 for (auto it = data.begin(), │ │ │ │ │ -1298 iend = data.end(); │ │ │ │ │ -1299 it != iend; │ │ │ │ │ -1300 ++it) │ │ │ │ │ -1301 { │ │ │ │ │ -1302 const auto& f = *it; │ │ │ │ │ -1303 _V_T_K_:_:_F_i_e_l_d_I_n_f_o fieldInfo = f.fieldInfo(); │ │ │ │ │ -1304 std::size_t writecomps = fieldInfo._s_i_z_e(); │ │ │ │ │ -1305 switch (fieldInfo._t_y_p_e()) │ │ │ │ │ -1306 { │ │ │ │ │ -1307 case _V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_T_y_p_e_:_:_s_c_a_l_a_r: │ │ │ │ │ -1308 break; │ │ │ │ │ -1309 case _V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_T_y_p_e_:_:_v_e_c_t_o_r: │ │ │ │ │ -1310 // vtk file format: a vector data always should have 3 comps (with │ │ │ │ │ -1311 // 3rd comp = 0 in 2D case) │ │ │ │ │ -1312 if (writecomps > 3) │ │ │ │ │ -1313 DUNE_THROW(IOError,"Cannot write VTK vectors with more than 3 components │ │ │ │ │ -(components was " << writecomps << ")"); │ │ │ │ │ -1314 writecomps = 3; │ │ │ │ │ -1315 break; │ │ │ │ │ -1316 case _V_T_K_:_:_F_i_e_l_d_I_n_f_o_:_:_T_y_p_e_:_:_t_e_n_s_o_r: │ │ │ │ │ -1317 DUNE_THROW(NotImplemented,"VTK output for tensors not implemented yet"); │ │ │ │ │ -1318 } │ │ │ │ │ -1319 std::shared_ptr p │ │ │ │ │ -1320 (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())); │ │ │ │ │ -1321 if(!p->writeIsNoop()) │ │ │ │ │ -1322 for (Iterator eit = begin; eit!=end; ++eit) │ │ │ │ │ -1323 { │ │ │ │ │ -1324 const Entity & e = *eit; │ │ │ │ │ -1325 f.bind(e); │ │ │ │ │ -1326 f.write(eit.position(),*p); │ │ │ │ │ -1327 f.unbind(); │ │ │ │ │ -1328 // vtk file format: a vector data always should have 3 comps │ │ │ │ │ -1329 // (with 3rd comp = 0 in 2D case) │ │ │ │ │ -1330 for (std::size_t j=fieldInfo._s_i_z_e(); j < writecomps; ++j) │ │ │ │ │ -1331 p->write(0.0); │ │ │ │ │ -1332 } │ │ │ │ │ -1333 } │ │ │ │ │ -1334 } │ │ │ │ │ -1335 │ │ │ │ │ -_1_3_3_7 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) │ │ │ │ │ -1338 { │ │ │ │ │ -1339 if(_c_e_l_l_d_a_t_a.size() == 0) │ │ │ │ │ -1340 return; │ │ │ │ │ -1341 │ │ │ │ │ -1342 std::string scalars, vectors; │ │ │ │ │ -1343 std::tie(scalars,vectors) = _g_e_t_D_a_t_a_N_a_m_e_s(_c_e_l_l_d_a_t_a); │ │ │ │ │ -1344 │ │ │ │ │ -1345 writer._b_e_g_i_n_C_e_l_l_D_a_t_a(scalars, vectors); │ │ │ │ │ -1346 _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); │ │ │ │ │ -1347 writer._e_n_d_C_e_l_l_D_a_t_a(); │ │ │ │ │ -1348 } │ │ │ │ │ -1349 │ │ │ │ │ -_1_3_5_1 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) │ │ │ │ │ -1352 { │ │ │ │ │ -1353 if(_v_e_r_t_e_x_d_a_t_a.size() == 0) │ │ │ │ │ -1354 return; │ │ │ │ │ -1355 │ │ │ │ │ -1356 std::string scalars, vectors; │ │ │ │ │ -1357 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); │ │ │ │ │ -1358 │ │ │ │ │ -1359 writer._b_e_g_i_n_P_o_i_n_t_D_a_t_a(scalars, vectors); │ │ │ │ │ -1360 _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); │ │ │ │ │ -1361 writer._e_n_d_P_o_i_n_t_D_a_t_a(); │ │ │ │ │ -1362 } │ │ │ │ │ -1363 │ │ │ │ │ -_1_3_6_5 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) │ │ │ │ │ -1366 { │ │ │ │ │ -1367 writer._b_e_g_i_n_P_o_i_n_t_s(); │ │ │ │ │ -1368 │ │ │ │ │ -1369 std::shared_ptr p │ │ │ │ │ -1370 (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)); │ │ │ │ │ -1371 if(!p->writeIsNoop()) { │ │ │ │ │ -1372 _V_e_r_t_e_x_I_t_e_r_a_t_o_r vEnd = _v_e_r_t_e_x_E_n_d(); │ │ │ │ │ -1373 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) │ │ │ │ │ -1374 { │ │ │ │ │ -1375 int dimw=w; │ │ │ │ │ -1376 for (int j=0; jwrite((*vit).geometry().corner(vit.localindex())[j]); │ │ │ │ │ -1378 for (int j=std::min(dimw,3); j<3; j++) │ │ │ │ │ -1379 p->write(0.0); │ │ │ │ │ -1380 } │ │ │ │ │ -1381 } │ │ │ │ │ -1382 // free the VTK::DataArrayWriter before touching the stream │ │ │ │ │ -1383 p.reset(); │ │ │ │ │ -1384 │ │ │ │ │ -1385 writer._e_n_d_P_o_i_n_t_s(); │ │ │ │ │ -1386 } │ │ │ │ │ -1387 │ │ │ │ │ -_1_3_8_9 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) │ │ │ │ │ -1390 { │ │ │ │ │ -1391 writer._b_e_g_i_n_C_e_l_l_s(); │ │ │ │ │ -1392 │ │ │ │ │ -1393 // connectivity │ │ │ │ │ -1394 { │ │ │ │ │ -1395 std::shared_ptr p1 │ │ │ │ │ -1396 (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)); │ │ │ │ │ -1397 if(!p1->writeIsNoop()) │ │ │ │ │ -1398 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) │ │ │ │ │ -1399 p1->write(it.id()); │ │ │ │ │ -1400 } │ │ │ │ │ -1401 │ │ │ │ │ -1402 // offsets │ │ │ │ │ -1403 { │ │ │ │ │ -1404 std::shared_ptr p2 │ │ │ │ │ -1405 (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)); │ │ │ │ │ -1406 if(!p2->writeIsNoop()) { │ │ │ │ │ -1407 int offset = 0; │ │ │ │ │ -1408 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) │ │ │ │ │ -1409 { │ │ │ │ │ -1410 offset += it->subEntities(n); │ │ │ │ │ -1411 p2->write(offset); │ │ │ │ │ -1412 } │ │ │ │ │ -1413 } │ │ │ │ │ -1414 } │ │ │ │ │ -1415 │ │ │ │ │ -1416 // types │ │ │ │ │ -1417 if (n>1) │ │ │ │ │ -1418 { │ │ │ │ │ -1419 { │ │ │ │ │ -1420 std::shared_ptr p3 │ │ │ │ │ -1421 (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)); │ │ │ │ │ -1422 │ │ │ │ │ -1423 if(!p3->writeIsNoop()) │ │ │ │ │ -1424 { │ │ │ │ │ -1425 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) │ │ │ │ │ -1426 { │ │ │ │ │ -1427 int vtktype = _V_T_K_:_:_g_e_o_m_e_t_r_y_T_y_p_e(it->type()); │ │ │ │ │ -1428 p3->write(vtktype); │ │ │ │ │ -1429 } │ │ │ │ │ -1430 } │ │ │ │ │ -1431 } │ │ │ │ │ -1432 │ │ │ │ │ -1433 │ │ │ │ │ -1434 // if polyhedron cells found also cell faces need to be written │ │ │ │ │ -1435 if( polyhedralCellsPresent_ ) │ │ │ │ │ -1436 { │ │ │ │ │ -1437 _w_r_i_t_e_C_e_l_l_F_a_c_e_s( writer ); │ │ │ │ │ -1438 } │ │ │ │ │ -1439 } │ │ │ │ │ -1440 │ │ │ │ │ -1441 writer._e_n_d_C_e_l_l_s(); │ │ │ │ │ -1442 } │ │ │ │ │ -1443 │ │ │ │ │ -1444 protected: │ │ │ │ │ -_1_4_4_5 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 │ │ │ │ │ -1446 { │ │ │ │ │ -1447 // check if polyhedron cells are present │ │ │ │ │ -1448 for( const auto& geomType : _g_r_i_d_V_i_e_w__._i_n_d_e_x_S_e_t().types( 0 ) ) │ │ │ │ │ -1449 { │ │ │ │ │ -1450 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 ) │ │ │ │ │ -1451 { │ │ │ │ │ -1452 return true; │ │ │ │ │ -1453 } │ │ │ │ │ -1454 } │ │ │ │ │ -1455 return false; │ │ │ │ │ -1456 } │ │ │ │ │ -1457 │ │ │ │ │ -_1_4_5_9 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) │ │ │ │ │ -1460 { │ │ │ │ │ -1461 if( ! faceVertices_ ) │ │ │ │ │ -1462 { │ │ │ │ │ -1463 faceVertices_.reset( new std::pair< std::vector, std::vector > │ │ │ │ │ -() ); │ │ │ │ │ -1464 // fill face vertex structure │ │ │ │ │ -1465 _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(), │ │ │ │ │ -1466 faceVertices_->first, faceVertices_->second ); │ │ │ │ │ -1467 } │ │ │ │ │ -1468 │ │ │ │ │ -1469 std::vector< int >& faces = faceVertices_->first; │ │ │ │ │ -1470 std::vector< int >& faceOffsets = faceVertices_->second; │ │ │ │ │ -1471 assert( int(faceOffsets.size()) == _n_c_e_l_l_s ); │ │ │ │ │ -1472 │ │ │ │ │ -1473 { │ │ │ │ │ -1474 std::shared_ptr p4 │ │ │ │ │ -1475 (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)); │ │ │ │ │ -1476 if(!p4->writeIsNoop()) │ │ │ │ │ -1477 { │ │ │ │ │ -1478 for( const auto& face : faces ) │ │ │ │ │ -1479 p4->write( face ); │ │ │ │ │ -1480 } │ │ │ │ │ -1481 } │ │ │ │ │ -1482 │ │ │ │ │ -1483 { │ │ │ │ │ -1484 std::shared_ptr p5 │ │ │ │ │ -1485 (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)); │ │ │ │ │ -1486 if(!p5->writeIsNoop()) │ │ │ │ │ -1487 { │ │ │ │ │ -1488 for( const auto& offset : faceOffsets ) │ │ │ │ │ -1489 p5->write( offset ); │ │ │ │ │ -1490 │ │ │ │ │ -1491 // clear face vertex structure │ │ │ │ │ -1492 faceVertices_.reset(); │ │ │ │ │ -1493 } │ │ │ │ │ -1494 } │ │ │ │ │ -1495 } │ │ │ │ │ -1496 │ │ │ │ │ -1497 template │ │ │ │ │ -_1_4_9_8 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, │ │ │ │ │ -1499 const _C_o_r_n_e_r_I_t_e_r_a_t_o_r end, │ │ │ │ │ -1500 const IndexSet& indexSet, │ │ │ │ │ -1501 std::vector& faces, │ │ │ │ │ -1502 std::vector& faceOffsets ) │ │ │ │ │ -1503 { │ │ │ │ │ -1504 if( n == 3 && it != end ) │ │ │ │ │ -1505 { │ │ │ │ │ -1506 // clear output arrays │ │ │ │ │ -1507 faces.clear(); │ │ │ │ │ -1508 faces.reserve( 15 * _n_c_e_l_l_s ); │ │ │ │ │ -1509 faceOffsets.clear(); │ │ │ │ │ -1510 faceOffsets.reserve( _n_c_e_l_l_s ); │ │ │ │ │ -1511 │ │ │ │ │ -1512 int offset = 0; │ │ │ │ │ -1513 │ │ │ │ │ -1514 Cell element = *it; │ │ │ │ │ -1515 int elIndex = indexSet.index( element ); │ │ │ │ │ -1516 std::vector< T > vertices; │ │ │ │ │ -1517 vertices.reserve( 30 ); │ │ │ │ │ -1518 for( ; it != end; ++it ) │ │ │ │ │ -1519 { │ │ │ │ │ -1520 const Cell& cell = *it ; │ │ │ │ │ -1521 const int cellIndex = indexSet.index( cell ) ; │ │ │ │ │ -1522 if( elIndex != cellIndex ) │ │ │ │ │ -1523 { │ │ │ │ │ -1524 _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 ); │ │ │ │ │ -1525 │ │ │ │ │ -1526 vertices.clear(); │ │ │ │ │ -1527 element = cell ; │ │ │ │ │ -1528 elIndex = cellIndex ; │ │ │ │ │ -1529 } │ │ │ │ │ -1530 vertices.push_back( it._i_d() ); │ │ │ │ │ -1531 } │ │ │ │ │ -1532 │ │ │ │ │ -1533 // fill faces for last element │ │ │ │ │ -1534 _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 ); │ │ │ │ │ -1535 } │ │ │ │ │ -1536 } │ │ │ │ │ -1537 │ │ │ │ │ -1538 template │ │ │ │ │ -_1_5_3_9 static void _f_i_l_l_F_a_c_e_s_F_o_r_E_l_e_m_e_n_t( const Entity& element, │ │ │ │ │ -1540 const IndexSet& indexSet, │ │ │ │ │ -1541 const std::vector& vertices, │ │ │ │ │ -1542 T& offset, │ │ │ │ │ -1543 std::vector& faces, │ │ │ │ │ -1544 std::vector& faceOffsets ) │ │ │ │ │ -1545 { │ │ │ │ │ -1546 const int dim = n; │ │ │ │ │ -1547 │ │ │ │ │ -1548 std::map< T, T > vxMap; │ │ │ │ │ -1549 │ │ │ │ │ -1550 // get number of local faces │ │ │ │ │ -1551 const int nVertices = element.subEntities( dim ); │ │ │ │ │ -1552 for( int vx = 0; vx < nVertices; ++ vx ) │ │ │ │ │ -1553 { │ │ │ │ │ -1554 const int vxIdx = indexSet.subIndex( element, vx, dim ); │ │ │ │ │ -1555 vxMap[ vxIdx ] = vertices[ vx ]; │ │ │ │ │ -1556 } │ │ │ │ │ -1557 │ │ │ │ │ -1558 // get number of local faces │ │ │ │ │ -1559 const int nFaces = element.subEntities( 1 ); │ │ │ │ │ -1560 // store number of faces for current element │ │ │ │ │ -1561 faces.push_back( nFaces ); │ │ │ │ │ -1562 ++offset; │ │ │ │ │ -1563 // extract each face as a set of vertex indices │ │ │ │ │ -1564 for( int fce = 0; fce < nFaces; ++ fce ) │ │ │ │ │ -1565 { │ │ │ │ │ -1566 // obtain face │ │ │ │ │ -1567 const auto face = element.template subEntity< 1 > ( fce ); │ │ │ │ │ -1568 │ │ │ │ │ -1569 // get all vertex indices from current face │ │ │ │ │ -1570 const int nVxFace = face.subEntities( dim ); │ │ │ │ │ -1571 faces.push_back( nVxFace ); │ │ │ │ │ -1572 ++offset ; │ │ │ │ │ -1573 for( int i=0; i _c_e_l_l_d_a_t_a; │ │ │ │ │ -_1_5_8_9 std::list _v_e_r_t_e_x_d_a_t_a; │ │ │ │ │ -1590 │ │ │ │ │ -1591 // the grid │ │ │ │ │ -_1_5_9_2 _G_r_i_d_V_i_e_w _g_r_i_d_V_i_e_w__; │ │ │ │ │ -1593 │ │ │ │ │ -1594 // temporary grid information │ │ │ │ │ -_1_5_9_5 int _n_c_e_l_l_s; │ │ │ │ │ -_1_5_9_6 int _n_v_e_r_t_i_c_e_s; │ │ │ │ │ -_1_5_9_7 int _n_c_o_r_n_e_r_s; │ │ │ │ │ -1598 private: │ │ │ │ │ -1599 _V_e_r_t_e_x_M_a_p_p_e_r* vertexmapper; │ │ │ │ │ -1600 // in conforming mode, for each vertex id (as obtained by vertexmapper) │ │ │ │ │ -1601 // hold its number in the iteration order (VertexIterator) │ │ │ │ │ -1602 std::vector number; │ │ │ │ │ -1603 _V_T_K_:_:_D_a_t_a_M_o_d_e datamode; │ │ │ │ │ -1604 _V_T_K_:_:_P_r_e_c_i_s_i_o_n coordPrec; │ │ │ │ │ -1605 │ │ │ │ │ -1606 // true if polyhedral cells are present in the grid │ │ │ │ │ -1607 const bool polyhedralCellsPresent_; │ │ │ │ │ -1608 │ │ │ │ │ -1609 // pointer holding face vertex connectivity if needed │ │ │ │ │ -1610 std::shared_ptr< std::pair< std::vector, std::vector > > │ │ │ │ │ -faceVertices_; │ │ │ │ │ -1611 │ │ │ │ │ -1612 protected: │ │ │ │ │ -_1_6_1_3 _V_T_K_:_:_O_u_t_p_u_t_T_y_p_e _o_u_t_p_u_t_t_y_p_e; │ │ │ │ │ -1614 }; │ │ │ │ │ -1615 │ │ │ │ │ -1616} │ │ │ │ │ -1617 │ │ │ │ │ -1618#endif │ │ │ │ │ -_m_c_m_g_m_a_p_p_e_r_._h_h │ │ │ │ │ -Mapper for multiple codim and multiple geometry types. │ │ │ │ │ -_g_r_i_d_e_n_u_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. │ │ │ │ │ -_f_u_n_c_t_i_o_n_._h_h │ │ │ │ │ -Functions for VTK output. │ │ │ │ │ -_v_t_u_w_r_i_t_e_r_._h_h │ │ │ │ │ -_s_t_r_e_a_m_s_._h_h │ │ │ │ │ -_p_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_:_:_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:177 │ │ │ │ │ -_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:273 │ │ │ │ │ -_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:134 │ │ │ │ │ -_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:131 │ │ │ │ │ -_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:137 │ │ │ │ │ -_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. │ │ │ │ │ +305} // end namespace Dune │ │ │ │ │ +306 │ │ │ │ │ +307#endif │ │ │ │ │ +_p_a_r_s_e_r_._h_h │ │ │ │ │ +_b_a_s_i_c_._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_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:104 │ │ │ │ │ -_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 output 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 output 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:1230 │ │ │ │ │ -_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:1589 │ │ │ │ │ -_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:1217 │ │ │ │ │ -_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:1445 │ │ │ │ │ -_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:1337 │ │ │ │ │ -_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:1239 │ │ │ │ │ -_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:1613 │ │ │ │ │ -_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:1389 │ │ │ │ │ -_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:1592 │ │ │ │ │ -_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:1459 │ │ │ │ │ -_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:1498 │ │ │ │ │ -_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:1588 │ │ │ │ │ -_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:1268 │ │ │ │ │ -_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:1365 │ │ │ │ │ -_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:1351 │ │ │ │ │ -_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:1596 │ │ │ │ │ -_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:1539 │ │ │ │ │ -_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:1295 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_n_c_e_l_l_s │ │ │ │ │ -int ncells │ │ │ │ │ -DDeeffiinniittiioonn vtkwriter.hh:1595 │ │ │ │ │ -_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:1597 │ │ │ │ │ -_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 │ │ │ │ │ +_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 │ │ │ │ │ -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 │ │ │ │ │ +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:137 │ │ │ │ │ +_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/a00923.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: streams.hh File Reference │ │ │ │ +dune-grid: simplexgeneration.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,43 +65,32 @@ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ Namespaces
│ │ │ │ -
streams.hh File Reference
│ │ │ │ +
simplexgeneration.cc File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#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.
 
namespace  Dune::dgf
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,26 +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 │ │ │ │ │ -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_._._. │ │ │ │ │ -  │ │ │ │ │ + * _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 <_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 │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ 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: volumewriter.hh File Reference │ │ │ │ +dune-grid: gridparameter.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,43 +65,42 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
volumewriter.hh File Reference
│ │ │ │ +
gridparameter.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 <iostream>
│ │ │ │ +#include <string>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::VTK::ConformingVolumeWriter< GV >
class  Dune::dgf::GridParameterBlock
 Common Grid parameters. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::VTK
namespace  Dune::dgf
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,27 +2,27 @@ │ │ │ │ │ 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 │ │ │ │ │ -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> │ │ │ │ │ +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> │ │ │ │ │ _G_o_ _t_o_ _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_:_:_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_:_:_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/a00926_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: volumewriter.hh Source File │ │ │ │ +dune-grid: gridparameter.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,136 +70,151 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
volumewriter.hh
│ │ │ │ +
gridparameter.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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>
│ │ │ │ +
5#ifndef DUNE_DGF_GRIDPARAMETERBLOCK_HH
│ │ │ │ +
6#define DUNE_DGF_GRIDPARAMETERBLOCK_HH
│ │ │ │ +
7
│ │ │ │ +
8#include <iostream>
│ │ │ │ +
9#include <string>
│ │ │ │
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 }
│ │ │ │ -
│ │ │ │ + │ │ │ │ +
12
│ │ │ │ +
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 static const Flags foundCompatible = 1 << 13;
│ │ │ │ +
43
│ │ │ │ +
44 protected:
│ │ │ │ +
45 Flags foundFlags_; // supportFlags, this block was created with
│ │ │ │ +
46 std::string name_; // name of the grid
│ │ │ │ +
47 std::string dumpFileName_; // name of the grid
│ │ │ │ +
48 bool markLongestEdge_; // Mark longest edge for AlbertaGrid or ALUGrid
│ │ │ │ +
49 bool bisectionCompatibility_; // true if grid is compatible (bisection refinement works)
│ │ │ │
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 };
│ │ │ │ +
51 private:
│ │ │ │ +
52 // copy not implemented
│ │ │ │ + │ │ │ │ +
54
│ │ │ │ +
55 public:
│ │ │ │ +
57 GridParameterBlock ( std::istream &in );
│ │ │ │ +
58
│ │ │ │ +
│ │ │ │ +
60 const std::string &name ( const std::string &defaultValue ) const
│ │ │ │ +
61 {
│ │ │ │ +
62 if( (foundFlags_ & foundName) == 0 )
│ │ │ │ +
63 {
│ │ │ │ +
64 dwarn << "GridParameterBlock: Parameter 'name' not specified, "
│ │ │ │ +
65 << "defaulting to '" << defaultValue << "'." << std::endl;
│ │ │ │ +
66 return defaultValue;
│ │ │ │ +
67 }
│ │ │ │ +
68 else
│ │ │ │ +
69 return name_;
│ │ │ │ +
70 }
│ │ │ │
│ │ │ │
71
│ │ │ │ -
72 } // namespace VTK
│ │ │ │ -
73
│ │ │ │ -
75
│ │ │ │ -
76} // namespace Dune
│ │ │ │ -
77
│ │ │ │ -
78#endif // DUNE_GRID_IO_FILE_VTK_VOLUMEWRITER_HH
│ │ │ │ -
Functions for VTK output.
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
│ │ │ │ +
72 const std::string &dumpFileName ( ) const
│ │ │ │ +
73 {
│ │ │ │ +
74 if( (foundFlags_ & foundDumpFileName) != 0 )
│ │ │ │ +
75 {
│ │ │ │ +
76 dwarn << "GridParameterBlock: found Parameter 'dumpfilename', "
│ │ │ │ +
77 << "dumping file to `" << dumpFileName_ << "'" << std::endl;
│ │ │ │ +
78 }
│ │ │ │ +
79 return dumpFileName_;
│ │ │ │ +
80 }
│ │ │ │ +
│ │ │ │ +
81
│ │ │ │ +
│ │ │ │ +
83 bool markLongestEdge () const
│ │ │ │ +
84 {
│ │ │ │ +
85 if( (foundFlags_ & foundLongestEdge) == 0 )
│ │ │ │ +
86 {
│ │ │ │ +
87 dwarn << "GridParameterBlock: Parameter 'refinementedge' not specified, "
│ │ │ │ +
88 << "defaulting to 'ARBITRARY'." << std::endl;
│ │ │ │ +
89 }
│ │ │ │ +
90 return markLongestEdge_;
│ │ │ │ +
91 }
│ │ │ │ +
│ │ │ │ +
92
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
95 {
│ │ │ │ +
96 if( (foundFlags_ & foundCompatible) == 0 )
│ │ │ │ +
97 {
│ │ │ │ +
98 dwarn << "GridParameterBlock: Parameter 'bisectioncompatibility' not specified, "
│ │ │ │ +
99 << "defaulting to '0' (false)." << std::endl;
│ │ │ │ +
100 }
│ │ │ │ + │ │ │ │ +
102 }
│ │ │ │ +
│ │ │ │ +
103
│ │ │ │ +
104 // some information
│ │ │ │ +
│ │ │ │ +
105 bool ok()
│ │ │ │ +
106 {
│ │ │ │ +
107 return true;
│ │ │ │ +
108 }
│ │ │ │ +
│ │ │ │ +
109 };
│ │ │ │ +
│ │ │ │ +
110
│ │ │ │ +
111
│ │ │ │ +
112 } // end namespace dgf
│ │ │ │ +
113
│ │ │ │ +
114} // end namespace Dune
│ │ │ │ +
115
│ │ │ │ +
116#endif
│ │ │ │ + │ │ │ │
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
│ │ │ │ +
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:72
│ │ │ │ +
static const Flags foundName
Definition gridparameter.hh:39
│ │ │ │ +
GridParameterBlock(std::istream &in)
constructor: read common parameters
│ │ │ │ +
static const Flags foundCompatible
Definition gridparameter.hh:42
│ │ │ │ +
unsigned int Flags
Definition gridparameter.hh:37
│ │ │ │ +
bool bisectionCompatibility_
Definition gridparameter.hh:49
│ │ │ │ +
std::string dumpFileName_
Definition gridparameter.hh:47
│ │ │ │ +
bool ok()
Definition gridparameter.hh:105
│ │ │ │ +
Flags foundFlags_
Definition gridparameter.hh:45
│ │ │ │ +
const std::string & name(const std::string &defaultValue) const
return the name of the grid
Definition gridparameter.hh:60
│ │ │ │ +
std::string name_
Definition gridparameter.hh:46
│ │ │ │ +
bool bisectionCompatibility() const
returns true if grid is compatible for bisection refinement
Definition gridparameter.hh:94
│ │ │ │ +
bool markLongestEdge() const
returns true if longest edge should be marked for AlbertaGrid
Definition gridparameter.hh:83
│ │ │ │ +
static const Flags foundLongestEdge
Definition gridparameter.hh:41
│ │ │ │ +
bool markLongestEdge_
Definition gridparameter.hh:48
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,148 +2,174 @@ │ │ │ │ │ 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 │ │ │ │ │ + * _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 © 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 │ │ │ │ │ +5#ifndef DUNE_DGF_GRIDPARAMETERBLOCK_HH │ │ │ │ │ +6#define DUNE_DGF_GRIDPARAMETERBLOCK_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_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 } │ │ │ │ │ +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 { │ │ │ │ │ +_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; │ │ │ │ │ +_4_2 static const _F_l_a_g_s _f_o_u_n_d_C_o_m_p_a_t_i_b_l_e = 1 << 13; │ │ │ │ │ +43 │ │ │ │ │ +44 protected: │ │ │ │ │ +_4_5 _F_l_a_g_s _f_o_u_n_d_F_l_a_g_s__; // supportFlags, this block was created with │ │ │ │ │ +_4_6 std::string _n_a_m_e__; // name of the grid │ │ │ │ │ +_4_7 std::string _d_u_m_p_F_i_l_e_N_a_m_e__; // name of the grid │ │ │ │ │ +_4_8 bool _m_a_r_k_L_o_n_g_e_s_t_E_d_g_e__; // Mark longest edge for AlbertaGrid or ALUGrid │ │ │ │ │ +_4_9 bool _b_i_s_e_c_t_i_o_n_C_o_m_p_a_t_i_b_i_l_i_t_y__; // true if grid is compatible (bisection │ │ │ │ │ +refinement works) │ │ │ │ │ 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)); │ │ │ │ │ -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 }; │ │ │ │ │ +51 private: │ │ │ │ │ +52 // copy not implemented │ │ │ │ │ +53 _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&); │ │ │ │ │ +54 │ │ │ │ │ +55 public: │ │ │ │ │ +_5_7 _G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k ( std::istream &in ); │ │ │ │ │ +58 │ │ │ │ │ +_6_0 const std::string &_n_a_m_e ( const std::string &defaultValue ) const │ │ │ │ │ +61 { │ │ │ │ │ +62 if( (_f_o_u_n_d_F_l_a_g_s__ & _f_o_u_n_d_N_a_m_e) == 0 ) │ │ │ │ │ +63 { │ │ │ │ │ +64 dwarn << "GridParameterBlock: Parameter 'name' not specified, " │ │ │ │ │ +65 << "defaulting to '" << defaultValue << "'." << std::endl; │ │ │ │ │ +66 return defaultValue; │ │ │ │ │ +67 } │ │ │ │ │ +68 else │ │ │ │ │ +69 return _n_a_m_e__; │ │ │ │ │ +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_._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 │ │ │ │ │ -_f_u_n_c_t_i_o_n_w_r_i_t_e_r_._h_h │ │ │ │ │ +_7_2 const std::string &_d_u_m_p_F_i_l_e_N_a_m_e ( ) const │ │ │ │ │ +73 { │ │ │ │ │ +74 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 ) │ │ │ │ │ +75 { │ │ │ │ │ +76 dwarn << "GridParameterBlock: found Parameter 'dumpfilename', " │ │ │ │ │ +77 << "dumping file to `" << _d_u_m_p_F_i_l_e_N_a_m_e__ << "'" << std::endl; │ │ │ │ │ +78 } │ │ │ │ │ +79 return _d_u_m_p_F_i_l_e_N_a_m_e__; │ │ │ │ │ +80 } │ │ │ │ │ +81 │ │ │ │ │ +_8_3 bool _m_a_r_k_L_o_n_g_e_s_t_E_d_g_e () const │ │ │ │ │ +84 { │ │ │ │ │ +85 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 ) │ │ │ │ │ +86 { │ │ │ │ │ +87 dwarn << "GridParameterBlock: Parameter 'refinementedge' not specified, " │ │ │ │ │ +88 << "defaulting to 'ARBITRARY'." << std::endl; │ │ │ │ │ +89 } │ │ │ │ │ +90 return _m_a_r_k_L_o_n_g_e_s_t_E_d_g_e__; │ │ │ │ │ +91 } │ │ │ │ │ +92 │ │ │ │ │ +_9_4 bool _b_i_s_e_c_t_i_o_n_C_o_m_p_a_t_i_b_i_l_i_t_y() const │ │ │ │ │ +95 { │ │ │ │ │ +96 if( (_f_o_u_n_d_F_l_a_g_s__ & _f_o_u_n_d_C_o_m_p_a_t_i_b_l_e) == 0 ) │ │ │ │ │ +97 { │ │ │ │ │ +98 dwarn << "GridParameterBlock: Parameter 'bisectioncompatibility' not │ │ │ │ │ +specified, " │ │ │ │ │ +99 << "defaulting to '0' (false)." << std::endl; │ │ │ │ │ +100 } │ │ │ │ │ +101 return _b_i_s_e_c_t_i_o_n_C_o_m_p_a_t_i_b_i_l_i_t_y__; │ │ │ │ │ +102 } │ │ │ │ │ +103 │ │ │ │ │ +104 // some information │ │ │ │ │ +_1_0_5 bool _o_k() │ │ │ │ │ +106 { │ │ │ │ │ +107 return true; │ │ │ │ │ +108 } │ │ │ │ │ +109 }; │ │ │ │ │ +110 │ │ │ │ │ +111 │ │ │ │ │ +112 } // end namespace dgf │ │ │ │ │ +113 │ │ │ │ │ +114} // end namespace Dune │ │ │ │ │ +115 │ │ │ │ │ +116#endif │ │ │ │ │ +_b_a_s_i_c_._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_:_:_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:72 │ │ │ │ │ +_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 common 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_o_u_n_d_C_o_m_p_a_t_i_b_l_e │ │ │ │ │ +static const Flags foundCompatible │ │ │ │ │ +DDeeffiinniittiioonn gridparameter.hh:42 │ │ │ │ │ +_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_:_:_b_i_s_e_c_t_i_o_n_C_o_m_p_a_t_i_b_i_l_i_t_y__ │ │ │ │ │ +bool bisectionCompatibility_ │ │ │ │ │ +DDeeffiinniittiioonn gridparameter.hh:49 │ │ │ │ │ +_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:47 │ │ │ │ │ +_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:105 │ │ │ │ │ +_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: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_:_:_n_a_m_e │ │ │ │ │ +const std::string & name(const std::string &defaultValue) const │ │ │ │ │ +return the name of the grid │ │ │ │ │ +DDeeffiinniittiioonn gridparameter.hh:60 │ │ │ │ │ +_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: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_:_:_b_i_s_e_c_t_i_o_n_C_o_m_p_a_t_i_b_i_l_i_t_y │ │ │ │ │ +bool bisectionCompatibility() const │ │ │ │ │ +returns true if grid is compatible for bisection refinement │ │ │ │ │ +DDeeffiinniittiioonn gridparameter.hh:94 │ │ │ │ │ +_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:83 │ │ │ │ │ +_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:48 │ │ │ │ │ =============================================================================== │ │ │ │ │ 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: pvtuwriter.hh File Reference │ │ │ │ +dune-grid: general.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,44 +65,41 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
pvtuwriter.hh File Reference
│ │ │ │ +
general.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <ostream>
│ │ │ │ -#include <string>
│ │ │ │ -#include <dune/common/exceptions.hh>
│ │ │ │ -#include <dune/common/indent.hh>
│ │ │ │ -#include <dune/grid/io/file/vtk/common.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::VTK::PVTUWriter
 Dump a .vtu/.vtp files contents to a stream. More...
class  Dune::dgf::GeneralBlock
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::VTK
namespace  Dune::dgf
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,28 +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 │ │ │ │ │ + * _b_l_o_c_k_s │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -pvtuwriter.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> │ │ │ │ │ +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_:_:_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_._._. │ │ │ │ │ +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_:_:_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/a00929_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: pvtuwriter.hh Source File │ │ │ │ +dune-grid: general.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,197 +70,98 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
pvtuwriter.hh
│ │ │ │ +
general.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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>
│ │ │ │ -
14
│ │ │ │ - │ │ │ │ +
5#ifndef DUNE_GRID_IO_FILE_DGFPARSER_BLOCKS_GENERAL_HH
│ │ │ │ +
6#define DUNE_GRID_IO_FILE_DGFPARSER_BLOCKS_GENERAL_HH
│ │ │ │ +
7
│ │ │ │ +
8#include <iostream>
│ │ │ │ +
9#include <vector>
│ │ │ │ +
10
│ │ │ │ + │ │ │ │ +
12
│ │ │ │ +
13
│ │ │ │ +
14namespace Dune
│ │ │ │ +
15{
│ │ │ │
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();
│ │ │ │ -
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
│ │ │ │ -
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
│ │ │ │ -
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.
│ │ │ │ +
17 namespace dgf
│ │ │ │ +
18 {
│ │ │ │ +
19
│ │ │ │ +
20 // GeneralBlock
│ │ │ │ +
21 // ---------
│ │ │ │ +
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
│ │ │ │ + │ │ │ │
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 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:100
│ │ │ │ +
bool ok()
Definition general.hh:41
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,224 +2,99 @@ │ │ │ │ │ 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 │ │ │ │ │ + * _b_l_o_c_k_s │ │ │ │ │ +general.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 © 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 │ │ │ │ │ -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> │ │ │ │ │ +5#ifndef DUNE_GRID_IO_FILE_DGFPARSER_BLOCKS_GENERAL_HH │ │ │ │ │ +6#define DUNE_GRID_IO_FILE_DGFPARSER_BLOCKS_GENERAL_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 │ │ │ │ │ -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(); │ │ │ │ │ -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 │ │ │ │ │ -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 │ │ │ │ │ -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. │ │ │ │ │ +17 namespace dgf │ │ │ │ │ +18 { │ │ │ │ │ +19 │ │ │ │ │ +20 // GeneralBlock │ │ │ │ │ +21 // --------- │ │ │ │ │ +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 │ │ │ │ │ _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_:_:_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:100 │ │ │ │ │ +_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 │ │ │ │ │ =============================================================================== │ │ │ │ │ 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: common.hh File Reference │ │ │ │ +dune-grid: periodicfacetrans.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,136 +65,53 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces | │ │ │ │ -Enumerations | │ │ │ │ Functions
│ │ │ │ -
common.hh File Reference
│ │ │ │ +
periodicfacetrans.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 <iostream>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/blocks/basic.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::dgf::PeriodicFaceTransformationBlock
 
struct  Dune::VTK::PrintType< signed char >
class  Dune::dgf::PeriodicFaceTransformationBlock::Matrix< T >
 
struct  Dune::VTK::PrintType< char >
 
class  Dune::VTK::FieldInfo
 Descriptor struct for VTK fields. More...
struct  Dune::dgf::PeriodicFaceTransformationBlock::AffineTransformation
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

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

│ │ │ │ -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
 
std::ostream & Dune::dgf::operator<< (std::ostream &out, const PeriodicFaceTransformationBlock::AffineTransformation &trafo)
 
│ │ │ │ -

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,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 | _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 │ │ │ │ │ + * _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 │ │ │ │ │ -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_:_:_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 │ │ │ │ │   │ │ │ │ │ -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_ _> │ │ │ │ │ + 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_:_:_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_._._. │ │ │ │ │ +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_:_:_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_._._. │ │ │ │ │ +namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ │   │ │ │ │ │ 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 │ │ │ │ │ +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) │ │ │ │ │   │ │ │ │ │ -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/a00932_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: common.hh Source File │ │ │ │ +dune-grid: periodicfacetrans.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,384 +70,183 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
common.hh
│ │ │ │ +
periodicfacetrans.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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>
│ │ │ │ +
5#ifndef DUNE_DGF_PERIODICFACETRANSBLOCK_HH
│ │ │ │ +
6#define DUNE_DGF_PERIODICFACETRANSBLOCK_HH
│ │ │ │ +
7
│ │ │ │ +
8#include <iostream>
│ │ │ │ +
9#include <vector>
│ │ │ │ +
10
│ │ │ │ + │ │ │ │ +
12
│ │ │ │
13
│ │ │ │ -
14#include <dune/common/exceptions.hh>
│ │ │ │ -
15#include <dune/geometry/type.hh>
│ │ │ │ -
16#include <dune/common/typetraits.hh>
│ │ │ │ -
17
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ -
75
│ │ │ │ - │ │ │ │ -
82 };
│ │ │ │ -
│ │ │ │ -
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 };
│ │ │ │ -
│ │ │ │ -
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
│ │ │ │ -
118 //
│ │ │ │ -
119 // VTK::GeometryType related stuff
│ │ │ │ -
120 //
│ │ │ │ +
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 {
│ │ │ │ +
29 int rows_;
│ │ │ │ +
30 int cols_;
│ │ │ │ +
31 std::vector< T > fields_;
│ │ │ │ +
32
│ │ │ │ +
33 public:
│ │ │ │ +
│ │ │ │ +
34 Matrix ( int rows, int cols )
│ │ │ │ +
35 : rows_( rows ),
│ │ │ │ +
36 cols_( cols ),
│ │ │ │ +
37 fields_( rows * cols )
│ │ │ │ +
38 {}
│ │ │ │ +
│ │ │ │ +
39
│ │ │ │ +
│ │ │ │ +
40 const T &operator() ( int i, int j ) const
│ │ │ │ +
41 {
│ │ │ │ +
42 return fields_[ i * cols_ + j ];
│ │ │ │ +
43 }
│ │ │ │ +
│ │ │ │ +
44
│ │ │ │ +
│ │ │ │ +
45 T &operator() ( int i, int j )
│ │ │ │ +
46 {
│ │ │ │ +
47 return fields_[ i * cols_ + j ];
│ │ │ │ +
48 }
│ │ │ │ +
│ │ │ │ +
49
│ │ │ │ +
│ │ │ │ +
50 int rows () const
│ │ │ │ +
51 {
│ │ │ │ +
52 return rows_;
│ │ │ │ +
53 }
│ │ │ │ +
│ │ │ │ +
54
│ │ │ │ +
│ │ │ │ +
55 int cols () const
│ │ │ │ +
56 {
│ │ │ │ +
57 return cols_;
│ │ │ │ +
58 }
│ │ │ │ +
│ │ │ │ +
59 };
│ │ │ │ +
│ │ │ │ +
60
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
62 {
│ │ │ │ + │ │ │ │ +
64 std::vector< double > shift;
│ │ │ │ +
65
│ │ │ │ +
│ │ │ │ +
66 explicit AffineTransformation ( int dimworld )
│ │ │ │ +
67 : matrix( dimworld, dimworld ),
│ │ │ │ +
68 shift( dimworld )
│ │ │ │ +
69 {}
│ │ │ │ +
│ │ │ │ +
70 };
│ │ │ │ +
│ │ │ │ +
71
│ │ │ │ +
72 private:
│ │ │ │ +
73 std::vector< AffineTransformation > transformations_;
│ │ │ │ +
74
│ │ │ │ +
75 // copy not implemented
│ │ │ │ + │ │ │ │ +
77
│ │ │ │ +
78 public:
│ │ │ │ +
79 // initialize block and get dimension of world
│ │ │ │ +
80 PeriodicFaceTransformationBlock ( std::istream &in, int dimworld );
│ │ │ │ +
81
│ │ │ │ +
│ │ │ │ +
82 const AffineTransformation &transformation ( int i ) const
│ │ │ │ +
83 {
│ │ │ │ +
84 assert( i < numTransformations() );
│ │ │ │ +
85 return transformations_[ i ];
│ │ │ │ +
86 }
│ │ │ │ +
│ │ │ │ +
87
│ │ │ │ +
│ │ │ │ +
88 int numTransformations () const
│ │ │ │ +
89 {
│ │ │ │ +
90 return transformations_.size();
│ │ │ │ +
91 }
│ │ │ │ +
│ │ │ │ +
92
│ │ │ │ +
93 private:
│ │ │ │ +
94 void match ( char what );
│ │ │ │ +
95 };
│ │ │ │ +
│ │ │ │ +
96
│ │ │ │ +
97
│ │ │ │ +
98
│ │ │ │ +
99 // PeriodicFaceTransformationBlock::AffineTransformation
│ │ │ │ +
100 // -----------------------------------------------------
│ │ │ │ +
101
│ │ │ │ +
102
│ │ │ │ +
│ │ │ │ +
103 inline std::ostream &
│ │ │ │ + │ │ │ │ +
105 {
│ │ │ │ +
106 for( int i = 0; i < trafo.matrix.rows(); ++i )
│ │ │ │ +
107 {
│ │ │ │ +
108 out << (i > 0 ? ", " : "");
│ │ │ │ +
109 for( int j = 0; j < trafo.matrix.cols(); ++j )
│ │ │ │ +
110 out << (j > 0 ? " " : "") << trafo.matrix( i, j );
│ │ │ │ +
111 }
│ │ │ │ +
112 out << " +";
│ │ │ │ +
113 for( unsigned int i = 0; i < trafo.shift.size(); ++i )
│ │ │ │ +
114 out << " " << trafo.shift[ i ];
│ │ │ │ +
115 return out;
│ │ │ │ +
116 }
│ │ │ │ +
│ │ │ │ +
117
│ │ │ │ +
118 } // end namespace dgf
│ │ │ │ +
119
│ │ │ │ +
120} // end namespace Dune
│ │ │ │
121
│ │ │ │ -
123
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
134 line = 3,
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
140 prism = 13,
│ │ │ │ - │ │ │ │ -
142 polyhedron = 42
│ │ │ │ -
143 };
│ │ │ │ -
│ │ │ │ -
144
│ │ │ │ -
146
│ │ │ │ -
│ │ │ │ -
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 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
│ │ │ │ +
122#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
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
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
│ │ │ │ +
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:88
│ │ │ │ +
const AffineTransformation & transformation(int i) const
Definition periodicfacetrans.hh:82
│ │ │ │ +
Definition periodicfacetrans.hh:28
│ │ │ │ +
int rows() const
Definition periodicfacetrans.hh:50
│ │ │ │ +
const T & operator()(int i, int j) const
Definition periodicfacetrans.hh:40
│ │ │ │ +
int cols() const
Definition periodicfacetrans.hh:55
│ │ │ │ +
Matrix(int rows, int cols)
Definition periodicfacetrans.hh:34
│ │ │ │ + │ │ │ │ +
Matrix< double > matrix
Definition periodicfacetrans.hh:63
│ │ │ │ +
std::vector< double > shift
Definition periodicfacetrans.hh:64
│ │ │ │ +
AffineTransformation(int dimworld)
Definition periodicfacetrans.hh:66
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,452 +2,181 @@ │ │ │ │ │ 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 │ │ │ │ │ + * _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 © 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 │ │ │ │ │ +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 │ │ │ │ │ -14#include │ │ │ │ │ -15#include │ │ │ │ │ -16#include │ │ │ │ │ -17 │ │ │ │ │ -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_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 │ │ │ │ │ -118 // │ │ │ │ │ -119 // VTK::GeometryType related stuff │ │ │ │ │ -120 // │ │ │ │ │ +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 > │ │ │ │ │ +_2_7 class _M_a_t_r_i_x │ │ │ │ │ +28 { │ │ │ │ │ +29 int rows_; │ │ │ │ │ +30 int cols_; │ │ │ │ │ +31 std::vector< T > fields_; │ │ │ │ │ +32 │ │ │ │ │ +33 public: │ │ │ │ │ +_3_4 _M_a_t_r_i_x ( int _r_o_w_s, int _c_o_l_s ) │ │ │ │ │ +35 : rows_( _r_o_w_s ), │ │ │ │ │ +36 cols_( _c_o_l_s ), │ │ │ │ │ +37 fields_( _r_o_w_s * _c_o_l_s ) │ │ │ │ │ +38 {} │ │ │ │ │ +39 │ │ │ │ │ +_4_0 const T &_o_p_e_r_a_t_o_r_(_)_ ( int i, int j ) const │ │ │ │ │ +41 { │ │ │ │ │ +42 return fields_[ i * cols_ + j ]; │ │ │ │ │ +43 } │ │ │ │ │ +44 │ │ │ │ │ +_4_5 T &_o_p_e_r_a_t_o_r_(_)_ ( int i, int j ) │ │ │ │ │ +46 { │ │ │ │ │ +47 return fields_[ i * cols_ + j ]; │ │ │ │ │ +48 } │ │ │ │ │ +49 │ │ │ │ │ +_5_0 int _r_o_w_s () const │ │ │ │ │ +51 { │ │ │ │ │ +52 return rows_; │ │ │ │ │ +53 } │ │ │ │ │ +54 │ │ │ │ │ +_5_5 int _c_o_l_s () const │ │ │ │ │ +56 { │ │ │ │ │ +57 return cols_; │ │ │ │ │ +58 } │ │ │ │ │ +59 }; │ │ │ │ │ +60 │ │ │ │ │ +_6_1 struct _A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ │ +62 { │ │ │ │ │ +_6_3 _M_a_t_r_i_x_<_ _d_o_u_b_l_e_ _> _m_a_t_r_i_x; │ │ │ │ │ +_6_4 std::vector< double > _s_h_i_f_t; │ │ │ │ │ +65 │ │ │ │ │ +_6_6 explicit _A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n ( int dimworld ) │ │ │ │ │ +67 : _m_a_t_r_i_x( dimworld, dimworld ), │ │ │ │ │ +68 _s_h_i_f_t( dimworld ) │ │ │ │ │ +69 {} │ │ │ │ │ +70 }; │ │ │ │ │ +71 │ │ │ │ │ +72 private: │ │ │ │ │ +73 std::vector< AffineTransformation > transformations_; │ │ │ │ │ +74 │ │ │ │ │ +75 // copy not implemented │ │ │ │ │ +76 _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 & ); │ │ │ │ │ +77 │ │ │ │ │ +78 public: │ │ │ │ │ +79 // initialize block and get dimension of world │ │ │ │ │ +80 _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 ); │ │ │ │ │ +81 │ │ │ │ │ +_8_2 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 │ │ │ │ │ +83 { │ │ │ │ │ +84 assert( i < _n_u_m_T_r_a_n_s_f_o_r_m_a_t_i_o_n_s() ); │ │ │ │ │ +85 return transformations_[ i ]; │ │ │ │ │ +86 } │ │ │ │ │ +87 │ │ │ │ │ +_8_8 int _n_u_m_T_r_a_n_s_f_o_r_m_a_t_i_o_n_s () const │ │ │ │ │ +89 { │ │ │ │ │ +90 return transformations_.size(); │ │ │ │ │ +91 } │ │ │ │ │ +92 │ │ │ │ │ +93 private: │ │ │ │ │ +94 void match ( char what ); │ │ │ │ │ +95 }; │ │ │ │ │ +96 │ │ │ │ │ +97 │ │ │ │ │ +98 │ │ │ │ │ +99 // PeriodicFaceTransformationBlock::AffineTransformation │ │ │ │ │ +100 // ----------------------------------------------------- │ │ │ │ │ +101 │ │ │ │ │ +102 │ │ │ │ │ +_1_0_3 inline std::ostream & │ │ │ │ │ +104 _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 ) │ │ │ │ │ +105 { │ │ │ │ │ +106 for( int i = 0; i < trafo._m_a_t_r_i_x._r_o_w_s(); ++i ) │ │ │ │ │ +107 { │ │ │ │ │ +108 out << (i > 0 ? ", " : ""); │ │ │ │ │ +109 for( int j = 0; j < trafo._m_a_t_r_i_x._c_o_l_s(); ++j ) │ │ │ │ │ +110 out << (j > 0 ? " " : "") << trafo._m_a_t_r_i_x( i, j ); │ │ │ │ │ +111 } │ │ │ │ │ +112 out << " +"; │ │ │ │ │ +113 for( unsigned int i = 0; i < trafo._s_h_i_f_t.size(); ++i ) │ │ │ │ │ +114 out << " " << trafo._s_h_i_f_t[ i ]; │ │ │ │ │ +115 return out; │ │ │ │ │ +116 } │ │ │ │ │ +117 │ │ │ │ │ +118 } // end namespace dgf │ │ │ │ │ +119 │ │ │ │ │ +120} // end namespace Dune │ │ │ │ │ 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) │ │ │ │ │ -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 │ │ │ │ │ -_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 │ │ │ │ │ +122#endif │ │ │ │ │ +_b_a_s_i_c_._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_:_:_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:88 │ │ │ │ │ +_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:82 │ │ │ │ │ +_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:28 │ │ │ │ │ +_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:50 │ │ │ │ │ +_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:40 │ │ │ │ │ +_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:55 │ │ │ │ │ +_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:34 │ │ │ │ │ +_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: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_:_:_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:63 │ │ │ │ │ +_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:64 │ │ │ │ │ +_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:66 │ │ │ │ │ =============================================================================== │ │ │ │ │ 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: basicwriter.hh File Reference │ │ │ │ +dune-grid: dgfidentitygrid.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,53 +65,43 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
basicwriter.hh File Reference
│ │ │ │ +
dgfidentitygrid.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 <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::VTK::BasicWriter< IteratorFactory >
struct  Dune::DGFGridFactory< IdentityGrid< HostGrid > >
 
struct  Dune::DGFGridInfo< IdentityGrid< HostGrid > >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ 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> │ │ │ │ │ +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_:_:_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_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_:_:_V_T_K │ │ │ │ │ -  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00935_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: basicwriter.hh Source File │ │ │ │ +dune-grid: dgfidentitygrid.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,494 +70,179 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
basicwriter.hh
│ │ │ │ +
dgfidentitygrid.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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>
│ │ │ │ +
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#include <dune/common/parallel/mpiguard.hh>
│ │ │ │ -
18#include <dune/common/path.hh>
│ │ │ │ +
17 // DGFGridFactory for IdentityGrid
│ │ │ │ +
18 // -------------------------------
│ │ │ │
19
│ │ │ │ -
20#include <dune/geometry/referenceelements.hh>
│ │ │ │ -
21
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
26
│ │ │ │ -
27namespace Dune
│ │ │ │ -
28{
│ │ │ │ -
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;
│ │ │ │ +
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 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 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
│ │ │ │ - │ │ │ │ +
│ │ │ │ +
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 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 void addCellData(const std::shared_ptr<FunctionWriter>& writer) {
│ │ │ │ -
77 cellData.push_back(writer);
│ │ │ │ -
78 }
│ │ │ │ +
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 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();
│ │ │ │ -
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 static std::string getFirstScalar(const WriterList& data) {
│ │ │ │ -
139 for(auto&& d : data)
│ │ │ │ -
140 if (d->ncomps() == 1)
│ │ │ │ -
141 return d->name();
│ │ │ │ -
142 return "";
│ │ │ │ -
143 }
│ │ │ │ -
│ │ │ │ -
144
│ │ │ │ -
│ │ │ │ -
145 static std::string getFirstVector(const WriterList& data) {
│ │ │ │ -
146 for(auto&& d : data)
│ │ │ │ -
147 if (d->ncomps() == 3)
│ │ │ │ -
148 return d->name();
│ │ │ │ -
149 return "";
│ │ │ │ -
150 }
│ │ │ │ -
│ │ │ │ -
151
│ │ │ │ -
│ │ │ │ -
152 void writeCellData(VTUWriter& vtuWriter, unsigned ncells) const {
│ │ │ │ -
153 if(cellData.empty()) return;
│ │ │ │ -
154
│ │ │ │ -
155 vtuWriter.beginCellData(getFirstScalar(cellData),
│ │ │ │ -
156 getFirstVector(cellData));
│ │ │ │ -
157
│ │ │ │ -
158 for (auto&& cD : cellData)
│ │ │ │ -
159 writeCellFunction(vtuWriter, *cD, ncells);
│ │ │ │ -
160 vtuWriter.endCellData();
│ │ │ │ -
161 }
│ │ │ │ -
│ │ │ │ -
162
│ │ │ │ -
│ │ │ │ -
163 void writePointData(VTUWriter& vtuWriter, unsigned npoints) const {
│ │ │ │ -
164 if(pointData.empty()) return;
│ │ │ │ -
165
│ │ │ │ -
166 vtuWriter.beginPointData(getFirstScalar(pointData),
│ │ │ │ -
167 getFirstVector(pointData));
│ │ │ │ -
168
│ │ │ │ -
169 for (auto&& pD : pointData)
│ │ │ │ -
170 writePointFunction(vtuWriter, *pD, npoints);
│ │ │ │ -
171 vtuWriter.endPointData();
│ │ │ │ -
172 }
│ │ │ │ -
│ │ │ │ -
173
│ │ │ │ -
│ │ │ │ -
174 void writeGrid(VTUWriter& vtuWriter, unsigned ncells, unsigned npoints,
│ │ │ │ -
175 unsigned ncorners) {
│ │ │ │ -
176 vtuWriter.beginPoints();
│ │ │ │ -
177 writePointFunction(vtuWriter, coords, npoints);
│ │ │ │ -
178 vtuWriter.endPoints();
│ │ │ │ -
179
│ │ │ │ -
180 vtuWriter.beginCells();
│ │ │ │ -
181 writeCornerFunction(vtuWriter, connectivity, ncorners);
│ │ │ │ -
182 writeCellFunction(vtuWriter, offsets, ncells);
│ │ │ │ -
183 if(fileType != polyData)
│ │ │ │ -
184 writeCellFunction(vtuWriter, types, ncells);
│ │ │ │ -
185 vtuWriter.endCells();
│ │ │ │ -
186 }
│ │ │ │ -
│ │ │ │ -
187
│ │ │ │ -
│ │ │ │ -
188 void writeAll(VTUWriter& vtuWriter, unsigned ncells, unsigned npoints,
│ │ │ │ -
189 unsigned ncorners) {
│ │ │ │ -
190 writeCellData(vtuWriter, ncells);
│ │ │ │ -
191 writePointData(vtuWriter, npoints);
│ │ │ │ -
192 writeGrid(vtuWriter, ncells, npoints, ncorners);
│ │ │ │ -
193 }
│ │ │ │ -
│ │ │ │ -
194
│ │ │ │ -
195 public:
│ │ │ │ -
│ │ │ │ -
196 void writePiece(const std::string& filename, OutputType outputType) {
│ │ │ │ -
197 std::ofstream stream;
│ │ │ │ -
198 stream.exceptions(std::ios_base::badbit | std::ios_base::failbit |
│ │ │ │ -
199 std::ios_base::eofbit);
│ │ │ │ -
200 stream.open(filename.c_str(), std::ios::binary);
│ │ │ │ -
201
│ │ │ │ -
202 VTUWriter vtuWriter(stream, outputType, fileType);
│ │ │ │ -
203
│ │ │ │ -
204 unsigned ncells = std::distance(factory.beginCells(),
│ │ │ │ -
205 factory.endCells());
│ │ │ │ -
206 unsigned npoints = std::distance(factory.beginPoints(),
│ │ │ │ -
207 factory.endPoints());
│ │ │ │ -
208 unsigned ncorners = std::distance(factory.beginCorners(),
│ │ │ │ -
209 factory.endCorners());
│ │ │ │ -
210
│ │ │ │ -
211 vtuWriter.beginMain(ncells, npoints);
│ │ │ │ -
212 writeAll(vtuWriter, ncells, npoints, ncorners);
│ │ │ │ -
213 vtuWriter.endMain();
│ │ │ │ -
214
│ │ │ │ -
215 if(vtuWriter.beginAppended())
│ │ │ │ -
216 writeAll(vtuWriter, ncells, npoints, ncorners);
│ │ │ │ -
217 vtuWriter.endAppended();
│ │ │ │ -
218
│ │ │ │ -
219 }
│ │ │ │ -
│ │ │ │ -
220
│ │ │ │ -
222
│ │ │ │ -
│ │ │ │ -
238 void writeCollection(const std::string name,
│ │ │ │ -
239 const std::string& piecename,
│ │ │ │ -
240 const std::string& piecepath)
│ │ │ │ -
241 {
│ │ │ │ -
242 std::ofstream stream;
│ │ │ │ -
243 stream.exceptions(std::ios_base::badbit | std::ios_base::failbit |
│ │ │ │ -
244 std::ios_base::eofbit);
│ │ │ │ -
245 stream.open(name.c_str(), std::ios::binary);
│ │ │ │ -
246
│ │ │ │ -
247 PVTUWriter writer(stream, fileType);
│ │ │ │ -
248
│ │ │ │ -
249 writer.beginMain();
│ │ │ │ -
250
│ │ │ │ -
251 // PPointData
│ │ │ │ -
252 writer.beginPointData(getFirstScalar(pointData),
│ │ │ │ -
253 getFirstVector(pointData));
│ │ │ │ -
254 for(WIterator it=pointData.begin(); it!=pointData.end(); ++it)
│ │ │ │ -
255 (*it)->addArray(writer);
│ │ │ │ -
256 writer.endPointData();
│ │ │ │ -
257
│ │ │ │ -
258 // PCellData
│ │ │ │ -
259 writer.beginCellData(getFirstScalar(cellData),
│ │ │ │ -
260 getFirstVector(cellData));
│ │ │ │ -
261 for(WIterator it=cellData.begin(); it!=cellData.end(); ++it)
│ │ │ │ -
262 (*it)->addArray(writer);
│ │ │ │ -
263 writer.endCellData();
│ │ │ │ -
264
│ │ │ │ -
265 // PPoints
│ │ │ │ -
266 writer.beginPoints();
│ │ │ │ -
267 coords.addArray(writer);
│ │ │ │ -
268 writer.endPoints();
│ │ │ │ -
269
│ │ │ │ -
270 // Pieces
│ │ │ │ -
271 for( int i = 0; i < factory.comm().size(); ++i )
│ │ │ │ -
272 writer.addPiece(getParallelPieceName(piecename, piecepath, i));
│ │ │ │ -
273
│ │ │ │ -
274 writer.endMain();
│ │ │ │ -
275 }
│ │ │ │ -
│ │ │ │ -
276
│ │ │ │ -
278 //
│ │ │ │ -
279 // Filename generators
│ │ │ │ -
280 //
│ │ │ │ -
281
│ │ │ │ -
283
│ │ │ │ -
│ │ │ │ -
293 std::string getParallelPieceName(const std::string& name,
│ │ │ │ -
294 const std::string& path, int rank) const
│ │ │ │ -
295 {
│ │ │ │ -
296 std::ostringstream s;
│ │ │ │ -
297 if(path.size() > 0) {
│ │ │ │ -
298 s << path;
│ │ │ │ -
299 if(path[path.size()-1] != '/')
│ │ │ │ -
300 s << '/';
│ │ │ │ -
301 }
│ │ │ │ -
302 s << 's' << std::setw(4) << std::setfill('0') << factory.comm().size()
│ │ │ │ -
303 << ':';
│ │ │ │ -
304 s << 'p' << std::setw(4) << std::setfill('0') << rank << ':';
│ │ │ │ -
305 s << name;
│ │ │ │ -
306 switch(fileType) {
│ │ │ │ -
307 case polyData : s << ".vtp"; break;
│ │ │ │ -
308 case unstructuredGrid : s << ".vtu"; break;
│ │ │ │ -
309 }
│ │ │ │ -
310 return s.str();
│ │ │ │ -
311 }
│ │ │ │ -
│ │ │ │ -
312
│ │ │ │ -
314
│ │ │ │ -
│ │ │ │ -
323 std::string getParallelHeaderName(const std::string& name,
│ │ │ │ -
324 const std::string& path) const
│ │ │ │ -
325 {
│ │ │ │ -
326 std::ostringstream s;
│ │ │ │ -
327 if(path.size() > 0) {
│ │ │ │ -
328 s << path;
│ │ │ │ -
329 if(path[path.size()-1] != '/')
│ │ │ │ -
330 s << '/';
│ │ │ │ -
331 }
│ │ │ │ -
332 s << 's' << std::setw(4) << std::setfill('0') << factory.comm().size()
│ │ │ │ -
333 << ':';
│ │ │ │ -
334 s << name;
│ │ │ │ -
335 switch(fileType) {
│ │ │ │ -
336 case polyData : s << ".pvtp"; break;
│ │ │ │ -
337 case unstructuredGrid : s << ".pvtu"; break;
│ │ │ │ -
338 }
│ │ │ │ -
339 return s.str();
│ │ │ │ -
340 }
│ │ │ │ -
│ │ │ │ -
341
│ │ │ │ -
343
│ │ │ │ -
│ │ │ │ -
355 std::string getSerialPieceName(const std::string& name,
│ │ │ │ -
356 const std::string& path) const
│ │ │ │ -
357 {
│ │ │ │ -
358 switch(fileType) {
│ │ │ │ -
359 case polyData : return concatPaths(path, name+".vtp");
│ │ │ │ -
360 case unstructuredGrid : return concatPaths(path, name+".vtu");
│ │ │ │ -
361 }
│ │ │ │ -
362 return concatPaths(path, name); // unknown fileType
│ │ │ │ -
363 }
│ │ │ │ -
│ │ │ │ -
364
│ │ │ │ -
366 //
│ │ │ │ -
367 // User interface functions for writing
│ │ │ │ -
368 //
│ │ │ │ -
369
│ │ │ │ -
371
│ │ │ │ -
│ │ │ │ -
393 std::string pwrite(const std::string& name, const std::string& path,
│ │ │ │ -
394 const std::string& extendpath, OutputType outputType)
│ │ │ │ -
395 {
│ │ │ │ -
396 MPIGuard guard(factory.comm());
│ │ │ │ -
397
│ │ │ │ -
398 // do some magic because paraview can only cope with relative paths to
│ │ │ │ -
399 // piece files
│ │ │ │ -
400 std::ofstream file;
│ │ │ │ -
401 file.exceptions(std::ios_base::badbit | std::ios_base::failbit |
│ │ │ │ -
402 std::ios_base::eofbit);
│ │ │ │ -
403 std::string piecepath = concatPaths(path, extendpath);
│ │ │ │ -
404 std::string relpiecepath = relativePath(path, piecepath);
│ │ │ │ -
405
│ │ │ │ -
406 // write this processes .vtu/.vtp piece file
│ │ │ │ -
407 std::string fullname = getParallelPieceName(name, piecepath,
│ │ │ │ -
408 factory.comm().rank());
│ │ │ │ -
409 writePiece(fullname, outputType);
│ │ │ │ -
410
│ │ │ │ -
411 // if we are rank 0, write .pvtu/.pvtp parallel header
│ │ │ │ -
412 fullname = getParallelHeaderName(name, path);
│ │ │ │ -
413 if(factory.comm().rank() == 0)
│ │ │ │ -
414 writeCollection(fullname, name, relpiecepath);
│ │ │ │ -
415
│ │ │ │ -
416 guard.finalize();
│ │ │ │ -
417
│ │ │ │ -
418 return fullname;
│ │ │ │ -
419 }
│ │ │ │ -
│ │ │ │ -
420
│ │ │ │ -
│ │ │ │ -
434 std::string write(const std::string &name, OutputType outputType)
│ │ │ │ -
435 {
│ │ │ │ -
436 // in the parallel case, just use pwrite, it has all the necessary
│ │ │ │ -
437 // stuff, so we don't need to reimplement it here.
│ │ │ │ -
438 if(factory.comm().size() > 1)
│ │ │ │ -
439 return pwrite(name, "", "", outputType);
│ │ │ │ -
440
│ │ │ │ -
441 // generate filename for process data
│ │ │ │ -
442 std::string pieceName = getSerialPieceName(name, "");
│ │ │ │ -
443
│ │ │ │ -
444 writePiece(pieceName, outputType);
│ │ │ │ -
445
│ │ │ │ -
446 return pieceName;
│ │ │ │ -
447 }
│ │ │ │ -
│ │ │ │ -
448
│ │ │ │ -
449 };
│ │ │ │ -
│ │ │ │ -
450
│ │ │ │ -
451 } // namespace VTK
│ │ │ │ -
│ │ │ │ -
452
│ │ │ │ -
454
│ │ │ │ -
455} // namespace Dune
│ │ │ │ -
456
│ │ │ │ -
457#endif // DUNE_GRID_IO_FILE_VTK_BASICWRITER_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ -
Common stuff for the VTKWriter.
│ │ │ │ - │ │ │ │ +
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
│ │ │ │ -
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:152
│ │ │ │ -
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:355
│ │ │ │ -
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:238
│ │ │ │ -
void writeGrid(VTUWriter &vtuWriter, unsigned ncells, unsigned npoints, unsigned ncorners)
Definition basicwriter.hh:174
│ │ │ │ -
void writeAll(VTUWriter &vtuWriter, unsigned ncells, unsigned npoints, unsigned ncorners)
Definition basicwriter.hh:188
│ │ │ │ -
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:393
│ │ │ │ -
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:323
│ │ │ │ -
void writePointData(VTUWriter &vtuWriter, unsigned npoints) const
Definition basicwriter.hh:163
│ │ │ │ -
static std::string getFirstVector(const WriterList &data)
Definition basicwriter.hh:145
│ │ │ │ -
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:196
│ │ │ │ -
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:293
│ │ │ │ -
std::string write(const std::string &name, OutputType outputType)
write output (interface might change later)
Definition basicwriter.hh:434
│ │ │ │ -
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 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:93
│ │ │ │ +
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 {} │ │ │ │ │ @@ -2,605 +2,209 @@ │ │ │ │ │ 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 │ │ │ │ │ +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 © 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 │ │ │ │ │ +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#include │ │ │ │ │ -18#include │ │ │ │ │ +17 // DGFGridFactory for IdentityGrid │ │ │ │ │ +18 // ------------------------------- │ │ │ │ │ 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> │ │ │ │ │ -26 │ │ │ │ │ -27namespace _D_u_n_e │ │ │ │ │ -28{ │ │ │ │ │ -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; │ │ │ │ │ +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 │ │ │ │ │ -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 │ │ │ │ │ -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; │ │ │ │ │ +_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 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 void _a_d_d_C_e_l_l_D_a_t_a(const std::shared_ptr& writer) { │ │ │ │ │ -77 cellData.push_back(writer); │ │ │ │ │ +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 │ │ │ │ │ -_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 │ │ │ │ │ -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 │ │ │ │ │ -_1_3_8 static std::string _g_e_t_F_i_r_s_t_S_c_a_l_a_r(const WriterList& data) { │ │ │ │ │ -139 for(auto&& d : data) │ │ │ │ │ -140 if (d->ncomps() == 1) │ │ │ │ │ -141 return d->name(); │ │ │ │ │ -142 return ""; │ │ │ │ │ -143 } │ │ │ │ │ -144 │ │ │ │ │ -_1_4_5 static std::string _g_e_t_F_i_r_s_t_V_e_c_t_o_r(const WriterList& data) { │ │ │ │ │ -146 for(auto&& d : data) │ │ │ │ │ -147 if (d->ncomps() == 3) │ │ │ │ │ -148 return d->name(); │ │ │ │ │ -149 return ""; │ │ │ │ │ -150 } │ │ │ │ │ -151 │ │ │ │ │ -_1_5_2 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 { │ │ │ │ │ -153 if(cellData.empty()) return; │ │ │ │ │ -154 │ │ │ │ │ -155 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), │ │ │ │ │ -156 _g_e_t_F_i_r_s_t_V_e_c_t_o_r(cellData)); │ │ │ │ │ -157 │ │ │ │ │ -158 for (auto&& cD : cellData) │ │ │ │ │ -159 _w_r_i_t_e_C_e_l_l_F_u_n_c_t_i_o_n(vtuWriter, *cD, ncells); │ │ │ │ │ -160 vtuWriter._e_n_d_C_e_l_l_D_a_t_a(); │ │ │ │ │ -161 } │ │ │ │ │ -162 │ │ │ │ │ -_1_6_3 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 { │ │ │ │ │ -164 if(pointData.empty()) return; │ │ │ │ │ -165 │ │ │ │ │ -166 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), │ │ │ │ │ -167 _g_e_t_F_i_r_s_t_V_e_c_t_o_r(pointData)); │ │ │ │ │ -168 │ │ │ │ │ -169 for (auto&& pD : pointData) │ │ │ │ │ -170 _w_r_i_t_e_P_o_i_n_t_F_u_n_c_t_i_o_n(vtuWriter, *pD, npoints); │ │ │ │ │ -171 vtuWriter._e_n_d_P_o_i_n_t_D_a_t_a(); │ │ │ │ │ -172 } │ │ │ │ │ -173 │ │ │ │ │ -_1_7_4 void _w_r_i_t_e_G_r_i_d(_V_T_U_W_r_i_t_e_r& vtuWriter, unsigned ncells, unsigned npoints, │ │ │ │ │ -175 unsigned ncorners) { │ │ │ │ │ -176 vtuWriter._b_e_g_i_n_P_o_i_n_t_s(); │ │ │ │ │ -177 _w_r_i_t_e_P_o_i_n_t_F_u_n_c_t_i_o_n(vtuWriter, coords, npoints); │ │ │ │ │ -178 vtuWriter._e_n_d_P_o_i_n_t_s(); │ │ │ │ │ -179 │ │ │ │ │ -180 vtuWriter._b_e_g_i_n_C_e_l_l_s(); │ │ │ │ │ -181 _w_r_i_t_e_C_o_r_n_e_r_F_u_n_c_t_i_o_n(vtuWriter, connectivity, ncorners); │ │ │ │ │ -182 _w_r_i_t_e_C_e_l_l_F_u_n_c_t_i_o_n(vtuWriter, offsets, ncells); │ │ │ │ │ -183 if(fileType != _p_o_l_y_D_a_t_a) │ │ │ │ │ -184 _w_r_i_t_e_C_e_l_l_F_u_n_c_t_i_o_n(vtuWriter, types, ncells); │ │ │ │ │ -185 vtuWriter._e_n_d_C_e_l_l_s(); │ │ │ │ │ -186 } │ │ │ │ │ -187 │ │ │ │ │ -_1_8_8 void _w_r_i_t_e_A_l_l(_V_T_U_W_r_i_t_e_r& vtuWriter, unsigned ncells, unsigned npoints, │ │ │ │ │ -189 unsigned ncorners) { │ │ │ │ │ -190 _w_r_i_t_e_C_e_l_l_D_a_t_a(vtuWriter, ncells); │ │ │ │ │ -191 _w_r_i_t_e_P_o_i_n_t_D_a_t_a(vtuWriter, npoints); │ │ │ │ │ -192 _w_r_i_t_e_G_r_i_d(vtuWriter, ncells, npoints, ncorners); │ │ │ │ │ -193 } │ │ │ │ │ -194 │ │ │ │ │ -195 public: │ │ │ │ │ -_1_9_6 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) { │ │ │ │ │ -197 std::ofstream stream; │ │ │ │ │ -198 stream.exceptions(std::ios_base::badbit | std::ios_base::failbit | │ │ │ │ │ -199 std::ios_base::eofbit); │ │ │ │ │ -200 stream.open(filename.c_str(), std::ios::binary); │ │ │ │ │ -201 │ │ │ │ │ -202 _V_T_U_W_r_i_t_e_r vtuWriter(stream, outputType, fileType); │ │ │ │ │ -203 │ │ │ │ │ -204 unsigned ncells = std::distance(factory.beginCells(), │ │ │ │ │ -205 factory.endCells()); │ │ │ │ │ -206 unsigned npoints = std::distance(factory.beginPoints(), │ │ │ │ │ -207 factory.endPoints()); │ │ │ │ │ -208 unsigned ncorners = std::distance(factory.beginCorners(), │ │ │ │ │ -209 factory.endCorners()); │ │ │ │ │ -210 │ │ │ │ │ -211 vtuWriter._b_e_g_i_n_M_a_i_n(ncells, npoints); │ │ │ │ │ -212 _w_r_i_t_e_A_l_l(vtuWriter, ncells, npoints, ncorners); │ │ │ │ │ -213 vtuWriter._e_n_d_M_a_i_n(); │ │ │ │ │ -214 │ │ │ │ │ -215 if(vtuWriter._b_e_g_i_n_A_p_p_e_n_d_e_d()) │ │ │ │ │ -216 _w_r_i_t_e_A_l_l(vtuWriter, ncells, npoints, ncorners); │ │ │ │ │ -217 vtuWriter._e_n_d_A_p_p_e_n_d_e_d(); │ │ │ │ │ -218 │ │ │ │ │ -219 } │ │ │ │ │ -220 │ │ │ │ │ -222 │ │ │ │ │ -_2_3_8 void _w_r_i_t_e_C_o_l_l_e_c_t_i_o_n(const std::string name, │ │ │ │ │ -239 const std::string& piecename, │ │ │ │ │ -240 const std::string& piecepath) │ │ │ │ │ -241 { │ │ │ │ │ -242 std::ofstream stream; │ │ │ │ │ -243 stream.exceptions(std::ios_base::badbit | std::ios_base::failbit | │ │ │ │ │ -244 std::ios_base::eofbit); │ │ │ │ │ -245 stream.open(name.c_str(), std::ios::binary); │ │ │ │ │ -246 │ │ │ │ │ -247 _P_V_T_U_W_r_i_t_e_r writer(stream, fileType); │ │ │ │ │ -248 │ │ │ │ │ -249 writer._b_e_g_i_n_M_a_i_n(); │ │ │ │ │ -250 │ │ │ │ │ -251 // PPointData │ │ │ │ │ -252 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), │ │ │ │ │ -253 _g_e_t_F_i_r_s_t_V_e_c_t_o_r(pointData)); │ │ │ │ │ -254 for(WIterator it=pointData.begin(); it!=pointData.end(); ++it) │ │ │ │ │ -255 (*it)->addArray(writer); │ │ │ │ │ -256 writer._e_n_d_P_o_i_n_t_D_a_t_a(); │ │ │ │ │ -257 │ │ │ │ │ -258 // PCellData │ │ │ │ │ -259 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), │ │ │ │ │ -260 _g_e_t_F_i_r_s_t_V_e_c_t_o_r(cellData)); │ │ │ │ │ -261 for(WIterator it=cellData.begin(); it!=cellData.end(); ++it) │ │ │ │ │ -262 (*it)->addArray(writer); │ │ │ │ │ -263 writer._e_n_d_C_e_l_l_D_a_t_a(); │ │ │ │ │ -264 │ │ │ │ │ -265 // PPoints │ │ │ │ │ -266 writer._b_e_g_i_n_P_o_i_n_t_s(); │ │ │ │ │ -267 coords._a_d_d_A_r_r_a_y(writer); │ │ │ │ │ -268 writer._e_n_d_P_o_i_n_t_s(); │ │ │ │ │ -269 │ │ │ │ │ -270 // Pieces │ │ │ │ │ -271 for( int i = 0; i < factory.comm().size(); ++i ) │ │ │ │ │ -272 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)); │ │ │ │ │ -273 │ │ │ │ │ -274 writer._e_n_d_M_a_i_n(); │ │ │ │ │ -275 } │ │ │ │ │ -276 │ │ │ │ │ -278 // │ │ │ │ │ -279 // Filename generators │ │ │ │ │ -280 // │ │ │ │ │ -281 │ │ │ │ │ -283 │ │ │ │ │ -_2_9_3 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, │ │ │ │ │ -294 const std::string& path, int rank) const │ │ │ │ │ -295 { │ │ │ │ │ -296 std::ostringstream s; │ │ │ │ │ -297 if(path.size() > 0) { │ │ │ │ │ -298 s << path; │ │ │ │ │ -299 if(path[path.size()-1] != '/') │ │ │ │ │ -300 s << '/'; │ │ │ │ │ -301 } │ │ │ │ │ -302 s << 's' << std::setw(4) << std::setfill('0') << factory.comm().size() │ │ │ │ │ -303 << ':'; │ │ │ │ │ -304 s << 'p' << std::setw(4) << std::setfill('0') << rank << ':'; │ │ │ │ │ -305 s << name; │ │ │ │ │ -306 switch(fileType) { │ │ │ │ │ -307 case _p_o_l_y_D_a_t_a : s << ".vtp"; break; │ │ │ │ │ -308 case _u_n_s_t_r_u_c_t_u_r_e_d_G_r_i_d : s << ".vtu"; break; │ │ │ │ │ -309 } │ │ │ │ │ -310 return s.str(); │ │ │ │ │ -311 } │ │ │ │ │ -312 │ │ │ │ │ -314 │ │ │ │ │ -_3_2_3 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, │ │ │ │ │ -324 const std::string& path) const │ │ │ │ │ -325 { │ │ │ │ │ -326 std::ostringstream s; │ │ │ │ │ -327 if(path.size() > 0) { │ │ │ │ │ -328 s << path; │ │ │ │ │ -329 if(path[path.size()-1] != '/') │ │ │ │ │ -330 s << '/'; │ │ │ │ │ -331 } │ │ │ │ │ -332 s << 's' << std::setw(4) << std::setfill('0') << factory.comm().size() │ │ │ │ │ -333 << ':'; │ │ │ │ │ -334 s << name; │ │ │ │ │ -335 switch(fileType) { │ │ │ │ │ -336 case _p_o_l_y_D_a_t_a : s << ".pvtp"; break; │ │ │ │ │ -337 case _u_n_s_t_r_u_c_t_u_r_e_d_G_r_i_d : s << ".pvtu"; break; │ │ │ │ │ -338 } │ │ │ │ │ -339 return s.str(); │ │ │ │ │ -340 } │ │ │ │ │ -341 │ │ │ │ │ -343 │ │ │ │ │ -_3_5_5 std::string _g_e_t_S_e_r_i_a_l_P_i_e_c_e_N_a_m_e(const std::string& name, │ │ │ │ │ -356 const std::string& path) const │ │ │ │ │ -357 { │ │ │ │ │ -358 switch(fileType) { │ │ │ │ │ -359 case _p_o_l_y_D_a_t_a : return concatPaths(path, name+".vtp"); │ │ │ │ │ -360 case _u_n_s_t_r_u_c_t_u_r_e_d_G_r_i_d : return concatPaths(path, name+".vtu"); │ │ │ │ │ -361 } │ │ │ │ │ -362 return concatPaths(path, name); // unknown fileType │ │ │ │ │ -363 } │ │ │ │ │ -364 │ │ │ │ │ -366 // │ │ │ │ │ -367 // User interface functions for writing │ │ │ │ │ -368 // │ │ │ │ │ -369 │ │ │ │ │ -371 │ │ │ │ │ -_3_9_3 std::string _p_w_r_i_t_e(const std::string& name, const std::string& path, │ │ │ │ │ -394 const std::string& extendpath, _O_u_t_p_u_t_T_y_p_e outputType) │ │ │ │ │ -395 { │ │ │ │ │ -396 MPIGuard guard(factory.comm()); │ │ │ │ │ -397 │ │ │ │ │ -398 // do some magic because paraview can only cope with relative paths to │ │ │ │ │ -399 // piece files │ │ │ │ │ -400 std::ofstream file; │ │ │ │ │ -401 file.exceptions(std::ios_base::badbit | std::ios_base::failbit | │ │ │ │ │ -402 std::ios_base::eofbit); │ │ │ │ │ -403 std::string piecepath = concatPaths(path, extendpath); │ │ │ │ │ -404 std::string relpiecepath = relativePath(path, piecepath); │ │ │ │ │ -405 │ │ │ │ │ -406 // write this processes .vtu/.vtp piece file │ │ │ │ │ -407 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, │ │ │ │ │ -408 factory.comm().rank()); │ │ │ │ │ -409 _w_r_i_t_e_P_i_e_c_e(fullname, outputType); │ │ │ │ │ -410 │ │ │ │ │ -411 // if we are rank 0, write .pvtu/.pvtp parallel header │ │ │ │ │ -412 fullname = _g_e_t_P_a_r_a_l_l_e_l_H_e_a_d_e_r_N_a_m_e(name, path); │ │ │ │ │ -413 if(factory.comm().rank() == 0) │ │ │ │ │ -414 _w_r_i_t_e_C_o_l_l_e_c_t_i_o_n(fullname, name, relpiecepath); │ │ │ │ │ -415 │ │ │ │ │ -416 guard.finalize(); │ │ │ │ │ -417 │ │ │ │ │ -418 return fullname; │ │ │ │ │ -419 } │ │ │ │ │ -420 │ │ │ │ │ -_4_3_4 std::string _w_r_i_t_e(const std::string &name, _O_u_t_p_u_t_T_y_p_e outputType) │ │ │ │ │ -435 { │ │ │ │ │ -436 // in the parallel case, just use pwrite, it has all the necessary │ │ │ │ │ -437 // stuff, so we don't need to reimplement it here. │ │ │ │ │ -438 if(factory.comm().size() > 1) │ │ │ │ │ -439 return _p_w_r_i_t_e(name, "", "", outputType); │ │ │ │ │ -440 │ │ │ │ │ -441 // generate filename for process data │ │ │ │ │ -442 std::string pieceName = _g_e_t_S_e_r_i_a_l_P_i_e_c_e_N_a_m_e(name, ""); │ │ │ │ │ -443 │ │ │ │ │ -444 _w_r_i_t_e_P_i_e_c_e(pieceName, outputType); │ │ │ │ │ -445 │ │ │ │ │ -446 return pieceName; │ │ │ │ │ -447 } │ │ │ │ │ -448 │ │ │ │ │ -449 }; │ │ │ │ │ -450 │ │ │ │ │ -451 } // namespace VTK │ │ │ │ │ -452 │ │ │ │ │ -454 │ │ │ │ │ -455} // namespace Dune │ │ │ │ │ -456 │ │ │ │ │ -457#endif // DUNE_GRID_IO_FILE_VTK_BASICWRITER_HH │ │ │ │ │ -_v_t_u_w_r_i_t_e_r_._h_h │ │ │ │ │ -_p_v_t_u_w_r_i_t_e_r_._h_h │ │ │ │ │ -_c_o_m_m_o_n_._h_h │ │ │ │ │ -Common stuff for the VTKWriter. │ │ │ │ │ -_f_u_n_c_t_i_o_n_w_r_i_t_e_r_._h_h │ │ │ │ │ +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_:_:_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:152 │ │ │ │ │ -_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:355 │ │ │ │ │ -_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:238 │ │ │ │ │ -_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:174 │ │ │ │ │ -_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:188 │ │ │ │ │ -_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:393 │ │ │ │ │ -_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:323 │ │ │ │ │ -_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:163 │ │ │ │ │ -_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:145 │ │ │ │ │ -_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:196 │ │ │ │ │ -_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:293 │ │ │ │ │ -_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:434 │ │ │ │ │ -_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_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:93 │ │ │ │ │ +_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/a00938.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: boundaryiterators.hh File Reference │ │ │ │ +dune-grid: dgfgeogrid.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,57 +65,55 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
boundaryiterators.hh File Reference
│ │ │ │ +
dgfgeogrid.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ -

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

class  Dune::VTK::BoundaryIterator< GV >
 iterate over the GridViews boundary intersections More...
class  Dune::DGFCoordFunction< dimD, dimR >
 
struct  Dune::DGFCoordFunctionFactory< HostGrid, CoordFunction, false >
 
struct  Dune::DGFCoordFunctionFactory< HostGrid, CoordFunction, true >
 
class  Dune::VTK::IntersectionIndexSet< ElementIndexSet >
struct  Dune::DGFCoordFunctionFactory< HostGrid, DGFCoordFunction< dimD, dimR >, false >
 
class  Dune::VTK::NonConformingBoundaryIteratorFactory< GV >
struct  Dune::DGFGridFactory< GeometryGrid< HostGrid, CoordFunction, Allocator > >
 
struct  Dune::DGFGridInfo< GeometryGrid< HostGrid, CoordFunction, Allocator > >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ Namespaces

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

Detailed Description

│ │ │ │ -

Functions for VTK output on the skeleton.

│ │ │ │ -
Author
Jö Fahlke
│ │ │ │ -
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ │ @@ -1 +1 @@ │ │ │ │ │ -utf-8 │ │ │ │ │ +us-ascii │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,39 +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 │ │ │ │ │ -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> │ │ │ │ │ +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 │ │ │ │ │ -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_:_:_D_G_F_C_o_o_r_d_F_u_n_c_t_i_o_n_<_ _d_i_m_D_,_ _d_i_m_R_ _> │ │ │ │ │   │ │ │ │ │ -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_ _> │ │ │ │ │ +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_ _> │ │ │ │ │   │ │ │ │ │ -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_ _> │ │ │ │ │ +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_ _> │ │ │ │ │ + _> │ │ │ │ │   │ │ │ │ │ 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 │ │ │ │ │ =============================================================================== │ │ │ │ │ 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: boundaryiterators.hh Source File │ │ │ │ +dune-grid: dgfgeogrid.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,283 +70,348 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
boundaryiterators.hh
│ │ │ │ +
dgfgeogrid.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │ -
8
│ │ │ │ -
9#include <iterator>
│ │ │ │ -
10#include <memory>
│ │ │ │ -
11
│ │ │ │ -
12#include <dune/common/iteratorfacades.hh>
│ │ │ │ -
13
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
5#ifndef DUNE_DGFGEOGRID_HH
│ │ │ │ +
6#define DUNE_DGFGEOGRID_HH
│ │ │ │ +
7
│ │ │ │ +
8#include <dune/common/typetraits.hh>
│ │ │ │ +
9
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
15
│ │ │ │ + │ │ │ │
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 }
│ │ │ │ +
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 }
│ │ │ │
│ │ │ │ -
107
│ │ │ │ +
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
│ │ │ │ -
│ │ │ │ -
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 }
│ │ │ │ +
│ │ │ │ +
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 }
│ │ │ │
│ │ │ │ -
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 }
│ │ │ │ +
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
│ │ │ │ -
│ │ │ │ -
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 };
│ │ │ │ + │ │ │ │ +
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 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;
│ │ │ │ +
│ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ +
159
│ │ │ │ +
│ │ │ │ +
160 Grid *grid () const
│ │ │ │ +
161 {
│ │ │ │ +
162 return grid_;
│ │ │ │ +
163 }
│ │ │ │ +
│ │ │ │
164
│ │ │ │ -
165 typedef typename GV::Intersection Cell;
│ │ │ │ - │ │ │ │ -
167
│ │ │ │ - │ │ │ │ - │ │ │ │ +
165 template< class Intersection >
│ │ │ │ +
│ │ │ │ +
166 bool wasInserted ( const Intersection &intersection ) const
│ │ │ │ +
167 {
│ │ │ │ +
168 return dgfHostFactory_.wasInserted( HostGridAccess< Grid >::hostIntersection( intersection ) );
│ │ │ │ +
169 }
│ │ │ │ +
│ │ │ │
170
│ │ │ │ -
171 typedef Corner Point;
│ │ │ │ - │ │ │ │ -
173
│ │ │ │ - │ │ │ │ -
175 typedef typename GV::Communication Communication;
│ │ │ │ +
171 template< class Intersection >
│ │ │ │ +
│ │ │ │ +
172 int boundaryId ( const Intersection &intersection ) const
│ │ │ │ +
173 {
│ │ │ │ +
174 return dgfHostFactory_.boundaryId( HostGridAccess< Grid >::hostIntersection( intersection ) );
│ │ │ │ +
175 }
│ │ │ │ +
│ │ │ │
176
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
178 : gv(gv_)
│ │ │ │ -
179 { }
│ │ │ │ -
│ │ │ │ -
180
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
182 return CellIterator(gv);
│ │ │ │ -
183 }
│ │ │ │ +
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 return CellIterator(gv, true);
│ │ │ │ -
186 }
│ │ │ │ -
│ │ │ │ -
187
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
190 }
│ │ │ │ -
│ │ │ │ + │ │ │ │ +
185 {
│ │ │ │ +
186 return dgfHostFactory_.haveBoundaryParameters();
│ │ │ │ +
187 }
│ │ │ │ +
│ │ │ │ +
188
│ │ │ │ +
189 template< class GG, class II >
│ │ │ │ +
190 const typename DGFBoundaryParameter::type &
│ │ │ │
│ │ │ │ - │ │ │ │ -
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 };
│ │ │ │ +
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 };
│ │ │ │
│ │ │ │ -
205
│ │ │ │ -
206 } // namespace VTK
│ │ │ │ +
206
│ │ │ │
207
│ │ │ │ -
209
│ │ │ │ -
210} // namespace Dune
│ │ │ │ +
208
│ │ │ │ +
209 // DGFGridInfo for GeometryGrid
│ │ │ │ +
210 // ----------------------------
│ │ │ │
211
│ │ │ │ -
212#endif // DUNE_GRID_IO_FILE_VTK_BOUNDARYITERATORS_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ +
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:606
│ │ │ │ +
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,320 +2,425 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ -boundaryiterators.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 © 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 │ │ │ │ │ -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> │ │ │ │ │ +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 │ │ │ │ │ -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; │ │ │ │ │ +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; │ │ │ │ │ +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 │ │ │ │ │ +_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 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; │ │ │ │ │ +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 │ │ │ │ │ -_1_0_3 void _i_n_c_r_e_m_e_n_t() { │ │ │ │ │ -104 basic_increment(); │ │ │ │ │ -105 while(!valid()) basic_increment(); │ │ │ │ │ -106 } │ │ │ │ │ -107 │ │ │ │ │ +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_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 } │ │ │ │ │ +_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 │ │ │ │ │ -_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_) │ │ │ │ │ +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 { │ │ │ │ │ -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 } │ │ │ │ │ +_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_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 }; │ │ │ │ │ +_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 │ │ │ │ │ -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; │ │ │ │ │ +_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 │ │ │ │ │ -_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; │ │ │ │ │ +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 │ │ │ │ │ -_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; │ │ │ │ │ +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 │ │ │ │ │ -_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(); │ │ │ │ │ +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 } │ │ │ │ │ -_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 │ │ │ │ │ +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 │ │ │ │ │ -209 │ │ │ │ │ -210} // namespace Dune │ │ │ │ │ +208 │ │ │ │ │ +209 // DGFGridInfo for GeometryGrid │ │ │ │ │ +210 // ---------------------------- │ │ │ │ │ 211 │ │ │ │ │ -212#endif // DUNE_GRID_IO_FILE_VTK_BOUNDARYITERATORS_HH │ │ │ │ │ -_c_o_r_n_e_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_i_t_e_r_a_t_o_r_._h_h │ │ │ │ │ +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_:_:_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 │ │ │ │ │ +_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:606 │ │ │ │ │ +_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/a00941.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: pointiterator.hh File Reference │ │ │ │ +dune-grid: dgfug.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,45 +65,54 @@ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
pointiterator.hh File Reference
│ │ │ │ +
dgfug.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <iterator>
│ │ │ │ +
#include <fstream>
│ │ │ │ +#include <istream>
│ │ │ │ +#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 <dune/common/exceptions.hh>
│ │ │ │ +#include <dune/common/fvector.hh>
│ │ │ │ +#include <dune/common/parallel/mpihelper.hh>
│ │ │ │ +#include <dune-grid-config.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::PointIterator< CellIterator, IS >
 iterate over the points of some corner range More...
struct  Dune::dgf::UGGridParameterBlock
 
struct  Dune::DGFGridInfo< UGGrid< dim > >
 
struct  Dune::DGFGridFactory< UGGrid< dim > >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::VTK
namespace  Dune::dgf
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,29 +2,38 @@ │ │ │ │ │ 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 │ │ │ │ │ +dgfug.hh File Reference │ │ │ │ │ +#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_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 │ │ │ │ │ +#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_:_:_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_:_:_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_ _>_ _> │ │ │ │ │   │ │ │ │ │ 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/a00941_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: pointiterator.hh Source File │ │ │ │ +dune-grid: dgfug.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,151 +70,317 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
pointiterator.hh
│ │ │ │ +
dgfug.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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>
│ │ │ │ -
10#include <vector>
│ │ │ │ -
11
│ │ │ │ -
12#include <dune/common/iteratorfacades.hh>
│ │ │ │ -
13#include <dune/common/typetraits.hh>
│ │ │ │ -
14
│ │ │ │ - │ │ │ │ - │ │ │ │ -
17
│ │ │ │ -
18namespace Dune
│ │ │ │ -
19{
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ +
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 <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
│ │ │ │ +
20#include <dune-grid-config.hh> // HAVE_DUNE_UGGRID
│ │ │ │ + │ │ │ │ +
22#include <dune/grid/uggrid.hh>
│ │ │ │ +
23
│ │ │ │ +
24//- local includes
│ │ │ │ +
25#include "dgfparser.hh"
│ │ │ │ + │ │ │ │ +
27
│ │ │ │ +
28
│ │ │ │ +
29namespace Dune
│ │ │ │ +
30{
│ │ │ │ +
31
│ │ │ │ +
32 namespace dgf
│ │ │ │ +
33 {
│ │ │ │ +
34
│ │ │ │ +
35 // UGGridParameterBlock
│ │ │ │ +
36 // --------------------
│ │ │ │ +
37
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
39 : public GridParameterBlock
│ │ │ │ +
40 {
│ │ │ │ +
42 explicit UGGridParameterBlock ( std::istream &input );
│ │ │ │ +
43
│ │ │ │ +
45 bool noClosure () const { return noClosure_; }
│ │ │ │ +
47 bool noCopy () const { return noCopy_; }
│ │ │ │ +
49 size_t heapSize () const { return heapSize_; }
│ │ │ │ +
50
│ │ │ │ +
51 protected:
│ │ │ │ +
52 bool noClosure_; // no closure for UGGrid
│ │ │ │ +
53 bool noCopy_; // no copies for UGGrid
│ │ │ │ +
54 size_t heapSize_; // heap size for UGGrid
│ │ │ │ +
55 };
│ │ │ │ +
│ │ │ │ +
56
│ │ │ │ +
57 } // namespace dgf
│ │ │ │ +
58
│ │ │ │ +
59
│ │ │ │ +
60
│ │ │ │ +
61#if HAVE_DUNE_UGGRID
│ │ │ │ +
62 template< int dim >
│ │ │ │ +
│ │ │ │ +
63 struct DGFGridInfo< UGGrid< dim > >
│ │ │ │ +
64 {
│ │ │ │ +
│ │ │ │ +
65 static int refineStepsForHalf ()
│ │ │ │ +
66 {
│ │ │ │ +
67 return 1;
│ │ │ │ +
68 }
│ │ │ │ +
│ │ │ │
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;
│ │ │ │ +
│ │ │ │ +
70 static double refineWeight ()
│ │ │ │ +
71 {
│ │ │ │ +
72 return -1.;
│ │ │ │ +
73 }
│ │ │ │ +
│ │ │ │ +
74 };
│ │ │ │ +
│ │ │ │ +
75
│ │ │ │
76
│ │ │ │ - │ │ │ │ -
78 const IS* is;
│ │ │ │ -
79 std::vector<bool> seen;
│ │ │ │ +
77
│ │ │ │ +
78 // DGFGridFactory< UGGrid< dim > >
│ │ │ │ +
79 // -------------------------------
│ │ │ │
80
│ │ │ │ -
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 };
│ │ │ │ +
81 template< int dim >
│ │ │ │ +
│ │ │ │ +
82 struct DGFGridFactory< UGGrid< dim > >
│ │ │ │ +
83 {
│ │ │ │ + │ │ │ │ +
87 static const int dimension = dim;
│ │ │ │ +
89 typedef MPIHelper::MPICommunicator MPICommunicatorType;
│ │ │ │ +
90
│ │ │ │ +
│ │ │ │ +
92 explicit DGFGridFactory ( std::istream &input,
│ │ │ │ +
93 MPICommunicatorType comm = MPIHelper::getCommunicator() )
│ │ │ │ +
94 : grid_( 0 ),
│ │ │ │ +
95 factory_(),
│ │ │ │ +
96 dgf_( rank( comm ), size( comm ) )
│ │ │ │ +
97 {
│ │ │ │ +
98 generate( input );
│ │ │ │ +
99 }
│ │ │ │ +
│ │ │ │ +
100
│ │ │ │ +
│ │ │ │ +
102 explicit DGFGridFactory ( const std::string &filename,
│ │ │ │ +
103 MPICommunicatorType comm = MPIHelper::getCommunicator() )
│ │ │ │ +
104 : grid_( 0 ),
│ │ │ │ +
105 factory_(),
│ │ │ │ +
106 dgf_( rank( comm ), size( comm ) )
│ │ │ │ +
107 {
│ │ │ │ +
108 std::ifstream input( filename.c_str() );
│ │ │ │ +
109 if ( !input )
│ │ │ │ +
110 DUNE_THROW( DGFException, "Error: Macrofile " << filename << " not found" );
│ │ │ │ +
111 generate( input );
│ │ │ │ +
112 }
│ │ │ │ +
│ │ │ │ +
113
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
116 {
│ │ │ │ +
117 return grid_;
│ │ │ │ +
118 }
│ │ │ │ +
│ │ │ │ +
119
│ │ │ │ +
121 template< class GG, class II >
│ │ │ │ +
│ │ │ │ +
122 bool wasInserted ( const Dune::Intersection< GG, II > &intersection ) const
│ │ │ │ +
123 {
│ │ │ │ +
124 return factory_.wasInserted( intersection );
│ │ │ │ +
125 }
│ │ │ │
│ │ │ │ -
124
│ │ │ │ -
125 } // namespace VTK
│ │ │ │
126
│ │ │ │ -
128
│ │ │ │ -
129} // namespace Dune
│ │ │ │ -
130
│ │ │ │ -
131#endif // DUNE_GRID_IO_FILE_VTK_POINTITERATOR_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ +
128 template< class GG, class II >
│ │ │ │ +
│ │ │ │ +
129 int boundaryId ( const Dune::Intersection< GG, II > &intersection ) const
│ │ │ │ +
130 {
│ │ │ │ +
131 return intersection.boundarySegmentIndex();
│ │ │ │ +
132 }
│ │ │ │ +
│ │ │ │ +
133
│ │ │ │ +
135 template< int codim >
│ │ │ │ +
│ │ │ │ +
136 int numParameters () const
│ │ │ │ +
137 {
│ │ │ │ +
138 if( codim == 0 )
│ │ │ │ +
139 return dgf_.nofelparams;
│ │ │ │ +
140 else if( codim == dimension )
│ │ │ │ +
141 return dgf_.nofvtxparams;
│ │ │ │ +
142 else
│ │ │ │ +
143 return 0;
│ │ │ │ +
144 }
│ │ │ │ +
│ │ │ │ +
145
│ │ │ │ +
147 template< class Entity >
│ │ │ │ +
│ │ │ │ +
148 int numParameters ( const Entity & ) const
│ │ │ │ +
149 {
│ │ │ │ +
150 return numParameters< Entity::codimension >();
│ │ │ │ +
151 }
│ │ │ │ +
│ │ │ │ +
152
│ │ │ │ +
│ │ │ │ +
154 std::vector< double > &parameter ( const typename Grid::template Codim< 0 >::Entity &element )
│ │ │ │ +
155 {
│ │ │ │ +
156 if( numParameters< 0 >() <= 0 )
│ │ │ │ +
157 {
│ │ │ │ +
158 DUNE_THROW( InvalidStateException,
│ │ │ │ +
159 "Calling DGFGridFactory::parameter is only allowed if there are parameters." );
│ │ │ │ +
160 }
│ │ │ │ +
161 return dgf_.elParams[ factory_.insertionIndex( element ) ];
│ │ │ │ +
162 }
│ │ │ │ +
│ │ │ │ +
163
│ │ │ │ +
│ │ │ │ +
165 std::vector< double > &parameter ( const typename Grid::template Codim< dimension >::Entity &vertex )
│ │ │ │ +
166 {
│ │ │ │ +
167 if( numParameters< dimension >() <= 0 )
│ │ │ │ +
168 {
│ │ │ │ +
169 DUNE_THROW( InvalidStateException,
│ │ │ │ +
170 "Calling DGFGridFactory::parameter is only allowed if there are parameters." );
│ │ │ │ +
171 }
│ │ │ │ +
172 return dgf_.vtxParams[ factory_.insertionIndex( vertex ) ];
│ │ │ │ +
173 }
│ │ │ │ +
│ │ │ │ +
174
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
177 {
│ │ │ │ +
178 return dgf_.haveBndParameters;
│ │ │ │ +
179 }
│ │ │ │ +
│ │ │ │ +
180
│ │ │ │ +
182 template< class GG, class II >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
184 {
│ │ │ │ + │ │ │ │ +
186 typename Intersection::Entity entity = intersection.inside();
│ │ │ │ +
187 const int face = intersection.indexInInside();
│ │ │ │ +
188
│ │ │ │ +
189 auto refElem = referenceElement< double, dimension >( entity.type() );
│ │ │ │ +
190 int corners = refElem.size( face, 1, dimension );
│ │ │ │ +
191 std::vector< unsigned int > bound( corners );
│ │ │ │ +
192 for( int i = 0; i < corners; ++i )
│ │ │ │ +
193 {
│ │ │ │ +
194 const int k = refElem.subEntity( face, 1, i, dimension );
│ │ │ │ +
195 bound[ i ] = factory_.insertionIndex( entity.template subEntity< dimension >( k ) );
│ │ │ │ +
196 }
│ │ │ │ +
197
│ │ │ │ +
198 DuneGridFormatParser::facemap_t::key_type key( bound, false );
│ │ │ │ +
199 const DuneGridFormatParser::facemap_t::const_iterator pos = dgf_.facemap.find( key );
│ │ │ │ +
200 if( pos != dgf_.facemap.end() )
│ │ │ │ +
201 return dgf_.facemap.find( key )->second.second;
│ │ │ │ +
202 else
│ │ │ │ + │ │ │ │ +
204 }
│ │ │ │ +
│ │ │ │ +
205
│ │ │ │ +
206 private:
│ │ │ │ +
207 // create grid
│ │ │ │ +
208 void generate ( std::istream &input );
│ │ │ │ +
209
│ │ │ │ +
210 // return rank
│ │ │ │ +
211 static int rank( MPICommunicatorType MPICOMM )
│ │ │ │ +
212 {
│ │ │ │ +
213 int rank = 0;
│ │ │ │ +
214#if HAVE_MPI
│ │ │ │ +
215 MPI_Comm_rank( MPICOMM, &rank );
│ │ │ │ +
216#endif
│ │ │ │ +
217 return rank;
│ │ │ │ +
218 }
│ │ │ │ +
219
│ │ │ │ +
220 // return size
│ │ │ │ +
221 static int size( MPICommunicatorType MPICOMM )
│ │ │ │ +
222 {
│ │ │ │ +
223 int size = 1;
│ │ │ │ +
224#if HAVE_MPI
│ │ │ │ +
225 MPI_Comm_size( MPICOMM, &size );
│ │ │ │ +
226#endif
│ │ │ │ +
227 return size;
│ │ │ │ +
228 }
│ │ │ │ +
229
│ │ │ │ +
230 Grid *grid_;
│ │ │ │ +
231 GridFactory< UGGrid< dim > > factory_;
│ │ │ │ +
232 DuneGridFormatParser dgf_;
│ │ │ │ +
233 };
│ │ │ │ +
│ │ │ │ +
234#endif // #if HAVE_DUNE_UGGRID
│ │ │ │ +
235
│ │ │ │ +
236} // namespace Dune
│ │ │ │ +
237
│ │ │ │ +
238#endif // #ifndef DUNE_GRID_IO_FILE_DGFPARSER_DGFUG_HH
│ │ │ │ + │ │ │ │ +
The UGGrid class.
│ │ │ │
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
│ │ │ │ +
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:40
│ │ │ │ +
size_t heapSize() const
returns heap size used on construction of the grid
Definition dgfug.hh:49
│ │ │ │ +
bool noCopy_
Definition dgfug.hh:53
│ │ │ │ +
size_t heapSize_
Definition dgfug.hh:54
│ │ │ │ +
bool noClosure_
Definition dgfug.hh:52
│ │ │ │ +
bool noCopy() const
returns true if no copies are made for UGGrid elements
Definition dgfug.hh:47
│ │ │ │ +
bool noClosure() const
returns true if no closure should be used for UGGrid
Definition dgfug.hh:45
│ │ │ │ +
static double refineWeight()
Definition dgfug.hh:70
│ │ │ │ +
static int refineStepsForHalf()
Definition dgfug.hh:65
│ │ │ │ +
const DGFBoundaryParameter::type & boundaryParameter(const Dune::Intersection< GG, II > &intersection) const
return invalid value
Definition dgfug.hh:183
│ │ │ │ +
std::vector< double > & parameter(const typename Grid::template Codim< dimension >::Entity &vertex)
return parameter for vertex
Definition dgfug.hh:165
│ │ │ │ +
DGFGridFactory(const std::string &filename, MPICommunicatorType comm=MPIHelper::getCommunicator())
constructor taking filename
Definition dgfug.hh:102
│ │ │ │ +
MPIHelper::MPICommunicator MPICommunicatorType
MPI communicator type.
Definition dgfug.hh:89
│ │ │ │ +
int numParameters(const Entity &) const
return number of parameters
Definition dgfug.hh:148
│ │ │ │ +
int boundaryId(const Dune::Intersection< GG, II > &intersection) const
will return boundary segment index
Definition dgfug.hh:129
│ │ │ │ +
UGGrid< dim > Grid
grid type
Definition dgfug.hh:85
│ │ │ │ +
bool wasInserted(const Dune::Intersection< GG, II > &intersection) const
please doc me
Definition dgfug.hh:122
│ │ │ │ +
DGFGridFactory(std::istream &input, MPICommunicatorType comm=MPIHelper::getCommunicator())
constructor taking istream
Definition dgfug.hh:92
│ │ │ │ +
int numParameters() const
return number of parameters
Definition dgfug.hh:136
│ │ │ │ +
bool haveBoundaryParameters() const
UGGrid does not support boundary parameters.
Definition dgfug.hh:176
│ │ │ │ +
std::vector< double > & parameter(const typename Grid::template Codim< 0 >::Entity &element)
return parameter for codim 0 entity
Definition dgfug.hh:154
│ │ │ │ +
Grid * grid()
return grid
Definition dgfug.hh:115
│ │ │ │ +
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:208
│ │ │ │ + │ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,168 +2,394 @@ │ │ │ │ │ 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 │ │ │ │ │ +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 © 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 │ │ │ │ │ -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{ │ │ │ │ │ -22 │ │ │ │ │ -23 namespace VTK { │ │ │ │ │ -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; │ │ │ │ │ -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; │ │ │ │ │ +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 │ │ │ │ │ +14//- dune-common includes │ │ │ │ │ +15#include │ │ │ │ │ +16#include │ │ │ │ │ +17#include │ │ │ │ │ +18 │ │ │ │ │ +19//- dune-grid includes │ │ │ │ │ +20#include // HAVE_DUNE_UGGRID │ │ │ │ │ +21#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> │ │ │ │ │ +22#include <_d_u_n_e_/_g_r_i_d_/_u_g_g_r_i_d_._h_h> │ │ │ │ │ +23 │ │ │ │ │ +24//- local includes │ │ │ │ │ +25#include "_d_g_f_p_a_r_s_e_r_._h_h" │ │ │ │ │ +26#include "_b_l_o_c_k_s_/_g_r_i_d_p_a_r_a_m_e_t_e_r_._h_h" │ │ │ │ │ +27 │ │ │ │ │ +28 │ │ │ │ │ +29namespace _D_u_n_e │ │ │ │ │ +30{ │ │ │ │ │ +31 │ │ │ │ │ +32 namespace dgf │ │ │ │ │ +33 { │ │ │ │ │ +34 │ │ │ │ │ +35 // UGGridParameterBlock │ │ │ │ │ +36 // -------------------- │ │ │ │ │ +37 │ │ │ │ │ +_3_8 struct _U_G_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 { │ │ │ │ │ +42 explicit _U_G_G_r_i_d_P_a_r_a_m_e_t_e_r_B_l_o_c_k ( std::istream &input ); │ │ │ │ │ +43 │ │ │ │ │ +_4_5 bool _n_o_C_l_o_s_u_r_e () const { return _n_o_C_l_o_s_u_r_e__; } │ │ │ │ │ +_4_7 bool _n_o_C_o_p_y () const { return _n_o_C_o_p_y__; } │ │ │ │ │ +_4_9 size_t _h_e_a_p_S_i_z_e () const { return _h_e_a_p_S_i_z_e__; } │ │ │ │ │ +50 │ │ │ │ │ +51 protected: │ │ │ │ │ +_5_2 bool _n_o_C_l_o_s_u_r_e__; // no closure for UGGrid │ │ │ │ │ +_5_3 bool _n_o_C_o_p_y__; // no copies for UGGrid │ │ │ │ │ +_5_4 size_t _h_e_a_p_S_i_z_e__; // heap size for UGGrid │ │ │ │ │ +55 }; │ │ │ │ │ +56 │ │ │ │ │ +57 } // namespace dgf │ │ │ │ │ +58 │ │ │ │ │ +59 │ │ │ │ │ +60 │ │ │ │ │ +61#if HAVE_DUNE_UGGRID │ │ │ │ │ +62 template< int dim > │ │ │ │ │ +_6_3 struct _D_G_F_G_r_i_d_I_n_f_o< _U_G_G_r_i_d< dim > > │ │ │ │ │ +64 { │ │ │ │ │ +_6_5 static int _r_e_f_i_n_e_S_t_e_p_s_F_o_r_H_a_l_f () │ │ │ │ │ +66 { │ │ │ │ │ +67 return 1; │ │ │ │ │ +68 } │ │ │ │ │ 69 │ │ │ │ │ -_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; │ │ │ │ │ +_7_0 static double _r_e_f_i_n_e_W_e_i_g_h_t () │ │ │ │ │ +71 { │ │ │ │ │ +72 return -1.; │ │ │ │ │ +73 } │ │ │ │ │ +74 }; │ │ │ │ │ +75 │ │ │ │ │ 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; │ │ │ │ │ +77 │ │ │ │ │ +78 // DGFGridFactory< UGGrid< dim > > │ │ │ │ │ +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 *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 │ │ │ │ │ +81 template< int dim > │ │ │ │ │ +_8_2 struct _D_G_F_G_r_i_d_F_a_c_t_o_r_y< _U_G_G_r_i_d< dim > > │ │ │ │ │ +83 { │ │ │ │ │ +_8_5 typedef _U_G_G_r_i_d_<_ _d_i_m_ _> _G_r_i_d; │ │ │ │ │ +_8_7 static const int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ +_8_9 typedef MPIHelper::MPICommunicator _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e; │ │ │ │ │ +90 │ │ │ │ │ +_9_2 explicit _D_G_F_G_r_i_d_F_a_c_t_o_r_y ( std::istream &input, │ │ │ │ │ +93 _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e comm = MPIHelper::getCommunicator() ) │ │ │ │ │ +94 : grid_( 0 ), │ │ │ │ │ +95 factory_(), │ │ │ │ │ +96 dgf_( rank( comm ), size( comm ) ) │ │ │ │ │ +97 { │ │ │ │ │ +98 generate( input ); │ │ │ │ │ +99 } │ │ │ │ │ +100 │ │ │ │ │ +_1_0_2 explicit _D_G_F_G_r_i_d_F_a_c_t_o_r_y ( const std::string &filename, │ │ │ │ │ +103 _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e comm = MPIHelper::getCommunicator() ) │ │ │ │ │ +104 : grid_( 0 ), │ │ │ │ │ +105 factory_(), │ │ │ │ │ +106 dgf_( rank( comm ), size( comm ) ) │ │ │ │ │ +107 { │ │ │ │ │ +108 std::ifstream input( filename.c_str() ); │ │ │ │ │ +109 if ( !input ) │ │ │ │ │ +110 DUNE_THROW( _D_G_F_E_x_c_e_p_t_i_o_n, "Error: Macrofile " << filename << " not found" │ │ │ │ │ +); │ │ │ │ │ +111 generate( input ); │ │ │ │ │ +112 } │ │ │ │ │ +113 │ │ │ │ │ +_1_1_5 _G_r_i_d *_g_r_i_d () │ │ │ │ │ +116 { │ │ │ │ │ +117 return grid_; │ │ │ │ │ +118 } │ │ │ │ │ +119 │ │ │ │ │ +121 template< class GG, class II > │ │ │ │ │ +_1_2_2 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 │ │ │ │ │ +123 { │ │ │ │ │ +124 return factory_.wasInserted( intersection ); │ │ │ │ │ +125 } │ │ │ │ │ 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 │ │ │ │ │ +128 template< class GG, class II > │ │ │ │ │ +_1_2_9 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 │ │ │ │ │ +130 { │ │ │ │ │ +131 return intersection._b_o_u_n_d_a_r_y_S_e_g_m_e_n_t_I_n_d_e_x(); │ │ │ │ │ +132 } │ │ │ │ │ +133 │ │ │ │ │ +135 template< int codim > │ │ │ │ │ +_1_3_6 int _n_u_m_P_a_r_a_m_e_t_e_r_s () const │ │ │ │ │ +137 { │ │ │ │ │ +138 if( codim == 0 ) │ │ │ │ │ +139 return dgf_.nofelparams; │ │ │ │ │ +140 else if( codim == _d_i_m_e_n_s_i_o_n ) │ │ │ │ │ +141 return dgf_.nofvtxparams; │ │ │ │ │ +142 else │ │ │ │ │ +143 return 0; │ │ │ │ │ +144 } │ │ │ │ │ +145 │ │ │ │ │ +147 template< class Entity > │ │ │ │ │ +_1_4_8 int _n_u_m_P_a_r_a_m_e_t_e_r_s ( const _E_n_t_i_t_y & ) const │ │ │ │ │ +149 { │ │ │ │ │ +150 return numParameters< Entity::codimension >(); │ │ │ │ │ +151 } │ │ │ │ │ +152 │ │ │ │ │ +_1_5_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< 0 │ │ │ │ │ +>::Entity &element ) │ │ │ │ │ +155 { │ │ │ │ │ +156 if( numParameters< 0 >() <= 0 ) │ │ │ │ │ +157 { │ │ │ │ │ +158 DUNE_THROW( InvalidStateException, │ │ │ │ │ +159 "Calling DGFGridFactory::parameter is only allowed if there are │ │ │ │ │ +parameters." ); │ │ │ │ │ +160 } │ │ │ │ │ +161 return dgf_.elParams[ factory_.insertionIndex( element ) ]; │ │ │ │ │ +162 } │ │ │ │ │ +163 │ │ │ │ │ +_1_6_5 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 ) │ │ │ │ │ +166 { │ │ │ │ │ +167 if( numParameters< dimension >() <= 0 ) │ │ │ │ │ +168 { │ │ │ │ │ +169 DUNE_THROW( InvalidStateException, │ │ │ │ │ +170 "Calling DGFGridFactory::parameter is only allowed if there are │ │ │ │ │ +parameters." ); │ │ │ │ │ +171 } │ │ │ │ │ +172 return dgf_.vtxParams[ factory_.insertionIndex( vertex ) ]; │ │ │ │ │ +173 } │ │ │ │ │ +174 │ │ │ │ │ +_1_7_6 bool _h_a_v_e_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_s () const │ │ │ │ │ +177 { │ │ │ │ │ +178 return dgf_.haveBndParameters; │ │ │ │ │ +179 } │ │ │ │ │ +180 │ │ │ │ │ +182 template< class GG, class II > │ │ │ │ │ +_1_8_3 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 │ │ │ │ │ +184 { │ │ │ │ │ +185 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; │ │ │ │ │ +186 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(); │ │ │ │ │ +187 const int face = intersection._i_n_d_e_x_I_n_I_n_s_i_d_e(); │ │ │ │ │ +188 │ │ │ │ │ +189 auto refElem = referenceElement< double, dimension >( entity.type() ); │ │ │ │ │ +190 int corners = refElem.size( face, 1, _d_i_m_e_n_s_i_o_n ); │ │ │ │ │ +191 std::vector< unsigned int > bound( corners ); │ │ │ │ │ +192 for( int i = 0; i < corners; ++i ) │ │ │ │ │ +193 { │ │ │ │ │ +194 const int k = refElem.subEntity( face, 1, i, _d_i_m_e_n_s_i_o_n ); │ │ │ │ │ +195 bound[ i ] = factory_.insertionIndex( entity.template subEntity< dimension │ │ │ │ │ +>( k ) ); │ │ │ │ │ +196 } │ │ │ │ │ +197 │ │ │ │ │ +198 DuneGridFormatParser::facemap_t::key_type key( bound, false ); │ │ │ │ │ +199 const DuneGridFormatParser::facemap_t::const_iterator pos = │ │ │ │ │ +dgf_.facemap.find( key ); │ │ │ │ │ +200 if( pos != dgf_.facemap.end() ) │ │ │ │ │ +201 return dgf_.facemap.find( key )->second.second; │ │ │ │ │ +202 else │ │ │ │ │ +203 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(); │ │ │ │ │ +204 } │ │ │ │ │ +205 │ │ │ │ │ +206 private: │ │ │ │ │ +207 // create grid │ │ │ │ │ +208 void generate ( std::istream &input ); │ │ │ │ │ +209 │ │ │ │ │ +210 // return rank │ │ │ │ │ +211 static int rank( _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e MPICOMM ) │ │ │ │ │ +212 { │ │ │ │ │ +213 int rank = 0; │ │ │ │ │ +214#if HAVE_MPI │ │ │ │ │ +215 MPI_Comm_rank( MPICOMM, &rank ); │ │ │ │ │ +216#endif │ │ │ │ │ +217 return rank; │ │ │ │ │ +218 } │ │ │ │ │ +219 │ │ │ │ │ +220 // return size │ │ │ │ │ +221 static int size( _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e MPICOMM ) │ │ │ │ │ +222 { │ │ │ │ │ +223 int size = 1; │ │ │ │ │ +224#if HAVE_MPI │ │ │ │ │ +225 MPI_Comm_size( MPICOMM, &size ); │ │ │ │ │ +226#endif │ │ │ │ │ +227 return size; │ │ │ │ │ +228 } │ │ │ │ │ +229 │ │ │ │ │ +230 _G_r_i_d *grid_; │ │ │ │ │ +231 GridFactory< UGGrid< dim > > factory_; │ │ │ │ │ +232 DuneGridFormatParser dgf_; │ │ │ │ │ +233 }; │ │ │ │ │ +234#endif // #if HAVE_DUNE_UGGRID │ │ │ │ │ +235 │ │ │ │ │ +236} // namespace Dune │ │ │ │ │ +237 │ │ │ │ │ +238#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_:_:_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_:_:_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:40 │ │ │ │ │ +_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:49 │ │ │ │ │ +_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: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_:_:_h_e_a_p_S_i_z_e__ │ │ │ │ │ +size_t heapSize_ │ │ │ │ │ +DDeeffiinniittiioonn dgfug.hh:54 │ │ │ │ │ +_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: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_:_:_n_o_C_o_p_y │ │ │ │ │ +bool noCopy() const │ │ │ │ │ +returns true if no copies are made for UGGrid elements │ │ │ │ │ +DDeeffiinniittiioonn dgfug.hh:47 │ │ │ │ │ +_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:45 │ │ │ │ │ +_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:70 │ │ │ │ │ +_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:65 │ │ │ │ │ +_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:183 │ │ │ │ │ +_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:165 │ │ │ │ │ +_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:102 │ │ │ │ │ +_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:89 │ │ │ │ │ +_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:148 │ │ │ │ │ +_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:129 │ │ │ │ │ +_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:85 │ │ │ │ │ +_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:122 │ │ │ │ │ +_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:92 │ │ │ │ │ +_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:136 │ │ │ │ │ +_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:176 │ │ │ │ │ +_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:154 │ │ │ │ │ +_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:115 │ │ │ │ │ +_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:208 │ │ │ │ │ +_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/a00944.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: boundarywriter.hh File Reference │ │ │ │ +dune-grid: macrogrid.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,44 +65,40 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
boundarywriter.hh File Reference
│ │ │ │ +
macrogrid.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 <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::VTK::NonConformingBoundaryWriter< GV >
class  Dune::MacroGrid
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::VTK
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,27 +2,23 @@ │ │ │ │ │ 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> │ │ │ │ │ +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_:_:_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_ _> │ │ │ │ │ +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_:_:_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: macrogrid.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,116 +70,118 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
boundarywriter.hh
│ │ │ │ +
macrogrid.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │ +
5#ifndef DUNE_DGF_MACROGRID_HH
│ │ │ │ +
6#define DUNE_DGF_MACROGRID_HH
│ │ │ │ +
7
│ │ │ │
8
│ │ │ │ -
9#include <memory>
│ │ │ │ -
10#include <string>
│ │ │ │ -
11
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
15
│ │ │ │ -
16namespace Dune {
│ │ │ │ -
19
│ │ │ │ -
20 namespace VTK {
│ │ │ │ -
21
│ │ │ │ -
22 template<typename GV>
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
25 public BasicWriter<NonConformingBoundaryIteratorFactory<GV> >
│ │ │ │ -
26 {
│ │ │ │ - │ │ │ │ - │ │ │ │ +
9#include <iostream>
│ │ │ │ +
10
│ │ │ │ +
11#include <dune/common/parallel/mpihelper.hh>
│ │ │ │ + │ │ │ │ +
13
│ │ │ │ +
14
│ │ │ │ +
15namespace Dune
│ │ │ │ +
16{
│ │ │ │ +
17 // forward declarations
│ │ │ │ +
18 // --------------------
│ │ │ │ +
19 class DuneGridFormatParser;
│ │ │ │ +
20
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
22 : protected DuneGridFormatParser
│ │ │ │ +
23 {
│ │ │ │ +
24 template< class GridType >
│ │ │ │ +
25 friend struct DGFGridFactory;
│ │ │ │ +
26
│ │ │ │ +
27 public:
│ │ │ │ +
28 typedef MPIHelper::MPICommunicator MPICommunicatorType;
│ │ │ │
29
│ │ │ │ -
30 const GV& gv;
│ │ │ │ -
31
│ │ │ │ -
32 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
34 : Factory(gv_), Base(static_cast<const Factory&>(*this)), gv(gv_)
│ │ │ │ -
35 { }
│ │ │ │ +
30 protected:
│ │ │ │ +
│ │ │ │ +
32 MacroGrid(const char* filename, MPICommunicatorType MPICOMM = MPIHelper::getCommunicator())
│ │ │ │ +
33 : DuneGridFormatParser( rank(MPICOMM), size(MPICOMM) )
│ │ │ │ +
34 , filename_(filename)
│ │ │ │ +
35 , MPICOMM_(MPICOMM) {}
│ │ │ │
│ │ │ │
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.
│ │ │ │ +
│ │ │ │ +
38 MacroGrid(MPICommunicatorType MPICOMM = MPIHelper::getCommunicator())
│ │ │ │ +
39 : DuneGridFormatParser( rank(MPICOMM), size(MPICOMM) )
│ │ │ │ +
40 , filename_(0)
│ │ │ │ +
41 , MPICOMM_(MPICOMM) {}
│ │ │ │ +
│ │ │ │ +
42
│ │ │ │ +
44 template <class GridType>
│ │ │ │ +
│ │ │ │ +
45 inline GridType * createGrid ()
│ │ │ │ +
46 {
│ │ │ │ +
47 return Impl<GridType>::generate(*this,filename_,MPICOMM_);
│ │ │ │ +
48 }
│ │ │ │ +
│ │ │ │ +
49 private:
│ │ │ │ +
50 static int rank( [[maybe_unused]] MPICommunicatorType MPICOMM )
│ │ │ │ +
51 {
│ │ │ │ +
52 int rank = 0;
│ │ │ │ +
53#if HAVE_MPI
│ │ │ │ +
54 MPI_Comm_rank( MPICOMM, &rank );
│ │ │ │ +
55#endif
│ │ │ │ +
56 return rank;
│ │ │ │ +
57 }
│ │ │ │ +
58 static int size( [[maybe_unused]] MPICommunicatorType MPICOMM )
│ │ │ │ +
59 {
│ │ │ │ +
60 int size = 1;
│ │ │ │ +
61#if HAVE_MPI
│ │ │ │ +
62 MPI_Comm_size( MPICOMM, &size );
│ │ │ │ +
63#endif
│ │ │ │ +
64 return size;
│ │ │ │ +
65 }
│ │ │ │ +
77 template< class GridType >
│ │ │ │ +
78 struct Impl
│ │ │ │ +
79 {
│ │ │ │ +
80 static GridType* generate(MacroGrid& mg,
│ │ │ │ +
81 const char* filename, MPICommunicatorType MPICOMM = MPIHelper::getCommunicator() )
│ │ │ │ +
82 {
│ │ │ │ +
83 // make assertion depend on the template argument but always evaluate to false
│ │ │ │ +
84 static_assert( GridType::dimension<0,"DGF grid factory missing. Did you forget to add the corresponding dgf header?");
│ │ │ │ +
85 }
│ │ │ │ +
86 };
│ │ │ │ +
87
│ │ │ │ +
88 const char* filename_;
│ │ │ │ +
89 MPICommunicatorType MPICOMM_;
│ │ │ │ +
90 };
│ │ │ │ +
│ │ │ │ +
91
│ │ │ │ +
92} // end namespace Dune
│ │ │ │ +
93
│ │ │ │ +
94#endif
│ │ │ │ + │ │ │ │
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
│ │ │ │ +
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
│ │ │ │ +
The DuneGridFormatParser class: reads a DGF file and stores build information in vector structures us...
Definition parser.hh:47
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,119 +2,125 @@ │ │ │ │ │ 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 │ │ │ │ │ +macrogrid.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 © 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 │ │ │ │ │ +5#ifndef DUNE_DGF_MACROGRID_HH │ │ │ │ │ +6#define DUNE_DGF_MACROGRID_HH │ │ │ │ │ +7 │ │ │ │ │ 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 { │ │ │ │ │ -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; │ │ │ │ │ +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_/_p_a_r_s_e_r_._h_h> │ │ │ │ │ +13 │ │ │ │ │ +14 │ │ │ │ │ +15namespace _D_u_n_e │ │ │ │ │ +16{ │ │ │ │ │ +17 // forward declarations │ │ │ │ │ +18 // -------------------- │ │ │ │ │ +19 class DuneGridFormatParser; │ │ │ │ │ +20 │ │ │ │ │ +_2_1 class _M_a_c_r_o_G_r_i_d │ │ │ │ │ +22 : protected _D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r │ │ │ │ │ +23 { │ │ │ │ │ +24 template< class GridType > │ │ │ │ │ +_2_5 friend struct _D_G_F_G_r_i_d_F_a_c_t_o_r_y; │ │ │ │ │ +26 │ │ │ │ │ +27 public: │ │ │ │ │ +_2_8 typedef MPIHelper::MPICommunicator _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_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 { } │ │ │ │ │ +30 protected: │ │ │ │ │ +_3_2 _M_a_c_r_o_G_r_i_d(const char* filename, _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e MPICOMM = MPIHelper:: │ │ │ │ │ +getCommunicator()) │ │ │ │ │ +33 : _D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r( rank(MPICOMM), size(MPICOMM) ) │ │ │ │ │ +34 , filename_(filename) │ │ │ │ │ +35 , MPICOMM_(MPICOMM) {} │ │ │ │ │ 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); │ │ │ │ │ +_3_8 _M_a_c_r_o_G_r_i_d(_M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e MPICOMM = MPIHelper::getCommunicator()) │ │ │ │ │ +39 : _D_u_n_e_G_r_i_d_F_o_r_m_a_t_P_a_r_s_e_r( rank(MPICOMM), size(MPICOMM) ) │ │ │ │ │ +40 , filename_(0) │ │ │ │ │ +41 , MPICOMM_(MPICOMM) {} │ │ │ │ │ +42 │ │ │ │ │ +44 template │ │ │ │ │ +_4_5 inline GridType * _c_r_e_a_t_e_G_r_i_d () │ │ │ │ │ +46 { │ │ │ │ │ +47 return Impl::generate(*this,filename_,MPICOMM_); │ │ │ │ │ 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_a_s_i_c_w_r_i_t_e_r_._h_h │ │ │ │ │ -_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. │ │ │ │ │ +49 private: │ │ │ │ │ +50 static int rank( [[maybe_unused]] _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e MPICOMM ) │ │ │ │ │ +51 { │ │ │ │ │ +52 int rank = 0; │ │ │ │ │ +53#if HAVE_MPI │ │ │ │ │ +54 MPI_Comm_rank( MPICOMM, &rank ); │ │ │ │ │ +55#endif │ │ │ │ │ +56 return rank; │ │ │ │ │ +57 } │ │ │ │ │ +58 static int size( [[maybe_unused]] _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e MPICOMM ) │ │ │ │ │ +59 { │ │ │ │ │ +60 int size = 1; │ │ │ │ │ +61#if HAVE_MPI │ │ │ │ │ +62 MPI_Comm_size( MPICOMM, &size ); │ │ │ │ │ +63#endif │ │ │ │ │ +64 return size; │ │ │ │ │ +65 } │ │ │ │ │ +77 template< class GridType > │ │ │ │ │ +78 struct Impl │ │ │ │ │ +79 { │ │ │ │ │ +80 static GridType* generate(MacroGrid& mg, │ │ │ │ │ +81 const char* filename, _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e MPICOMM = MPIHelper:: │ │ │ │ │ +getCommunicator() ) │ │ │ │ │ +82 { │ │ │ │ │ +83 // make assertion depend on the template argument but always evaluate to │ │ │ │ │ +false │ │ │ │ │ +84 static_assert( GridType::dimension<0,"DGF grid factory missing. Did you │ │ │ │ │ +forget to add the corresponding dgf header?"); │ │ │ │ │ +85 } │ │ │ │ │ +86 }; │ │ │ │ │ +87 │ │ │ │ │ +88 const char* filename_; │ │ │ │ │ +89 _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e MPICOMM_; │ │ │ │ │ +90 }; │ │ │ │ │ +91 │ │ │ │ │ +92} // end namespace Dune │ │ │ │ │ +93 │ │ │ │ │ +94#endif │ │ │ │ │ +_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_:_:_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_:_:_M_a_c_r_o_G_r_i_d │ │ │ │ │ +DDeeffiinniittiioonn macrogrid.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_M_a_c_r_o_G_r_i_d_:_:_M_a_c_r_o_G_r_i_d │ │ │ │ │ +MacroGrid(const char *filename, MPICommunicatorType MPICOMM=MPIHelper:: │ │ │ │ │ +getCommunicator()) │ │ │ │ │ +constructor given the name of a DGF file │ │ │ │ │ +DDeeffiinniittiioonn macrogrid.hh:32 │ │ │ │ │ +_D_u_n_e_:_:_M_a_c_r_o_G_r_i_d_:_:_M_a_c_r_o_G_r_i_d │ │ │ │ │ +MacroGrid(MPICommunicatorType MPICOMM=MPIHelper::getCommunicator()) │ │ │ │ │ +constructor given the name of a DGF file │ │ │ │ │ +DDeeffiinniittiioonn macrogrid.hh:38 │ │ │ │ │ +_D_u_n_e_:_:_M_a_c_r_o_G_r_i_d_:_:_c_r_e_a_t_e_G_r_i_d │ │ │ │ │ +GridType * createGrid() │ │ │ │ │ +returns pointer to a new instance of type GridType created from a DGF file │ │ │ │ │ +DDeeffiinniittiioonn macrogrid.hh:45 │ │ │ │ │ +_D_u_n_e_:_:_M_a_c_r_o_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 │ │ │ │ │ +DDeeffiinniittiioonn macrogrid.hh:28 │ │ │ │ │ +_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 │ │ │ │ │ =============================================================================== │ │ │ │ │ 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: subsamplingvtkwriter.hh File Reference │ │ │ │ +dune-grid: entitykey.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,52 +65,44 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
subsamplingvtkwriter.hh File Reference
│ │ │ │ +
entitykey.hh 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>
│ │ │ │ +
#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::SubsamplingVTKWriter< GridView >
 Writer for the output of subsampled grid functions in the vtk format. More...
struct  Dune::DGFEntityKey< A >
 
struct  Dune::ElementFaceUtil
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

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

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,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 │ │ │ │ │ -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> │ │ │ │ │ +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_:_:_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_._._. │ │ │ │ │ +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. │ │ │ │ │   │ │ │ │ │ -********** 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/a00947_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: subsamplingvtkwriter.hh Source File │ │ │ │ +dune-grid: entitykey.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,408 +70,221 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
subsamplingvtkwriter.hh
│ │ │ │ +
entitykey.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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>
│ │ │ │ -
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;
│ │ │ │ +
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
│ │ │ │ + │ │ │ │ +
28
│ │ │ │ +
│ │ │ │ +
29 inline const A &operator[] ( int i ) const;
│ │ │ │ +
│ │ │ │ +
30 inline bool operator < ( const DGFEntityKey< A > &k ) const;
│ │ │ │ +
31
│ │ │ │ +
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 template< class A >
│ │ │ │ +
│ │ │ │ +
46 inline const A &DGFEntityKey< A > :: operator[] ( int i ) const
│ │ │ │ +
47 {
│ │ │ │ +
48 return key_[ i ];
│ │ │ │ +
49 }
│ │ │ │ +
│ │ │ │
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>)
│ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
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 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 }
│ │ │ │ -
│ │ │ │ -
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:134
│ │ │ │ -
static constexpr int dimensionworld
The dimension of the world the grid lives in.
Definition common/gridview.hh:137
│ │ │ │ +
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// include inline implementation
│ │ │ │ +
154#include "entitykey_inline.hh"
│ │ │ │ +
155#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
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
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:104
│ │ │ │ -
@ 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 output 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:1589
│ │ │ │ -
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:1613
│ │ │ │ -
std::list< VTKLocalFunction > celldata
Definition vtkwriter.hh:1588
│ │ │ │ -
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:1596
│ │ │ │ -
int ncells
Definition vtkwriter.hh:1595
│ │ │ │ -
VertexIterator vertexEnd() const
Definition vtkwriter.hh:515
│ │ │ │ -
int ncorners
Definition vtkwriter.hh:1597
│ │ │ │ -
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
│ │ │ │ +
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,527 +2,218 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ -subsamplingvtkwriter.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 © 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 │ │ │ │ │ -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; │ │ │ │ │ +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 │ │ │ │ │ +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 │ │ │ │ │ +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 │ │ │ │ │ -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 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) │ │ │ │ │ +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(); │ │ │ │ │ +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 return refinement.vBegin(intervals); │ │ │ │ │ -109 } │ │ │ │ │ -110 │ │ │ │ │ -111 SubElementIterator refinementEnd(const Refinement& refinement, Dune:: │ │ │ │ │ -RefinementIntervals intervals, IteratorSelector) │ │ │ │ │ +108 case 1 : │ │ │ │ │ +109 return 2; │ │ │ │ │ +110 case 2 : │ │ │ │ │ +111 switch( element.size() ) │ │ │ │ │ 112 { │ │ │ │ │ -113 return refinement.eEnd(intervals); │ │ │ │ │ -114 } │ │ │ │ │ -115 │ │ │ │ │ -116 SubVertexIterator refinementEnd(const Refinement& refinement, Dune:: │ │ │ │ │ -RefinementIntervals intervals, IteratorSelector) │ │ │ │ │ -117 { │ │ │ │ │ -118 return refinement.vEnd(intervals); │ │ │ │ │ +113 case 3 : │ │ │ │ │ +114 return 3; │ │ │ │ │ +115 case 4 : │ │ │ │ │ +116 return 4; │ │ │ │ │ +117 default : │ │ │ │ │ +118 return -1; │ │ │ │ │ 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); │ │ │ │ │ -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_u_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. │ │ │ │ │ -_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:134 │ │ │ │ │ -_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:137 │ │ │ │ │ +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// include 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 │ │ │ │ │ _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_:_:_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:104 │ │ │ │ │ -_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 output 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:1589 │ │ │ │ │ -_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:1613 │ │ │ │ │ -_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:1588 │ │ │ │ │ -_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:1596 │ │ │ │ │ -_D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_:_:_n_c_e_l_l_s │ │ │ │ │ -int ncells │ │ │ │ │ -DDeeffiinniittiioonn vtkwriter.hh:1595 │ │ │ │ │ -_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:1597 │ │ │ │ │ -_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_:_:_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/a00950.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: functionwriter.hh File Reference │ │ │ │ +dune-grid: dgfyasp.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,69 +65,53 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
functionwriter.hh File Reference
│ │ │ │ +
dgfyasp.hh 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>
│ │ │ │ +
#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::FunctionWriterBase< Cell_ >
 Base class for function writers. More...
class  Dune::dgf::YaspGridParameterBlock
 Grid parameters for YaspGrid. More...
 
class  Dune::VTK::VTKFunctionWriter< Func >
 Base class for function writers. More...
struct  Dune::DGFGridFactory< YaspGrid< dim, EquidistantCoordinates< ctype, dim > > >
 Grid factory for YaspGrid with equidistant coordinates. More...
 
class  Dune::VTK::CoordinatesWriter< Cell >
 writer for the Coordinates array More...
struct  Dune::DGFGridFactory< YaspGrid< dim, EquidistantOffsetCoordinates< ctype, dim > > >
 Grid factory for YaspGrid with equidistant coordinates. More...
 
class  Dune::VTK::ConformingConnectivityWriter< IteratorFactory >
 writer for the connectivity array in conforming mode More...
class  Dune::DGFGridFactory< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > >
 Placeholder for grid factory for YaspGrid with tensor product coordinates. 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...
struct  Dune::DGFGridInfo< YaspGrid< dim, Coordinates > >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::VTK
namespace  Dune::dgf
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,53 +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 │ │ │ │ │ -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> │ │ │ │ │ +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_:_:_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_:_:_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_._._. │ │ │ │ │   │ │ │ │ │ -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_._._. │ │ │ │ │ +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_._._. │ │ │ │ │   │ │ │ │ │ -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_._._. │ │ │ │ │ +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/a00950_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: functionwriter.hh Source File │ │ │ │ +dune-grid: dgfyasp.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,479 +70,619 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
functionwriter.hh
│ │ │ │ +
dgfyasp.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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>
│ │ │ │ +
5#ifndef DUNE_DGFPARSERYASP_HH
│ │ │ │ +
6#define DUNE_DGFPARSERYASP_HH
│ │ │ │ +
7
│ │ │ │ + │ │ │ │ + │ │ │ │ +
10#include "dgfparser.hh"
│ │ │ │ +
11
│ │ │ │ +
12namespace Dune
│ │ │ │ +
13{
│ │ │ │
14
│ │ │ │ -
15#include <dune/common/exceptions.hh>
│ │ │ │ -
16#include <dune/common/fvector.hh>
│ │ │ │ +
15 // External Forward Declarations
│ │ │ │ +
16 // -----------------------------
│ │ │ │
17
│ │ │ │ -
18#include <dune/geometry/referenceelements.hh>
│ │ │ │ -
19
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
18 template< class GridImp, class IntersectionImp >
│ │ │ │ +
19 class Intersection;
│ │ │ │ +
20
│ │ │ │ +
21
│ │ │ │ +
22 namespace dgf
│ │ │ │ +
23 {
│ │ │ │
24
│ │ │ │ -
25namespace Dune
│ │ │ │ -
26{
│ │ │ │ -
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;
│ │ │ │ -
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 }
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
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 }
│ │ │ │
│ │ │ │ -
76 virtual void endWrite() = 0;
│ │ │ │ - │ │ │ │ +
78
│ │ │ │
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;
│ │ │ │ -
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 }
│ │ │ │ +
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 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 VTK::Precision precision_;
│ │ │ │ -
151 std::shared_ptr<DataArrayWriter> arraywriter;
│ │ │ │ -
152
│ │ │ │ -
153 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
155 : precision_(prec)
│ │ │ │ -
156 {}
│ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ +
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 << "Transformation '" << 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 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 }
│ │ │ │ +
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 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.
│ │ │ │ +
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 << "Transformation '" << 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
│ │ │ │ -
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
│ │ │ │ +
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:122
│ │ │ │ +
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:166
│ │ │ │ +
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,577 +2,739 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ -functionwriter.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 © 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 │ │ │ │ │ +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#include │ │ │ │ │ -16#include │ │ │ │ │ +15 // External Forward Declarations │ │ │ │ │ +16 // ----------------------------- │ │ │ │ │ 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> │ │ │ │ │ +18 template< class GridImp, class IntersectionImp > │ │ │ │ │ +19 class Intersection; │ │ │ │ │ +20 │ │ │ │ │ +21 │ │ │ │ │ +22 namespace dgf │ │ │ │ │ +23 { │ │ │ │ │ 24 │ │ │ │ │ -25namespace _D_u_n_e │ │ │ │ │ -26{ │ │ │ │ │ -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; │ │ │ │ │ -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() {} │ │ │ │ │ +_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 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 │ │ │ │ │ -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(); │ │ │ │ │ +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 │ │ │ │ │ -_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 }; │ │ │ │ │ -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 _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 {} │ │ │ │ │ +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 │ │ │ │ │ -_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(); │ │ │ │ │ +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 } │ │ │ │ │ -_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; │ │ │ │ │ +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 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 */) │ │ │ │ │ +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 << "Transformation '" << 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 { │ │ │ │ │ -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(); │ │ │ │ │ +_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 │ │ │ │ │ -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. │ │ │ │ │ -_v_t_u_w_r_i_t_e_r_._h_h │ │ │ │ │ -_p_v_t_u_w_r_i_t_e_r_._h_h │ │ │ │ │ -_c_o_m_m_o_n_._h_h │ │ │ │ │ -Common stuff for the VTKWriter. │ │ │ │ │ +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 << "Transformation '" << 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_:_:_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_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:122 │ │ │ │ │ +_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:166 │ │ │ │ │ +_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/a00953.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: vtksequencewriterbase.hh File Reference │ │ │ │ +dune-grid: gridptr.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,40 +65,55 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
vtksequencewriterbase.hh File Reference
│ │ │ │ +
gridptr.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <vector>
│ │ │ │ +
#include <cassert>
│ │ │ │ +#include <cctype>
│ │ │ │ +#include <array>
│ │ │ │ #include <iostream>
│ │ │ │ -#include <sstream>
│ │ │ │ -#include <fstream>
│ │ │ │ -#include <iomanip>
│ │ │ │ +#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 <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::VTKSequenceWriterBase< GridView >
 Base class to write pvd-files which contains a list of all collected vtk-files. More...
struct  Dune::GridPtr< GridType >
 Class for constructing grids from DGF files. More...
 
class  Dune::GridPtr< GridType >::mygrid_ptr
 
struct  Dune::GridPtr< GridType >::DataHandle
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,31 +2,45 @@ │ │ │ │ │ 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 │ │ │ │ │ -vtksequencewriterbase.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ +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_/_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 <_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_:_:_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_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. │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ 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: vtksequencewriterbase.hh Source File │ │ │ │ +dune-grid: gridptr.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,209 +70,964 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
vtksequencewriterbase.hh
│ │ │ │ +
gridptr.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │ -
8
│ │ │ │ -
9#include <vector>
│ │ │ │ -
10#include <iostream>
│ │ │ │ -
11#include <sstream>
│ │ │ │ -
12#include <fstream>
│ │ │ │ -
13#include <iomanip>
│ │ │ │ +
5#ifndef DUNE_DGF_GRIDPTR_HH
│ │ │ │ +
6#define DUNE_DGF_GRIDPTR_HH
│ │ │ │ +
7
│ │ │ │ +
8#include <cassert>
│ │ │ │ +
9#include <cctype>
│ │ │ │ +
10
│ │ │ │ +
11#include <array>
│ │ │ │ +
12#include <iostream>
│ │ │ │ +
13#include <map>
│ │ │ │
14#include <memory>
│ │ │ │ -
15
│ │ │ │ - │ │ │ │ -
17#include <dune/common/path.hh>
│ │ │ │ +
15#include <string>
│ │ │ │ +
16#include <type_traits>
│ │ │ │ +
17#include <vector>
│ │ │ │
18
│ │ │ │ - │ │ │ │ -
20
│ │ │ │ -
21namespace Dune {
│ │ │ │ +
19//- Dune includes
│ │ │ │ +
20#include <dune/common/parallel/mpihelper.hh>
│ │ │ │ +
21#include <dune/common/shared_ptr.hh>
│ │ │ │
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 }
│ │ │ │ -
│ │ │ │ -
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.
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
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 // assignment 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:177
│ │ │ │ +
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 output of grid functions in the vtk format.
Definition vtkwriter.hh:95
│ │ │ │ +
constexpr All all
PartitionSet for all partitions.
Definition partitionset.hh:295
│ │ │ │ +
constexpr InteriorBorder interiorBorder
PartitionSet for the interior and border partitions.
Definition partitionset.hh:286
│ │ │ │ +
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:181
│ │ │ │ +
Provide a generic factory class for unstructured grids.
Definition common/gridfactory.hh:275
│ │ │ │ +
virtual std::unique_ptr< GridType > createGrid()
Finalize grid creation and hand over the grid.
Definition common/gridfactory.hh:333
│ │ │ │ +
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:937
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,235 +2,1132 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ -vtksequencewriterbase.hh │ │ │ │ │ + * _d_g_f_p_a_r_s_e_r │ │ │ │ │ +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 © 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 │ │ │ │ │ -8 │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11#include │ │ │ │ │ -12#include │ │ │ │ │ -13#include │ │ │ │ │ +5#ifndef DUNE_DGF_GRIDPTR_HH │ │ │ │ │ +6#define DUNE_DGF_GRIDPTR_HH │ │ │ │ │ +7 │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10 │ │ │ │ │ +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 │ │ │ │ │ +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_/_v_t_k_w_r_i_t_e_r_._h_h> │ │ │ │ │ -20 │ │ │ │ │ -21namespace _D_u_n_e { │ │ │ │ │ +19//- Dune includes │ │ │ │ │ +20#include │ │ │ │ │ +21#include │ │ │ │ │ 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) │ │ │ │ │ -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(); │ │ │ │ │ +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 // assignment 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 │ │ │ │ │ -_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 │ │ │ │ │ +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 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. │ │ │ │ │ +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 ) │ │ │ │ │ +) │ │ │ │ │ +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 │ │ │ │ │ +_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_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 │ │ │ │ │ +_g_m_s_h_r_e_a_d_e_r_._h_h │ │ │ │ │ +_p_a_r_s_e_r_._h_h │ │ │ │ │ +_e_n_t_i_t_y_k_e_y_._h_h │ │ │ │ │ +_d_g_f_e_x_c_e_p_t_i_o_n_._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:177 │ │ │ │ │ +_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 output of grid functions in the vtk format. │ │ │ │ │ -DDeeffiinniittiioonn vtkwriter.hh:95 │ │ │ │ │ +_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:295 │ │ │ │ │ +_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:286 │ │ │ │ │ +_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:181 │ │ │ │ │ +_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:275 │ │ │ │ │ +_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:333 │ │ │ │ │ +_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:937 │ │ │ │ │ +_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/a00956.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.

│ │ │ │

│ │ │ │ Namespaces

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

│ │ │ │ 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/a00956_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 © 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 © 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/a00959.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: skeletonfunction.hh File Reference │ │ │ │ +dune-grid: entitykey_inline.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,59 +65,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ Namespaces
│ │ │ │ -
skeletonfunction.hh File Reference
│ │ │ │ +
entitykey_inline.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ -

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>
│ │ │ │ +
#include <algorithm>
│ │ │ │ +#include <dune/geometry/referenceelements.hh>
│ │ │ │ +#include <dune/grid/io/file/dgfparser/entitykey.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::VTK
 
│ │ │ │ -

Detailed Description

│ │ │ │ -

Functions for VTK output on the skeleton.

│ │ │ │ -
Author
Jö Fahlke
│ │ │ │ -
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ │ @@ -1 +1 @@ │ │ │ │ │ -utf-8 │ │ │ │ │ +us-ascii │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,41 +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 │ │ │ │ │ -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> │ │ │ │ │ + * _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 │ │ │ │ │ -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_:_:_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/a00959_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: skeletonfunction.hh Source File │ │ │ │ +dune-grid: entitykey_inline.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,189 +70,230 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
skeletonfunction.hh
│ │ │ │ +
entitykey_inline.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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>
│ │ │ │ +
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
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
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 };
│ │ │ │ -
│ │ │ │ +
15 // DGFEntityKey
│ │ │ │ +
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];
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
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 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 { }
│ │ │ │ -
│ │ │ │ -
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 }
│ │ │ │ +
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
│ │ │ │ -
│ │ │ │ -
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
│ │ │ │ +
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
│ │ │ │ -
144} // namespace Dune
│ │ │ │ -
145
│ │ │ │ -
146#endif // DUNE_GRID_IO_FILE_VTK_SKELETONFUNCTION_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ +
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,233 +2,209 @@ │ │ │ │ │ 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 │ │ │ │ │ +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 © 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 │ │ │ │ │ +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#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 }; │ │ │ │ │ +15 // DGFEntityKey │ │ │ │ │ +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 ) │ │ │ │ │ +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_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 // │ │ │ │ │ +49 template< class A > │ │ │ │ │ +_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 │ │ │ │ │ -_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 { } │ │ │ │ │ -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 } │ │ │ │ │ +75 │ │ │ │ │ +76 template< class A > │ │ │ │ │ +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 │ │ │ │ │ -_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 │ │ │ │ │ +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} // namespace Dune │ │ │ │ │ -145 │ │ │ │ │ -146#endif // DUNE_GRID_IO_FILE_VTK_SKELETONFUNCTION_HH │ │ │ │ │ -_v_t_u_w_r_i_t_e_r_._h_h │ │ │ │ │ -_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 │ │ │ │ │ +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_:_:_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 │ │ │ │ │ +_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/a00962.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: gmshwriter.hh File Reference │ │ │ │ +dune-grid: printgrid.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,43 +70,39 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
gmshwriter.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Functions
│ │ │ │ +
printgrid.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include <fstream>
│ │ │ │ -#include <iostream>
│ │ │ │ -#include <iomanip>
│ │ │ │ #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/parallel/mpihelper.hh>
│ │ │ │ +#include <dune/grid/common/mcmgmapper.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ -Classes

class  Dune::GmshWriter< GridView >
 Write Gmsh mesh file. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ │ 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.
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,30 +2,29 @@ │ │ │ │ │ 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 │ │ │ │ │ -gmshwriter.hh File Reference │ │ │ │ │ +_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 │ │ │ │ │ #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 │ │ │ │ │ #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_:_:_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. │ │ │ │ │   │ │ │ │ │ +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/a00962_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: gmshwriter.hh Source File │ │ │ │ +dune-grid: printgrid.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,236 +74,222 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
gmshwriter.hh
│ │ │ │ +
printgrid.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │ +
5#ifndef DUNE_PRINTGRID_HH
│ │ │ │ +
6#define DUNE_PRINTGRID_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 {
│ │ │ │ -
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 }
│ │ │ │ +
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 // 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 } catch(Exception& e) {
│ │ │ │ -
154 file.close();
│ │ │ │ -
155 throw;
│ │ │ │ -
156 }
│ │ │ │ -
157 }
│ │ │ │ -
158 }
│ │ │ │ +
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
│ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ +
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
│ │ │ │ -
│ │ │ │ -
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 };
│ │ │ │ +
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 }
│ │ │ │
│ │ │ │ -
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:177
│ │ │ │ -
int size(int codim) const
obtain number of entities in a given codimension
Definition common/gridview.hh:183
│ │ │ │ -
static constexpr int dimension
The dimension of the grid.
Definition common/gridview.hh:134
│ │ │ │ -
static constexpr int dimensionworld
The dimension of the world the grid lives in.
Definition common/gridview.hh:137
│ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ +
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
│ │ │ │ -
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,292 +2,259 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ -gmshwriter.hh │ │ │ │ │ +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 © 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 │ │ │ │ │ +5#ifndef DUNE_PRINTGRID_HH │ │ │ │ │ +6#define DUNE_PRINTGRID_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 { │ │ │ │ │ -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 ++counter; │ │ │ │ │ -148 file << std::endl; │ │ │ │ │ -149 } │ │ │ │ │ -150 } │ │ │ │ │ -151 } │ │ │ │ │ +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 // 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 } catch(Exception& e) { │ │ │ │ │ -154 file.close(); │ │ │ │ │ -155 throw; │ │ │ │ │ -156 } │ │ │ │ │ -157 } │ │ │ │ │ +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 │ │ │ │ │ -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 } │ │ │ │ │ +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 │ │ │ │ │ -_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 │ │ │ │ │ +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_:_:_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:177 │ │ │ │ │ -_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:183 │ │ │ │ │ -_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:134 │ │ │ │ │ -_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:137 │ │ │ │ │ _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_:_:_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_:_:_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_:_:_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/a00965.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: printgrid.hh File Reference │ │ │ │ +dune-grid: vtk.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -69,41 +69,29 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
│ │ │ │ -Namespaces | │ │ │ │ -Functions
│ │ │ │ -
printgrid.hh File Reference
│ │ │ │ +
vtk.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <fstream>
│ │ │ │ -#include <string>
│ │ │ │ -#include <dune/common/exceptions.hh>
│ │ │ │ -#include <dune/common/parallel/mpihelper.hh>
│ │ │ │ -#include <dune/grid/common/mcmgmapper.hh>
│ │ │ │ + │ │ │ │ +

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

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

│ │ │ │ +

Convenience header which includes all available VTK writers.

│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,29 +2,19 @@ │ │ │ │ │ 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> │ │ │ │ │ +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_. │ │ │ │ │ -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 ********** │ │ │ │ │ +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/a00965_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: printgrid.hh Source File │ │ │ │ +dune-grid: vtk.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,222 +74,37 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
printgrid.hh
│ │ │ │ +
vtk.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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 {
│ │ │ │ +
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 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 // 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 }
│ │ │ │ -
│ │ │ │ -
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
│ │ │ │ -
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
│ │ │ │ +
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.
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,259 +2,34 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ -printgrid.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 © 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 { │ │ │ │ │ +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 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 // 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_:_:_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 │ │ │ │ │ +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. │ │ │ │ │ +_b_o_u_n_d_a_r_y_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. │ │ │ │ │ +_v_o_l_u_m_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/a00968.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: starcdreader.hh File Reference │ │ │ │ +dune-grid: gnuplot.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,45 +65,39 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ Namespaces
│ │ │ │ -
starcdreader.hh File Reference
│ │ │ │ +
gnuplot.cc File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/common/exceptions.hh>
│ │ │ │ -#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/grid/common/gridfactory.hh>
│ │ │ │ -#include <iostream>
│ │ │ │ -#include <fstream>
│ │ │ │ -#include <memory>
│ │ │ │ + │ │ │ │ +

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

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

Go to the source code of this file.

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

│ │ │ │ -Classes

class  Dune::StarCDReader< GridType >
 File reader for the Star-CD format. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

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

Detailed Description

│ │ │ │ +

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

│ │ │ │ +
Author
Christian Engwer
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,26 +2,23 @@ │ │ │ │ │ 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 │ │ │ │ │ -starcdreader.hh File Reference │ │ │ │ │ -#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 │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ + * _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_. │ │ │ │ │ -CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_S_t_a_r_C_D_R_e_a_d_e_r_<_ _G_r_i_d_T_y_p_e_ _> │ │ │ │ │ -  File reader for the Star-CD format. _M_o_r_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 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00968_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: starcdreader.hh Source File │ │ │ │ +dune-grid: gnuplot.cc Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,180 +70,136 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
starcdreader.hh
│ │ │ │ +
gnuplot.cc
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_STARCD_READER_HH
│ │ │ │ -
6#define DUNE_STARCD_READER_HH
│ │ │ │ -
7
│ │ │ │ -
8#include <dune/common/exceptions.hh>
│ │ │ │ -
9
│ │ │ │ -
10#include <dune/geometry/type.hh>
│ │ │ │ - │ │ │ │ -
12#include <iostream>
│ │ │ │ -
13#include <fstream>
│ │ │ │ -
14#include <memory>
│ │ │ │ -
15
│ │ │ │ -
16namespace Dune {
│ │ │ │ -
17
│ │ │ │ -
51 template <class GridType>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
53
│ │ │ │ -
54 public:
│ │ │ │ -
55
│ │ │ │ -
│ │ │ │ -
65 static std::unique_ptr<GridType> read(const std::string& fileName, bool verbose = true)
│ │ │ │ -
66 {
│ │ │ │ -
67 // extract the grid dimension
│ │ │ │ -
68 const int dim = GridType::dimension;
│ │ │ │ -
69
│ │ │ │ -
70 // currently only dim = 3 is implemented
│ │ │ │ -
71 if (dim != 3)
│ │ │ │ -
72 DUNE_THROW(Dune::NotImplemented,
│ │ │ │ -
73 "Reading Star-CD format is not implemented for dimension " << dim);
│ │ │ │ -
74
│ │ │ │ -
75 // set up the grid factory
│ │ │ │ - │ │ │ │ -
77
│ │ │ │ -
78 // set the name of the vertex file
│ │ │ │ -
79 std::string vertexFileName = fileName + ".vrt";
│ │ │ │ -
80
│ │ │ │ -
81 // set the vertex input stream
│ │ │ │ -
82 std::ifstream vertexFile(vertexFileName.c_str());
│ │ │ │ -
83 if (!vertexFile)
│ │ │ │ -
84 DUNE_THROW(Dune::IOError, "Could not open " << vertexFileName);
│ │ │ │ -
85
│ │ │ │ -
86 // read the vertices
│ │ │ │ -
87 int dummyIdx;
│ │ │ │ -
88 int numberOfVertices = 0;
│ │ │ │ -
89 while (vertexFile >> dummyIdx) {
│ │ │ │ -
90 numberOfVertices++;
│ │ │ │ -
91
│ │ │ │ -
92 Dune::FieldVector<double,dim> position;
│ │ │ │ -
93
│ │ │ │ -
94 for (int k = 0; k < dim; k++)
│ │ │ │ -
95 vertexFile >> position[k];
│ │ │ │ -
96
│ │ │ │ -
97 factory.insertVertex(position);
│ │ │ │ -
98 }
│ │ │ │ -
99 if (verbose)
│ │ │ │ -
100 std::cout << numberOfVertices << " vertices read." << std::endl;
│ │ │ │ -
101
│ │ │ │ -
102 // set the name of the element file
│ │ │ │ -
103 std::string elementFileName = fileName + ".cel";
│ │ │ │ -
104
│ │ │ │ -
105 // set the element input stream
│ │ │ │ -
106 std::ifstream elementFile(elementFileName.c_str());
│ │ │ │ -
107 if (!elementFile)
│ │ │ │ -
108 DUNE_THROW(Dune::IOError, "Could not open " << elementFileName);
│ │ │ │ -
109
│ │ │ │ -
110 // read the elements
│ │ │ │ -
111 int numberOfElements = 0;
│ │ │ │ -
112 int numberOfSimplices = 0;
│ │ │ │ -
113 int numberOfPyramids = 0;
│ │ │ │ -
114 int numberOfPrisms = 0;
│ │ │ │ -
115 int numberOfCubes = 0;;
│ │ │ │ -
116 int maxNumberOfVertices = (int)pow(2, dim);
│ │ │ │ -
117 int isVolume = 1;
│ │ │ │ -
118 while (elementFile >> dummyIdx) {
│ │ │ │ -
119 std::vector<unsigned int> vertices(maxNumberOfVertices);
│ │ │ │ -
120 for (int k = 0; k < maxNumberOfVertices; k++)
│ │ │ │ -
121 elementFile >> vertices[k];
│ │ │ │ -
122
│ │ │ │ -
123 int boundaryId;
│ │ │ │ -
124 elementFile >> boundaryId;
│ │ │ │ -
125
│ │ │ │ -
126 int volumeOrSurface[2];
│ │ │ │ -
127 elementFile >> volumeOrSurface[0] >> volumeOrSurface[1];
│ │ │ │ -
128
│ │ │ │ -
129 if (volumeOrSurface[0] == isVolume) {
│ │ │ │ -
130 numberOfElements++;
│ │ │ │ -
131
│ │ │ │ -
132 if (vertices[2] == vertices[3]) { // simplex or prism
│ │ │ │ -
133 if (vertices[4] == vertices[5]) { // simplex
│ │ │ │ -
134 numberOfSimplices++;
│ │ │ │ -
135 std::vector<unsigned int> simplexVertices(4);
│ │ │ │ -
136 for (int k = 0; k < 3; k++)
│ │ │ │ -
137 simplexVertices[k] = vertices[k] - 1;
│ │ │ │ -
138 simplexVertices[3] = vertices[4] - 1;
│ │ │ │ -
139 factory.insertElement(Dune::GeometryTypes::tetrahedron, simplexVertices);
│ │ │ │ -
140 }
│ │ │ │ -
141 else { // prism
│ │ │ │ -
142 numberOfPrisms++;
│ │ │ │ -
143 std::vector<unsigned int> prismVertices(6);
│ │ │ │ -
144 for (int k = 0; k < 3; k++)
│ │ │ │ -
145 prismVertices[k] = vertices[k] - 1;
│ │ │ │ -
146 for (int k = 3; k < 6; k++)
│ │ │ │ -
147 prismVertices[k] = vertices[k+1] - 1;
│ │ │ │ -
148 factory.insertElement(Dune::GeometryTypes::prism, prismVertices);
│ │ │ │ -
149 }
│ │ │ │ -
150 }
│ │ │ │ -
151 else { // cube or pyramid
│ │ │ │ -
152 if (vertices[4] == vertices[5]) { // pyramid
│ │ │ │ -
153 numberOfPyramids++;
│ │ │ │ -
154 std::vector<unsigned int> pyramidVertices(5);
│ │ │ │ -
155 for (int k = 0; k < 5; k++)
│ │ │ │ -
156 pyramidVertices[k] = vertices[k] - 1;
│ │ │ │ -
157 factory.insertElement(Dune::GeometryTypes::pyramid, pyramidVertices);
│ │ │ │ -
158 }
│ │ │ │ -
159 else { // cube
│ │ │ │ -
160 numberOfCubes++;
│ │ │ │ -
161 std::vector<unsigned int> cubeVertices(8);
│ │ │ │ -
162 for (int k = 0; k < 8; k++)
│ │ │ │ -
163 cubeVertices[k] = vertices[k] - 1;
│ │ │ │ -
164 std::swap(cubeVertices[2], cubeVertices[3]);
│ │ │ │ -
165 std::swap(cubeVertices[6], cubeVertices[7]);
│ │ │ │ -
166 factory.insertElement(Dune::GeometryTypes::hexahedron, cubeVertices);
│ │ │ │ -
167 }
│ │ │ │ -
168 }
│ │ │ │ -
169 }
│ │ │ │ -
170 }
│ │ │ │ -
171 if (verbose)
│ │ │ │ -
172 std::cout << numberOfElements << " elements read: "
│ │ │ │ -
173 << numberOfSimplices << " simplices, " << numberOfPyramids << " pyramids, "
│ │ │ │ -
174 << numberOfPrisms << " prisms, " << numberOfCubes << " cubes." << std::endl;
│ │ │ │ -
175
│ │ │ │ -
176 // finish off the construction of the grid object
│ │ │ │ -
177 if (verbose)
│ │ │ │ -
178 std::cout << "Starting createGrid() ... " << std::flush;
│ │ │ │ -
179
│ │ │ │ -
180 return factory.createGrid();
│ │ │ │ -
181
│ │ │ │ -
182 }
│ │ │ │ -
│ │ │ │ -
183
│ │ │ │ -
184 };
│ │ │ │ -
│ │ │ │ -
185
│ │ │ │ -
186}
│ │ │ │ -
187
│ │ │ │ -
188#endif
│ │ │ │ -
void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T > &b)
Definition utility/persistentcontainer.hh:83
│ │ │ │ +
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 }
│ │ │ │ +
116
│ │ │ │ +
117 }
│ │ │ │ +
118
│ │ │ │ +
119}
│ │ │ │ +
│ │ │ │ +
static constexpr int dimension
The dimension of the grid.
Definition common/gridview.hh:134
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Provide a generic factory class for unstructured grids.
Definition common/gridfactory.hh:275
│ │ │ │ -
virtual void insertElement(const GeometryType &type, const std::vector< unsigned int > &vertices)
Insert an element into the coarse grid.
Definition common/gridfactory.hh:307
│ │ │ │ -
virtual void insertVertex(const FieldVector< ctype, dimworld > &pos)
Insert a vertex into the coarse grid.
Definition common/gridfactory.hh:296
│ │ │ │ -
virtual std::unique_ptr< GridType > createGrid()
Finalize grid creation and hand over the grid.
Definition common/gridfactory.hh:333
│ │ │ │ -
File reader for the Star-CD format.
Definition starcdreader.hh:52
│ │ │ │ -
static std::unique_ptr< GridType > read(const std::string &fileName, bool verbose=true)
Read grid from a Star-CD file.
Definition starcdreader.hh:65
│ │ │ │ -
Provide a generic factory class for unstructured grids.
│ │ │ │ +
A struct that collects all associated types of one implementation from the Traits class.
Definition common/gridview.hh:104
│ │ │ │ +
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,193 +2,139 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ -starcdreader.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 © 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_STARCD_READER_HH │ │ │ │ │ -6#define DUNE_STARCD_READER_HH │ │ │ │ │ -7 │ │ │ │ │ -8#include │ │ │ │ │ -9 │ │ │ │ │ -10#include │ │ │ │ │ -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#include │ │ │ │ │ -13#include │ │ │ │ │ -14#include │ │ │ │ │ -15 │ │ │ │ │ -16namespace _D_u_n_e { │ │ │ │ │ -17 │ │ │ │ │ -51 template │ │ │ │ │ -_5_2 class _S_t_a_r_C_D_R_e_a_d_e_r { │ │ │ │ │ -53 │ │ │ │ │ -54 public: │ │ │ │ │ -55 │ │ │ │ │ -_6_5 static std::unique_ptr _r_e_a_d(const std::string& fileName, bool │ │ │ │ │ -verbose = true) │ │ │ │ │ -66 { │ │ │ │ │ -67 // extract the grid dimension │ │ │ │ │ -68 const int dim = GridType::dimension; │ │ │ │ │ -69 │ │ │ │ │ -70 // currently only dim = 3 is implemented │ │ │ │ │ -71 if (dim != 3) │ │ │ │ │ -72 DUNE_THROW(Dune::NotImplemented, │ │ │ │ │ -73 "Reading Star-CD format is not implemented for dimension " << dim); │ │ │ │ │ -74 │ │ │ │ │ -75 // set up the grid factory │ │ │ │ │ -76 _G_r_i_d_F_a_c_t_o_r_y_<_G_r_i_d_T_y_p_e_> factory; │ │ │ │ │ -77 │ │ │ │ │ -78 // set the name of the vertex file │ │ │ │ │ -79 std::string vertexFileName = fileName + ".vrt"; │ │ │ │ │ -80 │ │ │ │ │ -81 // set the vertex input stream │ │ │ │ │ -82 std::ifstream vertexFile(vertexFileName.c_str()); │ │ │ │ │ -83 if (!vertexFile) │ │ │ │ │ -84 DUNE_THROW(Dune::IOError, "Could not open " << vertexFileName); │ │ │ │ │ -85 │ │ │ │ │ -86 // read the vertices │ │ │ │ │ -87 int dummyIdx; │ │ │ │ │ -88 int numberOfVertices = 0; │ │ │ │ │ -89 while (vertexFile >> dummyIdx) { │ │ │ │ │ -90 numberOfVertices++; │ │ │ │ │ -91 │ │ │ │ │ -92 Dune::FieldVector position; │ │ │ │ │ -93 │ │ │ │ │ -94 for (int k = 0; k < dim; k++) │ │ │ │ │ -95 vertexFile >> position[k]; │ │ │ │ │ -96 │ │ │ │ │ -97 factory._i_n_s_e_r_t_V_e_r_t_e_x(position); │ │ │ │ │ -98 } │ │ │ │ │ -99 if (verbose) │ │ │ │ │ -100 std::cout << numberOfVertices << " vertices read." << std::endl; │ │ │ │ │ -101 │ │ │ │ │ -102 // set the name of the element file │ │ │ │ │ -103 std::string elementFileName = fileName + ".cel"; │ │ │ │ │ -104 │ │ │ │ │ -105 // set the element input stream │ │ │ │ │ -106 std::ifstream elementFile(elementFileName.c_str()); │ │ │ │ │ -107 if (!elementFile) │ │ │ │ │ -108 DUNE_THROW(Dune::IOError, "Could not open " << elementFileName); │ │ │ │ │ -109 │ │ │ │ │ -110 // read the elements │ │ │ │ │ -111 int numberOfElements = 0; │ │ │ │ │ -112 int numberOfSimplices = 0; │ │ │ │ │ -113 int numberOfPyramids = 0; │ │ │ │ │ -114 int numberOfPrisms = 0; │ │ │ │ │ -115 int numberOfCubes = 0;; │ │ │ │ │ -116 int maxNumberOfVertices = (int)pow(2, dim); │ │ │ │ │ -117 int isVolume = 1; │ │ │ │ │ -118 while (elementFile >> dummyIdx) { │ │ │ │ │ -119 std::vector vertices(maxNumberOfVertices); │ │ │ │ │ -120 for (int k = 0; k < maxNumberOfVertices; k++) │ │ │ │ │ -121 elementFile >> vertices[k]; │ │ │ │ │ -122 │ │ │ │ │ -123 int boundaryId; │ │ │ │ │ -124 elementFile >> boundaryId; │ │ │ │ │ -125 │ │ │ │ │ -126 int volumeOrSurface[2]; │ │ │ │ │ -127 elementFile >> volumeOrSurface[0] >> volumeOrSurface[1]; │ │ │ │ │ -128 │ │ │ │ │ -129 if (volumeOrSurface[0] == isVolume) { │ │ │ │ │ -130 numberOfElements++; │ │ │ │ │ -131 │ │ │ │ │ -132 if (vertices[2] == vertices[3]) { // simplex or prism │ │ │ │ │ -133 if (vertices[4] == vertices[5]) { // simplex │ │ │ │ │ -134 numberOfSimplices++; │ │ │ │ │ -135 std::vector simplexVertices(4); │ │ │ │ │ -136 for (int k = 0; k < 3; k++) │ │ │ │ │ -137 simplexVertices[k] = vertices[k] - 1; │ │ │ │ │ -138 simplexVertices[3] = vertices[4] - 1; │ │ │ │ │ -139 factory._i_n_s_e_r_t_E_l_e_m_e_n_t(Dune::GeometryTypes::tetrahedron, simplexVertices); │ │ │ │ │ -140 } │ │ │ │ │ -141 else { // prism │ │ │ │ │ -142 numberOfPrisms++; │ │ │ │ │ -143 std::vector prismVertices(6); │ │ │ │ │ -144 for (int k = 0; k < 3; k++) │ │ │ │ │ -145 prismVertices[k] = vertices[k] - 1; │ │ │ │ │ -146 for (int k = 3; k < 6; k++) │ │ │ │ │ -147 prismVertices[k] = vertices[k+1] - 1; │ │ │ │ │ -148 factory._i_n_s_e_r_t_E_l_e_m_e_n_t(Dune::GeometryTypes::prism, prismVertices); │ │ │ │ │ -149 } │ │ │ │ │ -150 } │ │ │ │ │ -151 else { // cube or pyramid │ │ │ │ │ -152 if (vertices[4] == vertices[5]) { // pyramid │ │ │ │ │ -153 numberOfPyramids++; │ │ │ │ │ -154 std::vector pyramidVertices(5); │ │ │ │ │ -155 for (int k = 0; k < 5; k++) │ │ │ │ │ -156 pyramidVertices[k] = vertices[k] - 1; │ │ │ │ │ -157 factory._i_n_s_e_r_t_E_l_e_m_e_n_t(Dune::GeometryTypes::pyramid, pyramidVertices); │ │ │ │ │ -158 } │ │ │ │ │ -159 else { // cube │ │ │ │ │ -160 numberOfCubes++; │ │ │ │ │ -161 std::vector cubeVertices(8); │ │ │ │ │ -162 for (int k = 0; k < 8; k++) │ │ │ │ │ -163 cubeVertices[k] = vertices[k] - 1; │ │ │ │ │ -164 _s_t_d_:_:_s_w_a_p(cubeVertices[2], cubeVertices[3]); │ │ │ │ │ -165 _s_t_d_:_:_s_w_a_p(cubeVertices[6], cubeVertices[7]); │ │ │ │ │ -166 factory._i_n_s_e_r_t_E_l_e_m_e_n_t(Dune::GeometryTypes::hexahedron, cubeVertices); │ │ │ │ │ -167 } │ │ │ │ │ -168 } │ │ │ │ │ -169 } │ │ │ │ │ -170 } │ │ │ │ │ -171 if (verbose) │ │ │ │ │ -172 std::cout << numberOfElements << " elements read: " │ │ │ │ │ -173 << numberOfSimplices << " simplices, " << numberOfPyramids << " pyramids, " │ │ │ │ │ -174 << numberOfPrisms << " prisms, " << numberOfCubes << " cubes." << std:: │ │ │ │ │ -endl; │ │ │ │ │ -175 │ │ │ │ │ -176 // finish off the construction of the grid object │ │ │ │ │ -177 if (verbose) │ │ │ │ │ -178 std::cout << "Starting createGrid() ... " << std::flush; │ │ │ │ │ -179 │ │ │ │ │ -180 return factory._c_r_e_a_t_e_G_r_i_d(); │ │ │ │ │ -181 │ │ │ │ │ -182 } │ │ │ │ │ -183 │ │ │ │ │ -184 }; │ │ │ │ │ -185 │ │ │ │ │ -186} │ │ │ │ │ -187 │ │ │ │ │ -188#endif │ │ │ │ │ -_s_t_d_:_:_s_w_a_p │ │ │ │ │ -void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T │ │ │ │ │ -> &b) │ │ │ │ │ -DDeeffiinniittiioonn utility/persistentcontainer.hh:83 │ │ │ │ │ +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 } │ │ │ │ │ +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:134 │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_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:275 │ │ │ │ │ -_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:307 │ │ │ │ │ -_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:296 │ │ │ │ │ -_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:333 │ │ │ │ │ -_D_u_n_e_:_:_S_t_a_r_C_D_R_e_a_d_e_r │ │ │ │ │ -File reader for the Star-CD format. │ │ │ │ │ -DDeeffiinniittiioonn starcdreader.hh:52 │ │ │ │ │ -_D_u_n_e_:_:_S_t_a_r_C_D_R_e_a_d_e_r_:_:_r_e_a_d │ │ │ │ │ -static std::unique_ptr< GridType > read(const std::string &fileName, bool │ │ │ │ │ -verbose=true) │ │ │ │ │ -Read grid from a Star-CD file. │ │ │ │ │ -DDeeffiinniittiioonn starcdreader.hh:65 │ │ │ │ │ -_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_:_:_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:104 │ │ │ │ │ +_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/a00971.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: gmshreader.hh File Reference │ │ │ │ +dune-grid: gnuplot.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,78 +71,52 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces | │ │ │ │ -Enumerations | │ │ │ │ -Functions
│ │ │ │ -
gmshreader.hh File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
gnuplot.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <cstdarg>
│ │ │ │ -#include <cstdio>
│ │ │ │ -#include <cstring>
│ │ │ │ -#include <fstream>
│ │ │ │ -#include <iostream>
│ │ │ │ -#include <map>
│ │ │ │ -#include <memory>
│ │ │ │ + │ │ │ │ +

Provides gnuplot output for 1D Grids. │ │ │ │ +More...

│ │ │ │ +
#include <vector>
│ │ │ │ #include <string>
│ │ │ │ -#include <tuple>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <utility>
│ │ │ │ -#include <dune/common/exceptions.hh>
│ │ │ │ +#include <iostream>
│ │ │ │ +#include <fstream>
│ │ │ │ #include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/grid/common/boundarysegment.hh>
│ │ │ │ -#include <dune/grid/common/gridfactory.hh>
│ │ │ │ +#include <dune/grid/common/grid.hh>
│ │ │ │ +#include "gnuplot/gnuplot.cc"
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

struct  Dune::GmshReaderOptions
 Options for read operation. More...
class  Dune::GnuplotWriter< GridView >
 Writer for 1D grids in gnuplot format. More...
 
class  Dune::GmshReaderParser< GridType >
 dimension independent parts for GmshReaderParser More...
class  Dune::LeafGnuplotWriter< G >
 GnuplotWriter on the leaf grid. More...
 
class  Dune::GmshReader< GridType >
 Read Gmsh mesh file. More...
class  Dune::LevelGnuplotWriter< G >
 GnuplotWriter on a given level grid. 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)
 
│ │ │ │ -
│ │ │ │ +

Detailed Description

│ │ │ │ +

Provides gnuplot output for 1D Grids.

│ │ │ │ +
Author
Christian Engwer
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,60 +2,38 @@ │ │ │ │ │ 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 │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +gnuplot.hh File Reference │ │ │ │ │ +Provides gnuplot output for 1D Grids. _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_/_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> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_._h_h> │ │ │ │ │ +#include "_g_n_u_p_l_o_t_/_g_n_u_p_l_o_t_._c_c" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -struct   _D_u_n_e_:_:_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_n_u_p_l_o_t_W_r_i_t_e_r_<_ _G_r_i_d_V_i_e_w_ _> │ │ │ │ │ +  Writer for 1D grids in gnuplot format. _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_:_:_L_e_a_f_G_n_u_p_l_o_t_W_r_i_t_e_r_<_ _G_ _> │ │ │ │ │ +  _G_n_u_p_l_o_t_W_r_i_t_e_r on the leaf grid. _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_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_L_e_v_e_l_G_n_u_p_l_o_t_W_r_i_t_e_r_<_ _G_ _> │ │ │ │ │ +  _G_n_u_p_l_o_t_W_r_i_t_e_r on a given level grid. _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) │ │ │ │ │ -  │ │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ +Provides gnuplot output for 1D Grids. │ │ │ │ │ + Author │ │ │ │ │ + Christian Engwer │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00971_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: gmshreader.hh Source File │ │ │ │ +dune-grid: gnuplot.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,1194 +74,137 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
gmshreader.hh
│ │ │ │ +
gnuplot.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_GMSHREADER_HH
│ │ │ │ -
7#define DUNE_GMSHREADER_HH
│ │ │ │ -
8
│ │ │ │ -
9#include <cstdarg>
│ │ │ │ -
10#include <cstdio>
│ │ │ │ -
11#include <cstring>
│ │ │ │ -
12#include <fstream>
│ │ │ │ -
13#include <iostream>
│ │ │ │ -
14#include <map>
│ │ │ │ -
15#include <memory>
│ │ │ │ -
16#include <string>
│ │ │ │ -
17#include <tuple>
│ │ │ │ -
18#include <vector>
│ │ │ │ -
19#include <utility>
│ │ │ │ -
20
│ │ │ │ -
21#include <dune/common/exceptions.hh>
│ │ │ │ -
22#include <dune/common/fvector.hh>
│ │ │ │ +
5#ifndef DUNE_IO_GNUPLOT_HH
│ │ │ │ +
6#define DUNE_IO_GNUPLOT_HH
│ │ │ │ +
7
│ │ │ │ +
13#include <vector>
│ │ │ │ +
14#include <string>
│ │ │ │ +
15#include <iostream>
│ │ │ │ +
16#include <fstream>
│ │ │ │ +
17
│ │ │ │ +
18#include <dune/common/fvector.hh>
│ │ │ │ +
19
│ │ │ │ + │ │ │ │ +
21
│ │ │ │ +
22namespace Dune {
│ │ │ │
23
│ │ │ │ -
24#include <dune/geometry/type.hh>
│ │ │ │ -
25
│ │ │ │ - │ │ │ │ - │ │ │ │ -
28
│ │ │ │ -
29namespace Dune
│ │ │ │ -
30{
│ │ │ │ +
29 template<class GridView>
│ │ │ │ +
│ │ │ │ + │ │ │ │
31
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
39 {
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
45 };
│ │ │ │ -
│ │ │ │ -
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 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
│ │ │ │ -
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 std::vector<std::string> physical_entity_names;
│ │ │ │ -
318
│ │ │ │ -
319 // static data
│ │ │ │ -
320 static const int dim = GridType::dimension;
│ │ │ │ -
321 static const int dimWorld = GridType::dimensionworld;
│ │ │ │ -
322 static_assert( (dimWorld <= 3), "GmshReader requires dimWorld <= 3." );
│ │ │ │ -
323
│ │ │ │ -
324 // typedefs
│ │ │ │ -
325 typedef FieldVector< double, dimWorld > GlobalVector;
│ │ │ │ -
326
│ │ │ │ -
327 // don't use something like
│ │ │ │ -
328 // readfile(file, 1, "%s\n", buf);
│ │ │ │ -
329 // to skip the rest of of the line -- that will only skip the next
│ │ │ │ -
330 // whitespace-separated word! Use skipline() instead.
│ │ │ │ -
│ │ │ │ -
331 void readfile(FILE * file, int cnt, const char * format, ...)
│ │ │ │ -
332#ifdef __GNUC__
│ │ │ │ -
333 __attribute__((format(scanf, 4, 5)))
│ │ │ │ -
334#endif
│ │ │ │ -
335 {
│ │ │ │ -
336 std::va_list ap;
│ │ │ │ -
337 va_start(ap, format);
│ │ │ │ -
338 off_t pos = ftello(file);
│ │ │ │ -
339 int c = std::vfscanf(file, format, ap);
│ │ │ │ -
340 va_end(ap);
│ │ │ │ -
341 if (c != cnt)
│ │ │ │ -
342 DUNE_THROW(Dune::IOError, "Error parsing " << fileName << " "
│ │ │ │ -
343 "file pos " << pos
│ │ │ │ -
344 << ": Expected '" << format << "', only read " << c << " entries instead of " << cnt << ".");
│ │ │ │ -
345 }
│ │ │ │ -
│ │ │ │ -
346
│ │ │ │ -
347 // skip over the rest of the line, including the terminating newline
│ │ │ │ -
│ │ │ │ -
348 void skipline(FILE * file)
│ │ │ │ -
349 {
│ │ │ │ -
350 int c;
│ │ │ │ -
351 do {
│ │ │ │ -
352 c = std::fgetc(file);
│ │ │ │ -
353 } while(c != '\n' && c != EOF);
│ │ │ │ -
354 }
│ │ │ │ -
│ │ │ │ -
355
│ │ │ │ -
356 public:
│ │ │ │ -
357
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
359 factory(_factory), verbose(v), insert_boundary_segments(i) {}
│ │ │ │ -
│ │ │ │ -
360
│ │ │ │ -
│ │ │ │ -
361 std::vector<int> & boundaryIdMap()
│ │ │ │ -
362 {
│ │ │ │ - │ │ │ │ -
364 }
│ │ │ │ -
│ │ │ │ -
365
│ │ │ │ -
│ │ │ │ -
367 std::vector<int> & elementIndexMap()
│ │ │ │ -
368 {
│ │ │ │ - │ │ │ │ -
370 }
│ │ │ │ -
│ │ │ │ -
371
│ │ │ │ -
│ │ │ │ -
373 std::vector<std::string> & physicalEntityNames()
│ │ │ │ -
374 {
│ │ │ │ - │ │ │ │ -
376 }
│ │ │ │ -
│ │ │ │ -
377
│ │ │ │ -
│ │ │ │ -
378 void read (const std::string& f)
│ │ │ │ -
379 {
│ │ │ │ -
380 if (verbose) std::cout << "Reading " << dim << "d Gmsh grid..." << std::endl;
│ │ │ │ -
381
│ │ │ │ -
382 // open file name, we use C I/O
│ │ │ │ -
383 fileName = f;
│ │ │ │ -
384 FILE* file = fopen(fileName.c_str(),"rb");
│ │ │ │ -
385 if (file==0)
│ │ │ │ -
386 DUNE_THROW(Dune::IOError, "Could not open " << fileName);
│ │ │ │ -
387
│ │ │ │ -
388 //=========================================
│ │ │ │ -
389 // Header: Read vertices into vector
│ │ │ │ -
390 // Check vertices that are needed
│ │ │ │ -
391 //=========================================
│ │ │ │ -
392
│ │ │ │ - │ │ │ │ - │ │ │ │ -
395 element_count = 0;
│ │ │ │ -
396
│ │ │ │ -
397 // process header
│ │ │ │ -
398 double version_number;
│ │ │ │ -
399 int file_type, data_size;
│ │ │ │ -
400
│ │ │ │ -
401 readfile(file,1,"%s\n",buf);
│ │ │ │ -
402 if (strcmp(buf,"$MeshFormat")!=0)
│ │ │ │ -
403 DUNE_THROW(Dune::IOError, "expected $MeshFormat in first line");
│ │ │ │ -
404 readfile(file,3,"%lg %d %d\n",&version_number,&file_type,&data_size);
│ │ │ │ -
405 // 2.2 is not representable as float and leads to problems on i386
│ │ │ │ -
406 // Hence we use >= 2.00001.
│ │ │ │ -
407 if( (version_number < 2.0) || (version_number >= 2.20001) ) // 2.2 is not representable as float and leads to problems on i386
│ │ │ │ -
408 DUNE_THROW(Dune::IOError, "can only read Gmsh version 2 files");
│ │ │ │ -
409 if (verbose) std::cout << "version " << version_number << " Gmsh file detected" << std::endl;
│ │ │ │ -
410 readfile(file,1,"%s\n",buf);
│ │ │ │ -
411 if (strcmp(buf,"$EndMeshFormat")!=0)
│ │ │ │ -
412 DUNE_THROW(Dune::IOError, "expected $EndMeshFormat");
│ │ │ │ -
413
│ │ │ │ -
414 // physical name section
│ │ │ │ -
415 physical_entity_names.clear();
│ │ │ │ -
416 readfile(file,1,"%s\n",buf);
│ │ │ │ -
417 if (strcmp(buf,"$PhysicalNames")==0) {
│ │ │ │ -
418 int number_of_names;
│ │ │ │ -
419 readfile(file,1,"%d\n",&number_of_names);
│ │ │ │ -
420 if (verbose) std::cout << "file contains " << number_of_names << " physical entities" << std::endl;
│ │ │ │ -
421 physical_entity_names.resize(number_of_names);
│ │ │ │ -
422 std::string buf_name;
│ │ │ │ -
423 for( int i = 0; i < number_of_names; ++i ) {
│ │ │ │ -
424 int dim, id;
│ │ │ │ -
425 readfile(file,3, "%d %d %s\n", &dim, &id, buf);
│ │ │ │ -
426 buf_name.assign(buf);
│ │ │ │ -
427 auto begin = buf_name.find_first_of('\"') + 1;
│ │ │ │ -
428 auto end = buf_name.find_last_of('\"') - begin;
│ │ │ │ -
429 physical_entity_names[id-1].assign(buf_name.substr(begin, end));
│ │ │ │ -
430 }
│ │ │ │ -
431 readfile(file,1,"%s\n",buf);
│ │ │ │ -
432 if (strcmp(buf,"$EndPhysicalNames")!=0)
│ │ │ │ -
433 DUNE_THROW(Dune::IOError, "expected $EndPhysicalNames");
│ │ │ │ -
434 readfile(file,1,"%s\n",buf);
│ │ │ │ -
435 }
│ │ │ │ -
436
│ │ │ │ -
437 // node section
│ │ │ │ -
438 int number_of_nodes;
│ │ │ │ -
439
│ │ │ │ -
440 if (strcmp(buf,"$Nodes")!=0)
│ │ │ │ -
441 DUNE_THROW(Dune::IOError, "expected $Nodes");
│ │ │ │ -
442 readfile(file,1,"%d\n",&number_of_nodes);
│ │ │ │ -
443 if (verbose) std::cout << "file contains " << number_of_nodes << " nodes" << std::endl;
│ │ │ │ -
444
│ │ │ │ -
445 // read nodes
│ │ │ │ -
446 // The '+1' is due to the fact that gmsh numbers node starting from 1 rather than from 0
│ │ │ │ -
447 std::vector< GlobalVector > nodes( number_of_nodes+1 );
│ │ │ │ -
448 {
│ │ │ │ -
449 int id;
│ │ │ │ -
450 double x[ 3 ];
│ │ │ │ -
451 for( int i = 1; i <= number_of_nodes; ++i )
│ │ │ │ -
452 {
│ │ │ │ -
453 readfile(file,4, "%d %lg %lg %lg\n", &id, &x[ 0 ], &x[ 1 ], &x[ 2 ] );
│ │ │ │ -
454
│ │ │ │ -
455 if (id > number_of_nodes) {
│ │ │ │ -
456 DUNE_THROW(Dune::IOError,
│ │ │ │ -
457 "Only dense sequences of node indices are currently supported (node index "
│ │ │ │ -
458 << id << " is invalid).");
│ │ │ │ -
459 }
│ │ │ │ -
460
│ │ │ │ -
461 // just store node position
│ │ │ │ -
462 for( int j = 0; j < dimWorld; ++j )
│ │ │ │ -
463 nodes[ id ][ j ] = x[ j ];
│ │ │ │ -
464 }
│ │ │ │ -
465 readfile(file,1,"%s\n",buf);
│ │ │ │ -
466 if (strcmp(buf,"$EndNodes")!=0)
│ │ │ │ -
467 DUNE_THROW(Dune::IOError, "expected $EndNodes");
│ │ │ │ -
468 }
│ │ │ │ -
469
│ │ │ │ -
470 // element section
│ │ │ │ -
471 readfile(file,1,"%s\n",buf);
│ │ │ │ -
472 if (strcmp(buf,"$Elements")!=0)
│ │ │ │ -
473 DUNE_THROW(Dune::IOError, "expected $Elements");
│ │ │ │ -
474 int number_of_elements;
│ │ │ │ -
475 readfile(file,1,"%d\n",&number_of_elements);
│ │ │ │ -
476 if (verbose) std::cout << "file contains " << number_of_elements << " elements" << std::endl;
│ │ │ │ -
477
│ │ │ │ -
478 //=========================================
│ │ │ │ -
479 // Pass 1: Select and insert those vertices in the file that
│ │ │ │ -
480 // actually occur as corners of an element.
│ │ │ │ -
481 //=========================================
│ │ │ │ -
482
│ │ │ │ -
483 off_t section_element_offset = ftello(file);
│ │ │ │ -
484 std::map<int,unsigned int> renumber;
│ │ │ │ -
485 for (int i=1; i<=number_of_elements; i++)
│ │ │ │ -
486 {
│ │ │ │ -
487 int id, elm_type, number_of_tags;
│ │ │ │ -
488 readfile(file,3,"%d %d %d ",&id,&elm_type,&number_of_tags);
│ │ │ │ -
489 for (int k=1; k<=number_of_tags; k++)
│ │ │ │ -
490 {
│ │ │ │ -
491 int blub;
│ │ │ │ -
492 readfile(file,1,"%d ",&blub);
│ │ │ │ -
493 // k == 1: physical entity
│ │ │ │ -
494 // k == 2: elementary entity (not used here)
│ │ │ │ -
495 // if version_number < 2.2:
│ │ │ │ -
496 // k == 3: mesh partition 0
│ │ │ │ -
497 // else
│ │ │ │ -
498 // k == 3: number of mesh partitions
│ │ │ │ -
499 // k => 4: mesh partition k-4
│ │ │ │ -
500 }
│ │ │ │ -
501 pass1HandleElement(file, elm_type, renumber, nodes);
│ │ │ │ -
502 }
│ │ │ │ -
503 if (verbose) std::cout << "number of real vertices = " << number_of_real_vertices << std::endl;
│ │ │ │ -
504 if (verbose) std::cout << "number of boundary elements = " << boundary_element_count << std::endl;
│ │ │ │ -
505 if (verbose) std::cout << "number of elements = " << element_count << std::endl;
│ │ │ │ -
506 readfile(file,1,"%s\n",buf);
│ │ │ │ -
507 if (strcmp(buf,"$EndElements")!=0)
│ │ │ │ -
508 DUNE_THROW(Dune::IOError, "expected $EndElements");
│ │ │ │ - │ │ │ │ - │ │ │ │ -
511
│ │ │ │ -
512 //==============================================
│ │ │ │ -
513 // Pass 2: Insert boundary segments and elements
│ │ │ │ -
514 //==============================================
│ │ │ │ -
515
│ │ │ │ -
516 fseeko(file, section_element_offset, SEEK_SET);
│ │ │ │ - │ │ │ │ -
518 element_count = 0;
│ │ │ │ -
519 for (int i=1; i<=number_of_elements; i++)
│ │ │ │ -
520 {
│ │ │ │ -
521 int id, elm_type, number_of_tags;
│ │ │ │ -
522 readfile(file,3,"%d %d %d ",&id,&elm_type,&number_of_tags);
│ │ │ │ -
523 int physical_entity = -1;
│ │ │ │ -
524
│ │ │ │ -
525 for (int k=1; k<=number_of_tags; k++)
│ │ │ │ -
526 {
│ │ │ │ -
527 int blub;
│ │ │ │ -
528 readfile(file,1,"%d ",&blub);
│ │ │ │ -
529 if (k==1) physical_entity = blub;
│ │ │ │ -
530 }
│ │ │ │ -
531 pass2HandleElement(file, elm_type, renumber, nodes, physical_entity);
│ │ │ │ -
532 }
│ │ │ │ -
533 readfile(file,1,"%s\n",buf);
│ │ │ │ -
534 if (strcmp(buf,"$EndElements")!=0)
│ │ │ │ -
535 DUNE_THROW(Dune::IOError, "expected $EndElements");
│ │ │ │ -
536
│ │ │ │ -
537 fclose(file);
│ │ │ │ -
538 }
│ │ │ │ -
│ │ │ │ -
539
│ │ │ │ -
│ │ │ │ -
545 void pass1HandleElement(FILE* file, const int elm_type,
│ │ │ │ -
546 std::map<int,unsigned int> & renumber,
│ │ │ │ -
547 const std::vector< GlobalVector > & nodes)
│ │ │ │ -
548 {
│ │ │ │ -
549 // some data about gmsh elements
│ │ │ │ -
550 const int nDofs[16] = {-1, 2, 3, 4, 4, 8, 6, 5, 3, 6, -1, 10, -1, -1, -1, 1};
│ │ │ │ -
551 const int nVertices[16] = {-1, 2, 3, 4, 4, 8, 6, 5, 2, 3, -1, 4, -1, -1, -1, 1};
│ │ │ │ -
552 const int elementDim[16] = {-1, 1, 2, 2, 3, 3, 3, 3, 1, 2, -1, 3, -1, -1, -1, 0};
│ │ │ │ -
553
│ │ │ │ -
554 // test whether we support the element type
│ │ │ │ -
555 if ( not (elm_type > 0 && elm_type <= 15 // index in suitable range?
│ │ │ │ -
556 && (elementDim[elm_type] == dim || elementDim[elm_type] == (dim-1) ) ) ) // real element or boundary element?
│ │ │ │ -
557 {
│ │ │ │ -
558 skipline(file); // skip rest of line if element is unknown
│ │ │ │ -
559 return;
│ │ │ │ -
560 }
│ │ │ │ -
561
│ │ │ │ -
562 // The format string for parsing is n times '%d' in a row
│ │ │ │ -
563 std::string formatString = "%d";
│ │ │ │ -
564 for (int i=1; i<nDofs[elm_type]; i++)
│ │ │ │ -
565 formatString += " %d";
│ │ │ │ -
566 formatString += "\n";
│ │ │ │ -
567
│ │ │ │ -
568 // '10' is the largest number of dofs we may encounter in a .msh file
│ │ │ │ -
569 std::vector<int> elementDofs(10);
│ │ │ │ -
570
│ │ │ │ -
571 readfile(file,nDofs[elm_type], formatString.c_str(),
│ │ │ │ -
572 &(elementDofs[0]),&(elementDofs[1]),&(elementDofs[2]),
│ │ │ │ -
573 &(elementDofs[3]),&(elementDofs[4]),&(elementDofs[5]),
│ │ │ │ -
574 &(elementDofs[6]),&(elementDofs[7]),&(elementDofs[8]),
│ │ │ │ -
575 &(elementDofs[9]));
│ │ │ │ -
576
│ │ │ │ -
577 // insert each vertex if it hasn't been inserted already
│ │ │ │ -
578 for (int i=0; i<nVertices[elm_type]; i++)
│ │ │ │ -
579 if (renumber.find(elementDofs[i])==renumber.end())
│ │ │ │ -
580 {
│ │ │ │ -
581 renumber[elementDofs[i]] = number_of_real_vertices++;
│ │ │ │ -
582 factory.insertVertex(nodes[elementDofs[i]]);
│ │ │ │ -
583 }
│ │ │ │ -
584
│ │ │ │ -
585 // count elements and boundary elements
│ │ │ │ -
586 if (elementDim[elm_type] == dim)
│ │ │ │ - │ │ │ │ -
588 else
│ │ │ │ - │ │ │ │ -
590
│ │ │ │ -
591 }
│ │ │ │ -
│ │ │ │ -
592
│ │ │ │ -
593
│ │ │ │ -
594
│ │ │ │ -
595 // generic-case: This is not supposed to be used at runtime.
│ │ │ │ -
596 template <class E, class V, class V2>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
598 const V&,
│ │ │ │ -
599 const E&,
│ │ │ │ -
600 const V2&
│ │ │ │ -
601 )
│ │ │ │ -
602 {
│ │ │ │ -
603 DUNE_THROW(Dune::IOError, "tried to create a 3D boundary segment in a non-3D Grid");
│ │ │ │ -
604 }
│ │ │ │ -
│ │ │ │ -
605
│ │ │ │ -
606 // 3d-case:
│ │ │ │ -
607 template <class E, class V>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
609 const std::vector<FieldVector<double, 3> >& nodes,
│ │ │ │ -
610 const E& elementDofs,
│ │ │ │ -
611 const V& vertices
│ │ │ │ -
612 )
│ │ │ │ -
613 {
│ │ │ │ -
614 std::array<FieldVector<double,dimWorld>, 6> v;
│ │ │ │ -
615 for (int i=0; i<6; i++)
│ │ │ │ -
616 for (int j=0; j<dimWorld; j++)
│ │ │ │ -
617 v[i][j] = nodes[elementDofs[i]][j];
│ │ │ │ -
618
│ │ │ │ -
619 BoundarySegment<dim,dimWorld>* newBoundarySegment
│ │ │ │ -
620 = (BoundarySegment<dim,dimWorld>*) new GmshReaderQuadraticBoundarySegment< 3, 3 >( v[0], v[1], v[2],
│ │ │ │ -
621 v[3], v[4], v[5] );
│ │ │ │ -
622
│ │ │ │ -
623 factory.insertBoundarySegment( vertices,
│ │ │ │ -
624 std::shared_ptr<BoundarySegment<dim,dimWorld> >(newBoundarySegment) );
│ │ │ │ -
625 }
│ │ │ │ -
│ │ │ │ -
626
│ │ │ │ -
627
│ │ │ │ -
628
│ │ │ │ -
│ │ │ │ -
633 virtual void pass2HandleElement(FILE* file, const int elm_type,
│ │ │ │ -
634 std::map<int,unsigned int> & renumber,
│ │ │ │ -
635 const std::vector< GlobalVector > & nodes,
│ │ │ │ -
636 const int physical_entity)
│ │ │ │ -
637 {
│ │ │ │ -
638 // some data about gmsh elements
│ │ │ │ -
639 const int nDofs[16] = {-1, 2, 3, 4, 4, 8, 6, 5, 3, 6, -1, 10, -1, -1, -1, 1};
│ │ │ │ -
640 const int nVertices[16] = {-1, 2, 3, 4, 4, 8, 6, 5, 2, 3, -1, 4, -1, -1, -1, 1};
│ │ │ │ -
641 const int elementDim[16] = {-1, 1, 2, 2, 3, 3, 3, 3, 1, 2, -1, 3, -1, -1, -1, 0};
│ │ │ │ -
642
│ │ │ │ -
643 // test whether we support the element type
│ │ │ │ -
644 if ( not (elm_type > 0 && elm_type <= 15 // index in suitable range?
│ │ │ │ -
645 && (elementDim[elm_type] == dim || elementDim[elm_type] == (dim-1) ) ) ) // real element or boundary element?
│ │ │ │ -
646 {
│ │ │ │ -
647 skipline(file); // skip rest of line if element is unknown
│ │ │ │ -
648 return;
│ │ │ │ -
649 }
│ │ │ │ -
650
│ │ │ │ -
651 // The format string for parsing is n times '%d' in a row
│ │ │ │ -
652 std::string formatString = "%d";
│ │ │ │ -
653 for (int i=1; i<nDofs[elm_type]; i++)
│ │ │ │ -
654 formatString += " %d";
│ │ │ │ -
655 formatString += "\n";
│ │ │ │ -
656
│ │ │ │ -
657 // '10' is the largest number of dofs we may encounter in a .msh file
│ │ │ │ -
658 std::vector<int> elementDofs(10);
│ │ │ │ -
659
│ │ │ │ -
660 readfile(file,nDofs[elm_type], formatString.c_str(),
│ │ │ │ -
661 &(elementDofs[0]),&(elementDofs[1]),&(elementDofs[2]),
│ │ │ │ -
662 &(elementDofs[3]),&(elementDofs[4]),&(elementDofs[5]),
│ │ │ │ -
663 &(elementDofs[6]),&(elementDofs[7]),&(elementDofs[8]),
│ │ │ │ -
664 &(elementDofs[9]));
│ │ │ │ -
665
│ │ │ │ -
666 // correct differences between gmsh and Dune in the local vertex numbering
│ │ │ │ -
667 switch (elm_type)
│ │ │ │ -
668 {
│ │ │ │ -
669 case 3 : // 4-node quadrilateral
│ │ │ │ -
670 std::swap(elementDofs[2],elementDofs[3]);
│ │ │ │ -
671 break;
│ │ │ │ -
672 case 5 : // 8-node hexahedron
│ │ │ │ -
673 std::swap(elementDofs[2],elementDofs[3]);
│ │ │ │ -
674 std::swap(elementDofs[6],elementDofs[7]);
│ │ │ │ -
675 break;
│ │ │ │ -
676 case 7 : // 5-node pyramid
│ │ │ │ -
677 std::swap(elementDofs[2],elementDofs[3]);
│ │ │ │ -
678 break;
│ │ │ │ -
679 }
│ │ │ │ -
680
│ │ │ │ -
681 // renumber corners to account for the explicitly given vertex
│ │ │ │ -
682 // numbering in the file
│ │ │ │ -
683 std::vector<unsigned int> vertices(nVertices[elm_type]);
│ │ │ │ -
684
│ │ │ │ -
685 for (int i=0; i<nVertices[elm_type]; i++)
│ │ │ │ -
686 vertices[i] = renumber[elementDofs[i]];
│ │ │ │ -
687
│ │ │ │ -
688 // If it is an element, insert it as such
│ │ │ │ -
689 if (elementDim[elm_type] == dim) {
│ │ │ │ -
690
│ │ │ │ -
691 switch (elm_type)
│ │ │ │ -
692 {
│ │ │ │ -
693 case 1 : // 2-node line
│ │ │ │ -
694 factory.insertElement(Dune::GeometryTypes::line,vertices);
│ │ │ │ -
695 break;
│ │ │ │ -
696 case 2 : // 3-node triangle
│ │ │ │ -
697 factory.insertElement(Dune::GeometryTypes::triangle,vertices);
│ │ │ │ -
698 break;
│ │ │ │ -
699 case 3 : // 4-node quadrilateral
│ │ │ │ -
700 factory.insertElement(Dune::GeometryTypes::quadrilateral,vertices);
│ │ │ │ -
701 break;
│ │ │ │ -
702 case 4 : // 4-node tetrahedron
│ │ │ │ -
703 factory.insertElement(Dune::GeometryTypes::tetrahedron,vertices);
│ │ │ │ -
704 break;
│ │ │ │ -
705 case 5 : // 8-node hexahedron
│ │ │ │ -
706 factory.insertElement(Dune::GeometryTypes::hexahedron,vertices);
│ │ │ │ -
707 break;
│ │ │ │ -
708 case 6 : // 6-node prism
│ │ │ │ -
709 factory.insertElement(Dune::GeometryTypes::prism,vertices);
│ │ │ │ -
710 break;
│ │ │ │ -
711 case 7 : // 5-node pyramid
│ │ │ │ -
712 factory.insertElement(Dune::GeometryTypes::pyramid,vertices);
│ │ │ │ -
713 break;
│ │ │ │ -
714 case 9 : // 6-node triangle
│ │ │ │ -
715 factory.insertElement(Dune::GeometryTypes::triangle,vertices);
│ │ │ │ -
716 break;
│ │ │ │ -
717 case 11 : // 10-node tetrahedron
│ │ │ │ -
718 factory.insertElement(Dune::GeometryTypes::tetrahedron,vertices);
│ │ │ │ -
719 break;
│ │ │ │ -
720 }
│ │ │ │ -
721
│ │ │ │ -
722 } else {
│ │ │ │ -
723 // it must be a boundary segment then
│ │ │ │ - │ │ │ │ -
725
│ │ │ │ -
726 switch (elm_type)
│ │ │ │ -
727 {
│ │ │ │ -
728 case 1 : // 2-node line
│ │ │ │ -
729 factory.insertBoundarySegment(vertices);
│ │ │ │ -
730 break;
│ │ │ │ -
731
│ │ │ │ -
732 case 2 : // 3-node triangle
│ │ │ │ -
733 factory.insertBoundarySegment(vertices);
│ │ │ │ -
734 break;
│ │ │ │ -
735
│ │ │ │ -
736 case 3 : // 4-node quadrilateral
│ │ │ │ -
737 factory.insertBoundarySegment(vertices);
│ │ │ │ -
738 break;
│ │ │ │ -
739
│ │ │ │ -
740 case 15 : // 1-node point
│ │ │ │ -
741 factory.insertBoundarySegment(vertices);
│ │ │ │ -
742 break;
│ │ │ │ -
743
│ │ │ │ -
744 case 8 : { // 3-node line
│ │ │ │ -
745 std::array<FieldVector<double,dimWorld>, 3> v;
│ │ │ │ -
746 for (int i=0; i<dimWorld; i++) {
│ │ │ │ -
747 v[0][i] = nodes[elementDofs[0]][i];
│ │ │ │ -
748 v[1][i] = nodes[elementDofs[2]][i]; // yes, the renumbering is intended!
│ │ │ │ -
749 v[2][i] = nodes[elementDofs[1]][i];
│ │ │ │ -
750 }
│ │ │ │ -
751 BoundarySegment<dim,dimWorld>* newBoundarySegment
│ │ │ │ -
752 = (BoundarySegment<dim,dimWorld>*) new GmshReaderQuadraticBoundarySegment< 2, dimWorld >(v[0], v[1], v[2]);
│ │ │ │ -
753 factory.insertBoundarySegment(vertices,
│ │ │ │ -
754 std::shared_ptr<BoundarySegment<dim,dimWorld> >(newBoundarySegment));
│ │ │ │ -
755 break;
│ │ │ │ -
756 }
│ │ │ │ -
757 case 9 : { // 6-node triangle
│ │ │ │ -
758 boundarysegment_insert(nodes, elementDofs, vertices);
│ │ │ │ -
759 break;
│ │ │ │ -
760 }
│ │ │ │ -
761 default: {
│ │ │ │ -
762 DUNE_THROW(Dune::IOError, "GmshReader does not support using element-type " << elm_type << " for boundary segments");
│ │ │ │ -
763 break;
│ │ │ │ -
764 }
│ │ │ │ -
765
│ │ │ │ -
766 }
│ │ │ │ -
767
│ │ │ │ -
768 }
│ │ │ │ -
769 }
│ │ │ │ -
770
│ │ │ │ -
771 // count elements and boundary elements
│ │ │ │ -
772 if (elementDim[elm_type] == dim) {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
775 } else {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
778 }
│ │ │ │ -
779
│ │ │ │ -
780 }
│ │ │ │ -
│ │ │ │ -
781
│ │ │ │ -
782 };
│ │ │ │ -
│ │ │ │ -
783
│ │ │ │ -
│ │ │ │ -
784 namespace Gmsh {
│ │ │ │ -
│ │ │ │ -
790 enum class ReaderOptions
│ │ │ │ -
791 {
│ │ │ │ -
792 verbose = 1,
│ │ │ │ - │ │ │ │ -
794 readElementData = 4,
│ │ │ │ - │ │ │ │ -
796 };
│ │ │ │ -
│ │ │ │ -
797
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
800 {
│ │ │ │ -
801 return static_cast<ReaderOptions>(
│ │ │ │ -
802 static_cast<int>(a) | static_cast<int>(b)
│ │ │ │ -
803 );
│ │ │ │ -
804 }
│ │ │ │ -
│ │ │ │ -
805
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
808 {
│ │ │ │ -
809 return static_cast<int>(a) & static_cast<int>(b);
│ │ │ │ -
810 }
│ │ │ │ -
│ │ │ │ -
811
│ │ │ │ -
812 } // end namespace Gmsh
│ │ │ │ -
│ │ │ │ -
813
│ │ │ │ -
838 template<typename GridType>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
840 {
│ │ │ │ -
842
│ │ │ │ -
861 static void doRead(Dune::GridFactory<GridType> &factory,
│ │ │ │ -
862 const std::string &fileName,
│ │ │ │ -
863 std::vector<int>& boundarySegmentToPhysicalEntity,
│ │ │ │ -
864 std::vector<int>& elementToPhysicalEntity,
│ │ │ │ -
865 bool verbose, bool insertBoundarySegments)
│ │ │ │ -
866 {
│ │ │ │ -
867 // register boundary segment to boundary segment factory for possible load balancing
│ │ │ │ -
868 // this needs to be done on all cores since the type might not be known otherwise
│ │ │ │ -
869 GmshReaderQuadraticBoundarySegment< Grid::dimension, Grid::dimensionworld >::registerFactory();
│ │ │ │ -
870
│ │ │ │ -
871#ifndef NDEBUG
│ │ │ │ -
872 // check that this method is called on all cores
│ │ │ │ -
873 factory.comm().barrier();
│ │ │ │ -
874#endif
│ │ │ │ -
875
│ │ │ │ -
876 // create parse object and read grid on process 0
│ │ │ │ -
877 if (factory.comm().rank() == 0)
│ │ │ │ -
878 {
│ │ │ │ -
879 GmshReaderParser<Grid> parser(factory,verbose,insertBoundarySegments);
│ │ │ │ -
880 parser.read(fileName);
│ │ │ │ -
881
│ │ │ │ -
882 boundarySegmentToPhysicalEntity = std::move(parser.boundaryIdMap());
│ │ │ │ -
883 elementToPhysicalEntity = std::move(parser.elementIndexMap());
│ │ │ │ -
884 }
│ │ │ │ -
885 else
│ │ │ │ -
886 {
│ │ │ │ -
887 boundarySegmentToPhysicalEntity = {};
│ │ │ │ -
888 elementToPhysicalEntity = {};
│ │ │ │ -
889 }
│ │ │ │ -
890 }
│ │ │ │ -
891
│ │ │ │ -
893
│ │ │ │ -
912 template<class T>
│ │ │ │ -
913 static T &discarded(T &&value) { return static_cast<T&>(value); }
│ │ │ │ -
914
│ │ │ │ -
915 struct DataArg {
│ │ │ │ -
916 std::vector<int> *data_ = nullptr;
│ │ │ │ -
917 DataArg(std::vector<int> &data) : data_(&data) {}
│ │ │ │ -
918 DataArg(const decltype(std::ignore)&) {}
│ │ │ │ -
919 DataArg() = default;
│ │ │ │ -
920 };
│ │ │ │ -
921
│ │ │ │ -
922 struct DataFlagArg : DataArg {
│ │ │ │ -
923 bool flag_ = false;
│ │ │ │ -
924 using DataArg::DataArg;
│ │ │ │ -
925 DataFlagArg(bool flag) : flag_(flag) {}
│ │ │ │ -
926 };
│ │ │ │ -
927
│ │ │ │ -
928 public:
│ │ │ │ -
929 typedef GridType Grid;
│ │ │ │ -
930
│ │ │ │ -
│ │ │ │ -
937 static std::unique_ptr<Grid> read (const std::string& fileName, bool verbose = true, bool insertBoundarySegments=true)
│ │ │ │ -
938 {
│ │ │ │ -
939 // make a grid factory
│ │ │ │ - │ │ │ │ -
941
│ │ │ │ -
942 read(factory, fileName, verbose, insertBoundarySegments);
│ │ │ │ -
943
│ │ │ │ -
944 return factory.createGrid();
│ │ │ │ -
945 }
│ │ │ │ -
│ │ │ │ -
946
│ │ │ │ -
│ │ │ │ -
966 static std::unique_ptr<Grid> read (const std::string& fileName,
│ │ │ │ -
967 std::vector<int>& boundarySegmentToPhysicalEntity,
│ │ │ │ -
968 std::vector<int>& elementToPhysicalEntity,
│ │ │ │ -
969 bool verbose = true, bool insertBoundarySegments=true)
│ │ │ │ -
970 {
│ │ │ │ -
971 // make a grid factory
│ │ │ │ - │ │ │ │ -
973
│ │ │ │ -
974 doRead(
│ │ │ │ -
975 factory, fileName, boundarySegmentToPhysicalEntity,
│ │ │ │ -
976 elementToPhysicalEntity, verbose, insertBoundarySegments
│ │ │ │ -
977 );
│ │ │ │ -
978
│ │ │ │ -
979 return factory.createGrid();
│ │ │ │ -
980 }
│ │ │ │ -
│ │ │ │ -
981
│ │ │ │ -
│ │ │ │ -
983 static void read (Dune::GridFactory<Grid>& factory, const std::string& fileName,
│ │ │ │ -
984 bool verbose = true, bool insertBoundarySegments=true)
│ │ │ │ -
985 {
│ │ │ │ -
986 doRead(
│ │ │ │ -
987 factory, fileName, discarded(std::vector<int>{}),
│ │ │ │ -
988 discarded(std::vector<int>{}), verbose, insertBoundarySegments
│ │ │ │ -
989 );
│ │ │ │ -
990 }
│ │ │ │ -
│ │ │ │ -
991
│ │ │ │ -
993
│ │ │ │ -
│ │ │ │ -
1016 static void read (Dune::GridFactory<Grid> &factory,
│ │ │ │ -
1017 const std::string &fileName,
│ │ │ │ -
1018 DataFlagArg boundarySegmentData,
│ │ │ │ -
1019 DataArg elementData,
│ │ │ │ -
1020 bool verbose=true)
│ │ │ │ -
1021 {
│ │ │ │ -
1022 doRead(
│ │ │ │ -
1023 factory, fileName,
│ │ │ │ -
1024 boundarySegmentData.data_
│ │ │ │ -
1025 ? *boundarySegmentData.data_ : discarded(std::vector<int>{}),
│ │ │ │ -
1026 elementData.data_
│ │ │ │ -
1027 ? *elementData.data_ : discarded(std::vector<int>{}),
│ │ │ │ -
1028 verbose,
│ │ │ │ -
1029 boundarySegmentData.flag_ || boundarySegmentData.data_
│ │ │ │ -
1030 );
│ │ │ │ -
1031 }
│ │ │ │ -
│ │ │ │ -
1032
│ │ │ │ -
│ │ │ │ -
1053 static void read (Dune::GridFactory<Grid>& factory,
│ │ │ │ -
1054 const std::string& fileName,
│ │ │ │ -
1055 std::vector<int>& boundarySegmentToPhysicalEntity,
│ │ │ │ -
1056 std::vector<int>& elementToPhysicalEntity,
│ │ │ │ -
1057 bool verbose, bool insertBoundarySegments)
│ │ │ │ -
1058 {
│ │ │ │ -
1059 doRead(
│ │ │ │ -
1060 factory, fileName, boundarySegmentToPhysicalEntity,
│ │ │ │ -
1061 elementToPhysicalEntity, verbose, insertBoundarySegments
│ │ │ │ -
1062 );
│ │ │ │ -
1063 }
│ │ │ │ -
│ │ │ │ -
1064
│ │ │ │ -
1066 //\{
│ │ │ │ -
1067
│ │ │ │ - │ │ │ │ -
1069
│ │ │ │ -
1070 static constexpr Opts defaultOpts =
│ │ │ │ -
1071 Opts::verbose | Opts::insertBoundarySegments | Opts::readElementData | Opts::readBoundaryData;
│ │ │ │ -
1072
│ │ │ │ -
1074
│ │ │ │ -
│ │ │ │ -
1097 GmshReader(const std::string& fileName,
│ │ │ │ - │ │ │ │ -
1099 {
│ │ │ │ -
1100 gridFactory_ = std::make_unique<Dune::GridFactory<Grid>>();
│ │ │ │ -
1101 readGridFile(fileName, *gridFactory_, options);
│ │ │ │ -
1102 }
│ │ │ │ -
│ │ │ │ -
1103
│ │ │ │ -
│ │ │ │ -
1111 GmshReader(const std::string& fileName, GridFactory<Grid>& factory,
│ │ │ │ - │ │ │ │ -
1113 {
│ │ │ │ -
1114 readGridFile(fileName, factory, options);
│ │ │ │ -
1115 }
│ │ │ │ -
│ │ │ │ -
1116
│ │ │ │ -
│ │ │ │ -
1118 const std::vector<int>& elementData () const
│ │ │ │ -
1119 {
│ │ │ │ -
1120 checkElementData();
│ │ │ │ -
1121 return elementIndexToGmshPhysicalEntity_;
│ │ │ │ -
1122 }
│ │ │ │ -
│ │ │ │ -
1123
│ │ │ │ -
│ │ │ │ -
1125 const std::vector<int>& boundaryData () const
│ │ │ │ -
1126 {
│ │ │ │ -
1127 checkBoundaryData();
│ │ │ │ -
1128 return boundarySegmentIndexToGmshPhysicalEntity_;
│ │ │ │ -
1129 }
│ │ │ │ -
│ │ │ │ -
1130
│ │ │ │ -
│ │ │ │ -
1135 bool hasElementData () const
│ │ │ │ -
1136 { return hasElementData_ && !extractedElementData_; }
│ │ │ │ -
│ │ │ │ -
1137
│ │ │ │ -
│ │ │ │ -
1142 bool hasBoundaryData () const
│ │ │ │ -
1143 { return hasBoundaryData_ && !extractedBoundaryData_; }
│ │ │ │ -
│ │ │ │ -
1144
│ │ │ │ -
│ │ │ │ -
1146 std::vector<int> extractElementData ()
│ │ │ │ -
1147 {
│ │ │ │ -
1148 checkElementData();
│ │ │ │ -
1149 extractedElementData_ = true;
│ │ │ │ -
1150 return std::move(elementIndexToGmshPhysicalEntity_);
│ │ │ │ -
1151 }
│ │ │ │ -
│ │ │ │ -
1152
│ │ │ │ -
│ │ │ │ -
1154 std::vector<int> extractBoundaryData ()
│ │ │ │ -
1155 {
│ │ │ │ -
1156 checkBoundaryData();
│ │ │ │ -
1157 extractedBoundaryData_ = true;
│ │ │ │ -
1158 return std::move(boundarySegmentIndexToGmshPhysicalEntity_);
│ │ │ │ -
1159 }
│ │ │ │ -
│ │ │ │ -
1160
│ │ │ │ -
│ │ │ │ -
1162 std::unique_ptr<Grid> createGrid ()
│ │ │ │ -
1163 {
│ │ │ │ -
1164 if (!gridFactory_)
│ │ │ │ -
1165 DUNE_THROW(Dune::InvalidStateException,
│ │ │ │ -
1166 "This GmshReader has been constructed with a Dune::GridFactory. "
│ │ │ │ -
1167 << "This grid factory has been filled with all information to create a grid. "
│ │ │ │ -
1168 << "Please use this factory to create the grid by calling factory.createGrid(). "
│ │ │ │ -
1169 << "Alternatively use the constructor without passing the factory in combination with this member function."
│ │ │ │ -
1170 );
│ │ │ │ -
1171
│ │ │ │ -
1172 return gridFactory_->createGrid();
│ │ │ │ -
1173 }
│ │ │ │ -
│ │ │ │ -
1174
│ │ │ │ -
1175 //\}
│ │ │ │ -
1176
│ │ │ │ -
1177 private:
│ │ │ │ -
1178 void checkElementData () const
│ │ │ │ -
1179 {
│ │ │ │ -
1180 if (!hasElementData_)
│ │ │ │ -
1181 DUNE_THROW(Dune::InvalidStateException,
│ │ │ │ -
1182 "This GmshReader has been constructed without the option 'readElementData'. "
│ │ │ │ -
1183 << "Please enable reading element data by passing the option 'Gmsh::ReaderOpts::readElementData' "
│ │ │ │ -
1184 << "to the constructor of this class."
│ │ │ │ -
1185 );
│ │ │ │ -
1186
│ │ │ │ -
1187 if (extractedElementData_)
│ │ │ │ -
1188 DUNE_THROW(Dune::InvalidStateException,
│ │ │ │ -
1189 "The element data has already been extracted from this GmshReader "
│ │ │ │ -
1190 << "via a function call to reader.extractElementData(). Use the extracted data or "
│ │ │ │ -
1191 << "read the grid data from file again by constructing a new reader."
│ │ │ │ -
1192 );
│ │ │ │ -
1193 }
│ │ │ │ -
1194
│ │ │ │ -
1195 void checkBoundaryData () const
│ │ │ │ -
1196 {
│ │ │ │ -
1197 if (!hasBoundaryData_)
│ │ │ │ -
1198 DUNE_THROW(Dune::InvalidStateException,
│ │ │ │ -
1199 "This GmshReader has been constructed without the option 'readBoundaryData'. "
│ │ │ │ -
1200 << "Please enable reading boundary data by passing the option 'Gmsh::ReaderOpts::readBoundaryData' "
│ │ │ │ -
1201 << "to the constructor of this class."
│ │ │ │ -
1202 );
│ │ │ │ -
1203
│ │ │ │ -
1204 if (extractedBoundaryData_)
│ │ │ │ -
1205 DUNE_THROW(Dune::InvalidStateException,
│ │ │ │ -
1206 "The boundary data has already been extracted from this GmshReader "
│ │ │ │ -
1207 << "via a function call to reader.extractBoundaryData(). Use the extracted data or "
│ │ │ │ -
1208 << "read the grid data from file again by constructing a new reader."
│ │ │ │ -
1209 );
│ │ │ │ -
1210 }
│ │ │ │ -
1211
│ │ │ │ -
1212 void readGridFile (const std::string& fileName, GridFactory<Grid>& factory, Gmsh::ReaderOptions options)
│ │ │ │ -
1213 {
│ │ │ │ -
1214 const bool verbose = options & Opts::verbose;
│ │ │ │ -
1215 const bool insertBoundarySegments = options & Opts::insertBoundarySegments;
│ │ │ │ -
1216 const bool readBoundaryData = options & Opts::readBoundaryData;
│ │ │ │ -
1217 const bool readElementData = options & Opts::readElementData;
│ │ │ │ -
1218
│ │ │ │ -
1219 doRead(
│ │ │ │ -
1220 factory, fileName, boundarySegmentIndexToGmshPhysicalEntity_,
│ │ │ │ -
1221 elementIndexToGmshPhysicalEntity_, verbose,
│ │ │ │ -
1222 readBoundaryData || insertBoundarySegments
│ │ │ │ -
1223 );
│ │ │ │ -
1224
│ │ │ │ -
1225 // clear unwanted data
│ │ │ │ -
1226 if (!readBoundaryData)
│ │ │ │ -
1227 boundarySegmentIndexToGmshPhysicalEntity_ = std::vector<int>{};
│ │ │ │ -
1228 if (!readElementData)
│ │ │ │ -
1229 elementIndexToGmshPhysicalEntity_ = std::vector<int>{};
│ │ │ │ -
1230
│ │ │ │ -
1231 hasElementData_ = readElementData;
│ │ │ │ -
1232 hasBoundaryData_ = readBoundaryData;
│ │ │ │ -
1233 }
│ │ │ │ -
1234
│ │ │ │ -
1235 std::unique_ptr<Dune::GridFactory<Grid>> gridFactory_;
│ │ │ │ -
1236
│ │ │ │ -
1237 std::vector<int> elementIndexToGmshPhysicalEntity_;
│ │ │ │ -
1238 std::vector<int> boundarySegmentIndexToGmshPhysicalEntity_;
│ │ │ │ -
1239
│ │ │ │ -
1240 bool hasElementData_;
│ │ │ │ -
1241 bool hasBoundaryData_;
│ │ │ │ -
1242
│ │ │ │ -
1243 // for better error messages, we keep track of these separately
│ │ │ │ -
1244 bool extractedElementData_ = false;
│ │ │ │ -
1245 bool extractedBoundaryData_ = false;
│ │ │ │ -
1246 };
│ │ │ │ -
│ │ │ │ -
1247
│ │ │ │ -
1250} // namespace Dune
│ │ │ │ -
1251
│ │ │ │ -
1252#endif
│ │ │ │ -
Base class for grid boundary segments of arbitrary geometry.
│ │ │ │ -
ReaderOptions
Option for the Gmsh mesh file reader.
Definition gmshreader.hh:791
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T > &b)
Definition utility/persistentcontainer.hh:83
│ │ │ │ +
32 typedef typename GridView::Grid::ctype ctype;
│ │ │ │ +
33
│ │ │ │ +
34 constexpr static int dimworld = GridView::dimensionworld;
│ │ │ │ +
35
│ │ │ │ +
36 public:
│ │ │ │ +
│ │ │ │ +
37 GnuplotWriter (const GridView & gv) : _is(gv.indexSet()), _gv(gv)
│ │ │ │ +
38 {
│ │ │ │ +
39 static_assert(dimworld==1 || dimworld==2, "GnuPlot export only works for worlddim==1 and worlddim==2");
│ │ │ │ +
40 // allocate _data buffer
│ │ │ │ +
41 _data.resize(_is.size(0)*2);
│ │ │ │ +
42 }
│ │ │ │ +
│ │ │ │ +
43
│ │ │ │ +
48 template <class DataContainer>
│ │ │ │ +
│ │ │ │ +
49 void addCellData(const DataContainer& data, const std::string & name)
│ │ │ │ +
50 {
│ │ │ │ +
51 if (dimworld!=1)
│ │ │ │ +
52 DUNE_THROW(IOError, "Gnuplot cell data writing is only supported for grids in a 1d world!");
│ │ │ │ +
53 addData(cellData, data, name);
│ │ │ │ +
54 }
│ │ │ │ +
│ │ │ │ +
55
│ │ │ │ +
60 template <class DataContainer>
│ │ │ │ +
│ │ │ │ +
61 void addVertexData(const DataContainer& data, const std::string & name)
│ │ │ │ +
62 {
│ │ │ │ +
63 addData(vertexData, data, name);
│ │ │ │ +
64 }
│ │ │ │ +
│ │ │ │ +
65
│ │ │ │ +
69 void write(const std::string& filename) const;
│ │ │ │ +
70
│ │ │ │ +
71 private:
│ │ │ │ +
72 enum DataType { vertexData, cellData };
│ │ │ │ +
73 const typename GridView::IndexSet & _is;
│ │ │ │ +
74 const GridView _gv;
│ │ │ │ +
75 std::vector< std::vector< float > > _data;
│ │ │ │ +
76 std::vector< std::string > _names;
│ │ │ │ +
77
│ │ │ │ +
78 template <class DataContainer>
│ │ │ │ +
79 void addData(DataType t, const DataContainer& data, const std::string & name);
│ │ │ │ +
80
│ │ │ │ +
81 void writeRow(std::ostream & file,
│ │ │ │ +
82 const FieldVector<ctype, dimworld>& position,
│ │ │ │ +
83 const std::vector<float> & data) const;
│ │ │ │ +
84 };
│ │ │ │ +
│ │ │ │ +
85
│ │ │ │ +
89 template<class G>
│ │ │ │ +
│ │ │ │ +
90 class LeafGnuplotWriter : public GnuplotWriter<typename G::LeafGridView>
│ │ │ │ +
91 {
│ │ │ │ +
92 public:
│ │ │ │ +
│ │ │ │ +
94 LeafGnuplotWriter (const G& grid)
│ │ │ │ +
95 : GnuplotWriter<typename G::LeafGridView>(grid.leafGridView())
│ │ │ │ +
96 {}
│ │ │ │ +
│ │ │ │ +
97 };
│ │ │ │ +
│ │ │ │ +
98
│ │ │ │ +
102 template<class G>
│ │ │ │ +
│ │ │ │ +
103 class LevelGnuplotWriter : public GnuplotWriter<typename G::LevelGridView>
│ │ │ │ +
104 {
│ │ │ │ +
105 public:
│ │ │ │ +
│ │ │ │ +
107 LevelGnuplotWriter (const G& grid, int level)
│ │ │ │ +
108 : GnuplotWriter<typename G::LevelGridView>(grid.levelGridView(level))
│ │ │ │ +
109 {}
│ │ │ │ +
│ │ │ │ +
110 };
│ │ │ │ +
│ │ │ │ +
111
│ │ │ │ +
112}
│ │ │ │ +
113
│ │ │ │ +
114#include "gnuplot/gnuplot.cc"
│ │ │ │ +
115
│ │ │ │ +
116#endif // DUNE_IO_GNUPLOT_HH
│ │ │ │ +
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:805
│ │ │ │ +
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:788
│ │ │ │ +
static constexpr int dimensionworld
The dimension of the world the grid lives in.
Definition common/gridview.hh:137
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
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:807
│ │ │ │ -
constexpr ReaderOptions operator|(ReaderOptions a, ReaderOptions b)
composition operator for reader options
Definition gmshreader.hh:799
│ │ │ │ -
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:258
│ │ │ │ -
Provide a generic factory class for unstructured grids.
Definition common/gridfactory.hh:275
│ │ │ │ -
virtual std::unique_ptr< GridType > createGrid()
Finalize grid creation and hand over the grid.
Definition common/gridfactory.hh:333
│ │ │ │ -
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
│ │ │ │ -
std::vector< std::string > & physicalEntityNames()
Returns the names of the gmsh physical entities (0-based index)
Definition gmshreader.hh:373
│ │ │ │ -
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:545
│ │ │ │ -
static const int dimWorld
Definition gmshreader.hh:321
│ │ │ │ -
Dune::GridFactory< GridType > & factory
Definition gmshreader.hh:305
│ │ │ │ -
std::vector< int > & boundaryIdMap()
Definition gmshreader.hh:361
│ │ │ │ -
void readfile(FILE *file, int cnt, const char *format,...)
Definition gmshreader.hh:331
│ │ │ │ -
std::vector< int > & elementIndexMap()
Returns a map for the gmsh physical entity id (1-based index) for each entity of codim 0.
Definition gmshreader.hh:367
│ │ │ │ -
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:608
│ │ │ │ -
GmshReaderParser(Dune::GridFactory< GridType > &_factory, bool v, bool i)
Definition gmshreader.hh:358
│ │ │ │ -
int element_count
Definition gmshreader.hh:310
│ │ │ │ -
void read(const std::string &f)
Definition gmshreader.hh:378
│ │ │ │ -
void skipline(FILE *file)
Definition gmshreader.hh:348
│ │ │ │ -
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:633
│ │ │ │ -
static const int dim
Definition gmshreader.hh:320
│ │ │ │ -
FieldVector< double, dimWorld > GlobalVector
Definition gmshreader.hh:325
│ │ │ │ -
std::string fileName
Definition gmshreader.hh:313
│ │ │ │ -
std::vector< std::string > physical_entity_names
Definition gmshreader.hh:317
│ │ │ │ -
int boundary_element_count
Definition gmshreader.hh:309
│ │ │ │ -
void boundarysegment_insert(const V &, const E &, const V2 &)
Definition gmshreader.hh:597
│ │ │ │ -
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:840
│ │ │ │ -
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:966
│ │ │ │ -
const std::vector< int > & elementData() const
Access element data (maps element index to Gmsh physical entity)
Definition gmshreader.hh:1118
│ │ │ │ -
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:1016
│ │ │ │ -
static std::unique_ptr< Grid > read(const std::string &fileName, bool verbose=true, bool insertBoundarySegments=true)
Definition gmshreader.hh:937
│ │ │ │ -
static void read(Dune::GridFactory< Grid > &factory, const std::string &fileName, bool verbose=true, bool insertBoundarySegments=true)
Definition gmshreader.hh:983
│ │ │ │ -
GridType Grid
Definition gmshreader.hh:929
│ │ │ │ -
std::unique_ptr< Grid > createGrid()
Create the grid.
Definition gmshreader.hh:1162
│ │ │ │ -
std::vector< int > extractBoundaryData()
Erase boundary data from reader and return the data.
Definition gmshreader.hh:1154
│ │ │ │ -
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:1053
│ │ │ │ -
bool hasElementData() const
If element data is available.
Definition gmshreader.hh:1135
│ │ │ │ -
bool hasBoundaryData() const
If boundary data is available.
Definition gmshreader.hh:1142
│ │ │ │ -
static constexpr Opts defaultOpts
Definition gmshreader.hh:1070
│ │ │ │ -
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:1111
│ │ │ │ -
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:1097
│ │ │ │ -
std::vector< int > extractElementData()
Erase element data from reader and return the data.
Definition gmshreader.hh:1146
│ │ │ │ -
const std::vector< int > & boundaryData() const
Access boundary data (maps boundary segment index to Gmsh physical entity)
Definition gmshreader.hh:1125
│ │ │ │ -
Provide a generic factory class for unstructured grids.
│ │ │ │ +
Grid view abstract base class.
Definition common/gridview.hh:66
│ │ │ │ +
Writer for 1D grids in gnuplot format.
Definition gnuplot.hh:30
│ │ │ │ +
void addVertexData(const DataContainer &data, const std::string &name)
Add vertex data.
Definition gnuplot.hh:61
│ │ │ │ +
void addCellData(const DataContainer &data, const std::string &name)
Add cell data.
Definition gnuplot.hh:49
│ │ │ │ +
void write(const std::string &filename) const
Write Gnuplot file to disk.
Definition gnuplot.cc:19
│ │ │ │ +
GnuplotWriter(const GridView &gv)
Definition gnuplot.hh:37
│ │ │ │ +
GnuplotWriter on the leaf grid.
Definition gnuplot.hh:91
│ │ │ │ +
LeafGnuplotWriter(const G &grid)
Construct a Gnuplot writer for the leaf level of a given grid.
Definition gnuplot.hh:94
│ │ │ │ +
GnuplotWriter on a given level grid.
Definition gnuplot.hh:104
│ │ │ │ +
LevelGnuplotWriter(const G &grid, int level)
Construct a Gnuplot writer for a certain level of a given grid.
Definition gnuplot.hh:107
│ │ │ │ +
Different resources needed by all grid implementations.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,1334 +2,162 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ -gmshreader.hh │ │ │ │ │ +gnuplot.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 © 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_GMSHREADER_HH │ │ │ │ │ -7#define DUNE_GMSHREADER_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 │ │ │ │ │ -21#include │ │ │ │ │ -22#include │ │ │ │ │ +5#ifndef DUNE_IO_GNUPLOT_HH │ │ │ │ │ +6#define DUNE_IO_GNUPLOT_HH │ │ │ │ │ +7 │ │ │ │ │ +13#include │ │ │ │ │ +14#include │ │ │ │ │ +15#include │ │ │ │ │ +16#include │ │ │ │ │ +17 │ │ │ │ │ +18#include │ │ │ │ │ +19 │ │ │ │ │ +20#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_._h_h> │ │ │ │ │ +21 │ │ │ │ │ +22namespace _D_u_n_e { │ │ │ │ │ 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{ │ │ │ │ │ +29 template │ │ │ │ │ +_3_0 class _G_n_u_p_l_o_t_W_r_i_t_e_r { │ │ │ │ │ 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 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() = _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 } │ │ │ │ │ -102 │ │ │ │ │ -103 virtual _G_l_o_b_a_l_V_e_c_t_o_r operator() ( const Dune::FieldVector &local │ │ │ │ │ -) const │ │ │ │ │ +32 typedef typename GridView::Grid::ctype ctype; │ │ │ │ │ +33 │ │ │ │ │ +34 constexpr static int dimworld = _G_r_i_d_V_i_e_w_:_:_d_i_m_e_n_s_i_o_n_w_o_r_l_d; │ │ │ │ │ +35 │ │ │ │ │ +36 public: │ │ │ │ │ +_3_7 _G_n_u_p_l_o_t_W_r_i_t_e_r (const _G_r_i_d_V_i_e_w & gv) : _is(gv.indexSet()), _gv(gv) │ │ │ │ │ +38 { │ │ │ │ │ +39 static_assert(dimworld==1 || dimworld==2, "GnuPlot export only works for │ │ │ │ │ +worlddim==1 and worlddim==2"); │ │ │ │ │ +40 // allocate _data buffer │ │ │ │ │ +41 _data.resize(_is.size(0)*2); │ │ │ │ │ +42 } │ │ │ │ │ +43 │ │ │ │ │ +48 template │ │ │ │ │ +_4_9 void _a_d_d_C_e_l_l_D_a_t_a(const DataContainer& data, const std::string & name) │ │ │ │ │ +50 { │ │ │ │ │ +51 if (dimworld!=1) │ │ │ │ │ +52 DUNE_THROW(IOError, "Gnuplot cell data writing is only supported for grids │ │ │ │ │ +in a 1d world!"); │ │ │ │ │ +53 addData(cellData, data, name); │ │ │ │ │ +54 } │ │ │ │ │ +55 │ │ │ │ │ +60 template │ │ │ │ │ +_6_1 void _a_d_d_V_e_r_t_e_x_D_a_t_a(const DataContainer& data, const std::string & name) │ │ │ │ │ +62 { │ │ │ │ │ +63 addData(vertexData, data, name); │ │ │ │ │ +64 } │ │ │ │ │ +65 │ │ │ │ │ +69 void _w_r_i_t_e(const std::string& filename) const; │ │ │ │ │ +70 │ │ │ │ │ +71 private: │ │ │ │ │ +72 enum DataType { vertexData, cellData }; │ │ │ │ │ +73 const typename _G_r_i_d_V_i_e_w_:_:_I_n_d_e_x_S_e_t & _is; │ │ │ │ │ +74 const GridView _gv; │ │ │ │ │ +75 std::vector< std::vector< float > > _data; │ │ │ │ │ +76 std::vector< std::string > _names; │ │ │ │ │ +77 │ │ │ │ │ +78 template │ │ │ │ │ +79 void addData(DataType t, const DataContainer& data, const std::string & │ │ │ │ │ +name); │ │ │ │ │ +80 │ │ │ │ │ +81 void writeRow(std::ostream & file, │ │ │ │ │ +82 const FieldVector& position, │ │ │ │ │ +83 const std::vector & data) const; │ │ │ │ │ +84 }; │ │ │ │ │ +85 │ │ │ │ │ +89 template │ │ │ │ │ +_9_0 class _L_e_a_f_G_n_u_p_l_o_t_W_r_i_t_e_r : public _G_n_u_p_l_o_t_W_r_i_t_e_r │ │ │ │ │ +91 { │ │ │ │ │ +92 public: │ │ │ │ │ +_9_4 _L_e_a_f_G_n_u_p_l_o_t_W_r_i_t_e_r (const G& grid) │ │ │ │ │ +95 : _G_n_u_p_l_o_t_W_r_i_t_e_r(grid._l_e_a_f_G_r_i_d_V_i_e_w()) │ │ │ │ │ +96 {} │ │ │ │ │ +97 }; │ │ │ │ │ +98 │ │ │ │ │ +102 template │ │ │ │ │ +_1_0_3 class _L_e_v_e_l_G_n_u_p_l_o_t_W_r_i_t_e_r : public _G_n_u_p_l_o_t_W_r_i_t_e_r │ │ │ │ │ 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 │ │ │ │ │ -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 _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; │ │ │ │ │ -_3_1_7 std::vector _p_h_y_s_i_c_a_l___e_n_t_i_t_y___n_a_m_e_s; │ │ │ │ │ -318 │ │ │ │ │ -319 // static data │ │ │ │ │ -_3_2_0 static const int _d_i_m = GridType::dimension; │ │ │ │ │ -_3_2_1 static const int _d_i_m_W_o_r_l_d = GridType::dimensionworld; │ │ │ │ │ -322 static_assert( (_d_i_m_W_o_r_l_d <= 3), "GmshReader requires dimWorld <= 3." ); │ │ │ │ │ -323 │ │ │ │ │ -324 // typedefs │ │ │ │ │ -_3_2_5 typedef FieldVector< double, dimWorld > _G_l_o_b_a_l_V_e_c_t_o_r; │ │ │ │ │ -326 │ │ │ │ │ -327 // don't use something like │ │ │ │ │ -328 // readfile(file, 1, "%s\n", buf); │ │ │ │ │ -329 // to skip the rest of of the line -- that will only skip the next │ │ │ │ │ -330 // whitespace-separated word! Use skipline() instead. │ │ │ │ │ -_3_3_1 void _r_e_a_d_f_i_l_e(FILE * file, int cnt, const char * format, ...) │ │ │ │ │ -332#ifdef __GNUC__ │ │ │ │ │ -333 __attribute__((format(scanf, 4, 5))) │ │ │ │ │ -334#endif │ │ │ │ │ -335 { │ │ │ │ │ -336 std::va_list ap; │ │ │ │ │ -337 va_start(ap, format); │ │ │ │ │ -338 off_t pos = ftello(file); │ │ │ │ │ -339 int c = std::vfscanf(file, format, ap); │ │ │ │ │ -340 va_end(ap); │ │ │ │ │ -341 if (c != cnt) │ │ │ │ │ -342 DUNE_THROW(Dune::IOError, "Error parsing " << _f_i_l_e_N_a_m_e << " " │ │ │ │ │ -343 "file pos " << pos │ │ │ │ │ -344 << ": Expected '" << format << "', only read " << c << " entries instead of │ │ │ │ │ -" << cnt << "."); │ │ │ │ │ -345 } │ │ │ │ │ -346 │ │ │ │ │ -347 // skip over the rest of the line, including the terminating newline │ │ │ │ │ -_3_4_8 void _s_k_i_p_l_i_n_e(FILE * file) │ │ │ │ │ -349 { │ │ │ │ │ -350 int c; │ │ │ │ │ -351 do { │ │ │ │ │ -352 c = std::fgetc(file); │ │ │ │ │ -353 } while(c != '\n' && c != EOF); │ │ │ │ │ -354 } │ │ │ │ │ -355 │ │ │ │ │ -356 public: │ │ │ │ │ -357 │ │ │ │ │ -_3_5_8 _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) : │ │ │ │ │ -359 _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) {} │ │ │ │ │ -360 │ │ │ │ │ -_3_6_1 std::vector & _b_o_u_n_d_a_r_y_I_d_M_a_p() │ │ │ │ │ -362 { │ │ │ │ │ -363 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; │ │ │ │ │ -364 } │ │ │ │ │ -365 │ │ │ │ │ -_3_6_7 std::vector & _e_l_e_m_e_n_t_I_n_d_e_x_M_a_p() │ │ │ │ │ -368 { │ │ │ │ │ -369 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; │ │ │ │ │ -370 } │ │ │ │ │ -371 │ │ │ │ │ -_3_7_3 std::vector & _p_h_y_s_i_c_a_l_E_n_t_i_t_y_N_a_m_e_s() │ │ │ │ │ -374 { │ │ │ │ │ -375 return _p_h_y_s_i_c_a_l___e_n_t_i_t_y___n_a_m_e_s; │ │ │ │ │ -376 } │ │ │ │ │ -377 │ │ │ │ │ -_3_7_8 void _r_e_a_d (const std::string& f) │ │ │ │ │ -379 { │ │ │ │ │ -380 if (_v_e_r_b_o_s_e) std::cout << "Reading " << _d_i_m << "d Gmsh grid..." << std:: │ │ │ │ │ -endl; │ │ │ │ │ -381 │ │ │ │ │ -382 // open file name, we use C I/O │ │ │ │ │ -383 _f_i_l_e_N_a_m_e = f; │ │ │ │ │ -384 FILE* file = fopen(_f_i_l_e_N_a_m_e.c_str(),"rb"); │ │ │ │ │ -385 if (file==0) │ │ │ │ │ -386 DUNE_THROW(Dune::IOError, "Could not open " << _f_i_l_e_N_a_m_e); │ │ │ │ │ -387 │ │ │ │ │ -388 //========================================= │ │ │ │ │ -389 // Header: Read vertices into vector │ │ │ │ │ -390 // Check vertices that are needed │ │ │ │ │ -391 //========================================= │ │ │ │ │ -392 │ │ │ │ │ -393 _n_u_m_b_e_r___o_f___r_e_a_l___v_e_r_t_i_c_e_s = 0; │ │ │ │ │ -394 _b_o_u_n_d_a_r_y___e_l_e_m_e_n_t___c_o_u_n_t = 0; │ │ │ │ │ -395 _e_l_e_m_e_n_t___c_o_u_n_t = 0; │ │ │ │ │ -396 │ │ │ │ │ -397 // process header │ │ │ │ │ -398 double version_number; │ │ │ │ │ -399 int file_type, data_size; │ │ │ │ │ -400 │ │ │ │ │ -401 _r_e_a_d_f_i_l_e(file,1,"%s\n",_b_u_f); │ │ │ │ │ -402 if (strcmp(_b_u_f,"$MeshFormat")!=0) │ │ │ │ │ -403 DUNE_THROW(Dune::IOError, "expected $MeshFormat in first line"); │ │ │ │ │ -404 _r_e_a_d_f_i_l_e(file,3,"%lg %d %d\n",&version_number,&file_type,&data_size); │ │ │ │ │ -405 // 2.2 is not representable as float and leads to problems on i386 │ │ │ │ │ -406 // Hence we use >= 2.00001. │ │ │ │ │ -407 if( (version_number < 2.0) || (version_number >= 2.20001) ) // 2.2 is not │ │ │ │ │ -representable as float and leads to problems on i386 │ │ │ │ │ -408 DUNE_THROW(Dune::IOError, "can only read Gmsh version 2 files"); │ │ │ │ │ -409 if (_v_e_r_b_o_s_e) std::cout << "version " << version_number << " Gmsh file │ │ │ │ │ -detected" << std::endl; │ │ │ │ │ -410 _r_e_a_d_f_i_l_e(file,1,"%s\n",_b_u_f); │ │ │ │ │ -411 if (strcmp(_b_u_f,"$EndMeshFormat")!=0) │ │ │ │ │ -412 DUNE_THROW(Dune::IOError, "expected $EndMeshFormat"); │ │ │ │ │ -413 │ │ │ │ │ -414 // physical name section │ │ │ │ │ -415 _p_h_y_s_i_c_a_l___e_n_t_i_t_y___n_a_m_e_s.clear(); │ │ │ │ │ -416 _r_e_a_d_f_i_l_e(file,1,"%s\n",_b_u_f); │ │ │ │ │ -417 if (strcmp(_b_u_f,"$PhysicalNames")==0) { │ │ │ │ │ -418 int number_of_names; │ │ │ │ │ -419 _r_e_a_d_f_i_l_e(file,1,"%d\n",&number_of_names); │ │ │ │ │ -420 if (_v_e_r_b_o_s_e) std::cout << "file contains " << number_of_names << " physical │ │ │ │ │ -entities" << std::endl; │ │ │ │ │ -421 _p_h_y_s_i_c_a_l___e_n_t_i_t_y___n_a_m_e_s.resize(number_of_names); │ │ │ │ │ -422 std::string buf_name; │ │ │ │ │ -423 for( int i = 0; i < number_of_names; ++i ) { │ │ │ │ │ -424 int _d_i_m, id; │ │ │ │ │ -425 _r_e_a_d_f_i_l_e(file,3, "%d %d %s\n", &_d_i_m, &id, _b_u_f); │ │ │ │ │ -426 buf_name.assign(_b_u_f); │ │ │ │ │ -427 auto begin = buf_name.find_first_of('\"') + 1; │ │ │ │ │ -428 auto end = buf_name.find_last_of('\"') - begin; │ │ │ │ │ -429 _p_h_y_s_i_c_a_l___e_n_t_i_t_y___n_a_m_e_s[id-1].assign(buf_name.substr(begin, end)); │ │ │ │ │ -430 } │ │ │ │ │ -431 _r_e_a_d_f_i_l_e(file,1,"%s\n",_b_u_f); │ │ │ │ │ -432 if (strcmp(_b_u_f,"$EndPhysicalNames")!=0) │ │ │ │ │ -433 DUNE_THROW(Dune::IOError, "expected $EndPhysicalNames"); │ │ │ │ │ -434 _r_e_a_d_f_i_l_e(file,1,"%s\n",_b_u_f); │ │ │ │ │ -435 } │ │ │ │ │ -436 │ │ │ │ │ -437 // node section │ │ │ │ │ -438 int number_of_nodes; │ │ │ │ │ -439 │ │ │ │ │ -440 if (strcmp(_b_u_f,"$Nodes")!=0) │ │ │ │ │ -441 DUNE_THROW(Dune::IOError, "expected $Nodes"); │ │ │ │ │ -442 _r_e_a_d_f_i_l_e(file,1,"%d\n",&number_of_nodes); │ │ │ │ │ -443 if (_v_e_r_b_o_s_e) std::cout << "file contains " << number_of_nodes << " nodes" │ │ │ │ │ -<< std::endl; │ │ │ │ │ -444 │ │ │ │ │ -445 // read nodes │ │ │ │ │ -446 // The '+1' is due to the fact that gmsh numbers node starting from 1 │ │ │ │ │ -rather than from 0 │ │ │ │ │ -447 std::vector< GlobalVector > nodes( number_of_nodes+1 ); │ │ │ │ │ -448 { │ │ │ │ │ -449 int id; │ │ │ │ │ -450 double x[ 3 ]; │ │ │ │ │ -451 for( int i = 1; i <= number_of_nodes; ++i ) │ │ │ │ │ -452 { │ │ │ │ │ -453 _r_e_a_d_f_i_l_e(file,4, "%d %lg %lg %lg\n", &id, &x[ 0 ], &x[ 1 ], &x[ 2 ] ); │ │ │ │ │ -454 │ │ │ │ │ -455 if (id > number_of_nodes) { │ │ │ │ │ -456 DUNE_THROW(Dune::IOError, │ │ │ │ │ -457 "Only dense sequences of node indices are currently supported (node index " │ │ │ │ │ -458 << id << " is invalid)."); │ │ │ │ │ -459 } │ │ │ │ │ -460 │ │ │ │ │ -461 // just store node position │ │ │ │ │ -462 for( int j = 0; j < _d_i_m_W_o_r_l_d; ++j ) │ │ │ │ │ -463 nodes[ id ][ j ] = x[ j ]; │ │ │ │ │ -464 } │ │ │ │ │ -465 _r_e_a_d_f_i_l_e(file,1,"%s\n",_b_u_f); │ │ │ │ │ -466 if (strcmp(_b_u_f,"$EndNodes")!=0) │ │ │ │ │ -467 DUNE_THROW(Dune::IOError, "expected $EndNodes"); │ │ │ │ │ -468 } │ │ │ │ │ -469 │ │ │ │ │ -470 // element section │ │ │ │ │ -471 _r_e_a_d_f_i_l_e(file,1,"%s\n",_b_u_f); │ │ │ │ │ -472 if (strcmp(_b_u_f,"$Elements")!=0) │ │ │ │ │ -473 DUNE_THROW(Dune::IOError, "expected $Elements"); │ │ │ │ │ -474 int number_of_elements; │ │ │ │ │ -475 _r_e_a_d_f_i_l_e(file,1,"%d\n",&number_of_elements); │ │ │ │ │ -476 if (_v_e_r_b_o_s_e) std::cout << "file contains " << number_of_elements << " │ │ │ │ │ -elements" << std::endl; │ │ │ │ │ -477 │ │ │ │ │ -478 //========================================= │ │ │ │ │ -479 // Pass 1: Select and insert those vertices in the file that │ │ │ │ │ -480 // actually occur as corners of an element. │ │ │ │ │ -481 //========================================= │ │ │ │ │ -482 │ │ │ │ │ -483 off_t section_element_offset = ftello(file); │ │ │ │ │ -484 std::map renumber; │ │ │ │ │ -485 for (int i=1; i<=number_of_elements; i++) │ │ │ │ │ -486 { │ │ │ │ │ -487 int id, elm_type, number_of_tags; │ │ │ │ │ -488 _r_e_a_d_f_i_l_e(file,3,"%d %d %d ",&id,&elm_type,&number_of_tags); │ │ │ │ │ -489 for (int k=1; k<=number_of_tags; k++) │ │ │ │ │ -490 { │ │ │ │ │ -491 int blub; │ │ │ │ │ -492 _r_e_a_d_f_i_l_e(file,1,"%d ",&blub); │ │ │ │ │ -493 // k == 1: physical entity │ │ │ │ │ -494 // k == 2: elementary entity (not used here) │ │ │ │ │ -495 // if version_number < 2.2: │ │ │ │ │ -496 // k == 3: mesh partition 0 │ │ │ │ │ -497 // else │ │ │ │ │ -498 // k == 3: number of mesh partitions │ │ │ │ │ -499 // k => 4: mesh partition k-4 │ │ │ │ │ -500 } │ │ │ │ │ -501 _p_a_s_s_1_H_a_n_d_l_e_E_l_e_m_e_n_t(file, elm_type, renumber, nodes); │ │ │ │ │ -502 } │ │ │ │ │ -503 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; │ │ │ │ │ -504 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; │ │ │ │ │ -505 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; │ │ │ │ │ -506 _r_e_a_d_f_i_l_e(file,1,"%s\n",_b_u_f); │ │ │ │ │ -507 if (strcmp(_b_u_f,"$EndElements")!=0) │ │ │ │ │ -508 DUNE_THROW(Dune::IOError, "expected $EndElements"); │ │ │ │ │ -509 _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); │ │ │ │ │ -510 _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); │ │ │ │ │ -511 │ │ │ │ │ -512 //============================================== │ │ │ │ │ -513 // Pass 2: Insert boundary segments and elements │ │ │ │ │ -514 //============================================== │ │ │ │ │ -515 │ │ │ │ │ -516 fseeko(file, section_element_offset, SEEK_SET); │ │ │ │ │ -517 _b_o_u_n_d_a_r_y___e_l_e_m_e_n_t___c_o_u_n_t = 0; │ │ │ │ │ -518 _e_l_e_m_e_n_t___c_o_u_n_t = 0; │ │ │ │ │ -519 for (int i=1; i<=number_of_elements; i++) │ │ │ │ │ -520 { │ │ │ │ │ -521 int id, elm_type, number_of_tags; │ │ │ │ │ -522 _r_e_a_d_f_i_l_e(file,3,"%d %d %d ",&id,&elm_type,&number_of_tags); │ │ │ │ │ -523 int physical_entity = -1; │ │ │ │ │ -524 │ │ │ │ │ -525 for (int k=1; k<=number_of_tags; k++) │ │ │ │ │ -526 { │ │ │ │ │ -527 int blub; │ │ │ │ │ -528 _r_e_a_d_f_i_l_e(file,1,"%d ",&blub); │ │ │ │ │ -529 if (k==1) physical_entity = blub; │ │ │ │ │ -530 } │ │ │ │ │ -531 _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); │ │ │ │ │ -532 } │ │ │ │ │ -533 _r_e_a_d_f_i_l_e(file,1,"%s\n",_b_u_f); │ │ │ │ │ -534 if (strcmp(_b_u_f,"$EndElements")!=0) │ │ │ │ │ -535 DUNE_THROW(Dune::IOError, "expected $EndElements"); │ │ │ │ │ -536 │ │ │ │ │ -537 fclose(file); │ │ │ │ │ -538 } │ │ │ │ │ -539 │ │ │ │ │ -_5_4_5 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, │ │ │ │ │ -546 std::map & renumber, │ │ │ │ │ -547 const std::vector< GlobalVector > & nodes) │ │ │ │ │ -548 { │ │ │ │ │ -549 // some data about gmsh elements │ │ │ │ │ -550 const int nDofs[16] = {-1, 2, 3, 4, 4, 8, 6, 5, 3, 6, -1, 10, -1, -1, -1, │ │ │ │ │ -1}; │ │ │ │ │ -551 const int nVertices[16] = {-1, 2, 3, 4, 4, 8, 6, 5, 2, 3, -1, 4, -1, -1, - │ │ │ │ │ -1, 1}; │ │ │ │ │ -552 const int elementDim[16] = {-1, 1, 2, 2, 3, 3, 3, 3, 1, 2, -1, 3, -1, -1, - │ │ │ │ │ -1, 0}; │ │ │ │ │ -553 │ │ │ │ │ -554 // test whether we support the element type │ │ │ │ │ -555 if ( not (elm_type > 0 && elm_type <= 15 // index in suitable range? │ │ │ │ │ -556 && (elementDim[elm_type] == _d_i_m || elementDim[elm_type] == (_d_i_m-1) ) ) ) / │ │ │ │ │ -/ real element or boundary element? │ │ │ │ │ -557 { │ │ │ │ │ -558 _s_k_i_p_l_i_n_e(file); // skip rest of line if element is unknown │ │ │ │ │ -559 return; │ │ │ │ │ -560 } │ │ │ │ │ -561 │ │ │ │ │ -562 // The format string for parsing is n times '%d' in a row │ │ │ │ │ -563 std::string formatString = "%d"; │ │ │ │ │ -564 for (int i=1; i elementDofs(10); │ │ │ │ │ -570 │ │ │ │ │ -571 _r_e_a_d_f_i_l_e(file,nDofs[elm_type], formatString.c_str(), │ │ │ │ │ -572 &(elementDofs[0]),&(elementDofs[1]),&(elementDofs[2]), │ │ │ │ │ -573 &(elementDofs[3]),&(elementDofs[4]),&(elementDofs[5]), │ │ │ │ │ -574 &(elementDofs[6]),&(elementDofs[7]),&(elementDofs[8]), │ │ │ │ │ -575 &(elementDofs[9])); │ │ │ │ │ -576 │ │ │ │ │ -577 // insert each vertex if it hasn't been inserted already │ │ │ │ │ -578 for (int i=0; i │ │ │ │ │ -_5_9_7 void _b_o_u_n_d_a_r_y_s_e_g_m_e_n_t___i_n_s_e_r_t( │ │ │ │ │ -598 const V&, │ │ │ │ │ -599 const E&, │ │ │ │ │ -600 const V2& │ │ │ │ │ -601 ) │ │ │ │ │ -602 { │ │ │ │ │ -603 DUNE_THROW(Dune::IOError, "tried to create a 3D boundary segment in a non- │ │ │ │ │ -3D Grid"); │ │ │ │ │ -604 } │ │ │ │ │ -605 │ │ │ │ │ -606 // 3d-case: │ │ │ │ │ -607 template │ │ │ │ │ -_6_0_8 void _b_o_u_n_d_a_r_y_s_e_g_m_e_n_t___i_n_s_e_r_t( │ │ │ │ │ -609 const std::vector >& nodes, │ │ │ │ │ -610 const E& elementDofs, │ │ │ │ │ -611 const V& vertices │ │ │ │ │ -612 ) │ │ │ │ │ -613 { │ │ │ │ │ -614 std::array, 6> v; │ │ │ │ │ -615 for (int i=0; i<6; i++) │ │ │ │ │ -616 for (int j=0; j<_d_i_m_W_o_r_l_d; j++) │ │ │ │ │ -617 v[i][j] = nodes[elementDofs[i]][j]; │ │ │ │ │ -618 │ │ │ │ │ -619 _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 │ │ │ │ │ -620 = (_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], │ │ │ │ │ -621 v[3], v[4], v[5] ); │ │ │ │ │ -622 │ │ │ │ │ -623 _f_a_c_t_o_r_y.insertBoundarySegment( vertices, │ │ │ │ │ -624 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) ); │ │ │ │ │ -625 } │ │ │ │ │ -626 │ │ │ │ │ -627 │ │ │ │ │ -628 │ │ │ │ │ -_6_3_3 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, │ │ │ │ │ -634 std::map & renumber, │ │ │ │ │ -635 const std::vector< GlobalVector > & nodes, │ │ │ │ │ -636 const int physical_entity) │ │ │ │ │ -637 { │ │ │ │ │ -638 // some data about gmsh elements │ │ │ │ │ -639 const int nDofs[16] = {-1, 2, 3, 4, 4, 8, 6, 5, 3, 6, -1, 10, -1, -1, -1, │ │ │ │ │ -1}; │ │ │ │ │ -640 const int nVertices[16] = {-1, 2, 3, 4, 4, 8, 6, 5, 2, 3, -1, 4, -1, -1, - │ │ │ │ │ -1, 1}; │ │ │ │ │ -641 const int elementDim[16] = {-1, 1, 2, 2, 3, 3, 3, 3, 1, 2, -1, 3, -1, -1, - │ │ │ │ │ -1, 0}; │ │ │ │ │ -642 │ │ │ │ │ -643 // test whether we support the element type │ │ │ │ │ -644 if ( not (elm_type > 0 && elm_type <= 15 // index in suitable range? │ │ │ │ │ -645 && (elementDim[elm_type] == _d_i_m || elementDim[elm_type] == (_d_i_m-1) ) ) ) / │ │ │ │ │ -/ real element or boundary element? │ │ │ │ │ -646 { │ │ │ │ │ -647 _s_k_i_p_l_i_n_e(file); // skip rest of line if element is unknown │ │ │ │ │ -648 return; │ │ │ │ │ -649 } │ │ │ │ │ -650 │ │ │ │ │ -651 // The format string for parsing is n times '%d' in a row │ │ │ │ │ -652 std::string formatString = "%d"; │ │ │ │ │ -653 for (int i=1; i elementDofs(10); │ │ │ │ │ -659 │ │ │ │ │ -660 _r_e_a_d_f_i_l_e(file,nDofs[elm_type], formatString.c_str(), │ │ │ │ │ -661 &(elementDofs[0]),&(elementDofs[1]),&(elementDofs[2]), │ │ │ │ │ -662 &(elementDofs[3]),&(elementDofs[4]),&(elementDofs[5]), │ │ │ │ │ -663 &(elementDofs[6]),&(elementDofs[7]),&(elementDofs[8]), │ │ │ │ │ -664 &(elementDofs[9])); │ │ │ │ │ -665 │ │ │ │ │ -666 // correct differences between gmsh and Dune in the local vertex numbering │ │ │ │ │ -667 switch (elm_type) │ │ │ │ │ -668 { │ │ │ │ │ -669 case 3 : // 4-node quadrilateral │ │ │ │ │ -670 _s_t_d_:_:_s_w_a_p(elementDofs[2],elementDofs[3]); │ │ │ │ │ -671 break; │ │ │ │ │ -672 case 5 : // 8-node hexahedron │ │ │ │ │ -673 _s_t_d_:_:_s_w_a_p(elementDofs[2],elementDofs[3]); │ │ │ │ │ -674 _s_t_d_:_:_s_w_a_p(elementDofs[6],elementDofs[7]); │ │ │ │ │ -675 break; │ │ │ │ │ -676 case 7 : // 5-node pyramid │ │ │ │ │ -677 _s_t_d_:_:_s_w_a_p(elementDofs[2],elementDofs[3]); │ │ │ │ │ -678 break; │ │ │ │ │ -679 } │ │ │ │ │ -680 │ │ │ │ │ -681 // renumber corners to account for the explicitly given vertex │ │ │ │ │ -682 // numbering in the file │ │ │ │ │ -683 std::vector vertices(nVertices[elm_type]); │ │ │ │ │ -684 │ │ │ │ │ -685 for (int i=0; i, 3> v; │ │ │ │ │ -746 for (int i=0; i<_d_i_m_W_o_r_l_d; i++) { │ │ │ │ │ -747 v[0][i] = nodes[elementDofs[0]][i]; │ │ │ │ │ -748 v[1][i] = nodes[elementDofs[2]][i]; // yes, the renumbering is intended! │ │ │ │ │ -749 v[2][i] = nodes[elementDofs[1]][i]; │ │ │ │ │ -750 } │ │ │ │ │ -751 _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 │ │ │ │ │ -752 = (_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]); │ │ │ │ │ -753 _f_a_c_t_o_r_y.insertBoundarySegment(vertices, │ │ │ │ │ -754 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)); │ │ │ │ │ -755 break; │ │ │ │ │ -756 } │ │ │ │ │ -757 case 9 : { // 6-node triangle │ │ │ │ │ -758 _b_o_u_n_d_a_r_y_s_e_g_m_e_n_t___i_n_s_e_r_t(nodes, elementDofs, vertices); │ │ │ │ │ -759 break; │ │ │ │ │ -760 } │ │ │ │ │ -761 default: { │ │ │ │ │ -762 DUNE_THROW(Dune::IOError, "GmshReader does not support using element-type " │ │ │ │ │ -<< elm_type << " for boundary segments"); │ │ │ │ │ -763 break; │ │ │ │ │ -764 } │ │ │ │ │ -765 │ │ │ │ │ -766 } │ │ │ │ │ -767 │ │ │ │ │ -768 } │ │ │ │ │ -769 } │ │ │ │ │ -770 │ │ │ │ │ -771 // count elements and boundary elements │ │ │ │ │ -772 if (elementDim[elm_type] == _d_i_m) { │ │ │ │ │ -773 _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; │ │ │ │ │ -774 _e_l_e_m_e_n_t___c_o_u_n_t++; │ │ │ │ │ -775 } else { │ │ │ │ │ -776 _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; │ │ │ │ │ -777 _b_o_u_n_d_a_r_y___e_l_e_m_e_n_t___c_o_u_n_t++; │ │ │ │ │ -778 } │ │ │ │ │ -779 │ │ │ │ │ -780 } │ │ │ │ │ -781 │ │ │ │ │ -782 }; │ │ │ │ │ -783 │ │ │ │ │ -_7_8_4 namespace Gmsh { │ │ │ │ │ -_7_9_0 enum class _R_e_a_d_e_r_O_p_t_i_o_n_s │ │ │ │ │ -791 { │ │ │ │ │ -792 _v_e_r_b_o_s_e = 1, │ │ │ │ │ -793 _i_n_s_e_r_t_B_o_u_n_d_a_r_y_S_e_g_m_e_n_t_s = 2, │ │ │ │ │ -794 _r_e_a_d_E_l_e_m_e_n_t_D_a_t_a = 4, │ │ │ │ │ -795 _r_e_a_d_B_o_u_n_d_a_r_y_D_a_t_a = 8 │ │ │ │ │ -796 }; │ │ │ │ │ -797 │ │ │ │ │ -_7_9_9 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) │ │ │ │ │ -800 { │ │ │ │ │ -801 return static_cast<_R_e_a_d_e_r_O_p_t_i_o_n_s>( │ │ │ │ │ -802 static_cast(a) | static_cast(b) │ │ │ │ │ -803 ); │ │ │ │ │ -804 } │ │ │ │ │ -805 │ │ │ │ │ -_8_0_7 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) │ │ │ │ │ -808 { │ │ │ │ │ -809 return static_cast(a) & static_cast(b); │ │ │ │ │ -810 } │ │ │ │ │ -811 │ │ │ │ │ -812 } // end namespace Gmsh │ │ │ │ │ -813 │ │ │ │ │ -838 template │ │ │ │ │ -_8_3_9 class _G_m_s_h_R_e_a_d_e_r │ │ │ │ │ -840 { │ │ │ │ │ -842 │ │ │ │ │ -861 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, │ │ │ │ │ -862 const std::string &fileName, │ │ │ │ │ -863 std::vector& boundarySegmentToPhysicalEntity, │ │ │ │ │ -864 std::vector& elementToPhysicalEntity, │ │ │ │ │ -865 bool verbose, bool insertBoundarySegments) │ │ │ │ │ -866 { │ │ │ │ │ -867 // register boundary segment to boundary segment factory for possible load │ │ │ │ │ -balancing │ │ │ │ │ -868 // this needs to be done on all cores since the type might not be known │ │ │ │ │ -otherwise │ │ │ │ │ -869 GmshReaderQuadraticBoundarySegment< Grid::dimension, Grid::dimensionworld │ │ │ │ │ ->::registerFactory(); │ │ │ │ │ -870 │ │ │ │ │ -871#ifndef NDEBUG │ │ │ │ │ -872 // check that this method is called on all cores │ │ │ │ │ -873 factory._c_o_m_m().barrier(); │ │ │ │ │ -874#endif │ │ │ │ │ -875 │ │ │ │ │ -876 // create parse object and read grid on process 0 │ │ │ │ │ -877 if (factory._c_o_m_m().rank() == 0) │ │ │ │ │ -878 { │ │ │ │ │ -879 _G_m_s_h_R_e_a_d_e_r_P_a_r_s_e_r_<_G_r_i_d_> parser(factory,verbose,insertBoundarySegments); │ │ │ │ │ -880 parser._r_e_a_d(fileName); │ │ │ │ │ -881 │ │ │ │ │ -882 boundarySegmentToPhysicalEntity = std::move(parser._b_o_u_n_d_a_r_y_I_d_M_a_p()); │ │ │ │ │ -883 elementToPhysicalEntity = std::move(parser._e_l_e_m_e_n_t_I_n_d_e_x_M_a_p()); │ │ │ │ │ -884 } │ │ │ │ │ -885 else │ │ │ │ │ -886 { │ │ │ │ │ -887 boundarySegmentToPhysicalEntity = {}; │ │ │ │ │ -888 elementToPhysicalEntity = {}; │ │ │ │ │ -889 } │ │ │ │ │ -890 } │ │ │ │ │ -891 │ │ │ │ │ -893 │ │ │ │ │ -912 template │ │ │ │ │ -913 static T &discarded(T &&value) { return static_cast(value); } │ │ │ │ │ -914 │ │ │ │ │ -915 struct DataArg { │ │ │ │ │ -916 std::vector *data_ = nullptr; │ │ │ │ │ -917 DataArg(std::vector &data) : data_(&data) {} │ │ │ │ │ -918 DataArg(const decltype(std::ignore)&) {} │ │ │ │ │ -919 DataArg() = default; │ │ │ │ │ -920 }; │ │ │ │ │ -921 │ │ │ │ │ -922 struct DataFlagArg : DataArg { │ │ │ │ │ -923 bool flag_ = false; │ │ │ │ │ -924 using DataArg::DataArg; │ │ │ │ │ -925 DataFlagArg(bool flag) : flag_(flag) {} │ │ │ │ │ -926 }; │ │ │ │ │ -927 │ │ │ │ │ -928 public: │ │ │ │ │ -_9_2_9 typedef GridType _G_r_i_d; │ │ │ │ │ -930 │ │ │ │ │ -_9_3_7 static std::unique_ptr _r_e_a_d (const std::string& fileName, bool │ │ │ │ │ -verbose = true, bool insertBoundarySegments=true) │ │ │ │ │ -938 { │ │ │ │ │ -939 // make a grid factory │ │ │ │ │ -940 _D_u_n_e_:_:_G_r_i_d_F_a_c_t_o_r_y_<_G_r_i_d_> factory; │ │ │ │ │ -941 │ │ │ │ │ -942 _r_e_a_d(factory, fileName, verbose, insertBoundarySegments); │ │ │ │ │ -943 │ │ │ │ │ -944 return factory._c_r_e_a_t_e_G_r_i_d(); │ │ │ │ │ -945 } │ │ │ │ │ -946 │ │ │ │ │ -_9_6_6 static std::unique_ptr _r_e_a_d (const std::string& fileName, │ │ │ │ │ -967 std::vector& boundarySegmentToPhysicalEntity, │ │ │ │ │ -968 std::vector& elementToPhysicalEntity, │ │ │ │ │ -969 bool verbose = true, bool insertBoundarySegments=true) │ │ │ │ │ -970 { │ │ │ │ │ -971 // make a grid factory │ │ │ │ │ -972 _D_u_n_e_:_:_G_r_i_d_F_a_c_t_o_r_y_<_G_r_i_d_> factory; │ │ │ │ │ -973 │ │ │ │ │ -974 doRead( │ │ │ │ │ -975 factory, fileName, boundarySegmentToPhysicalEntity, │ │ │ │ │ -976 elementToPhysicalEntity, verbose, insertBoundarySegments │ │ │ │ │ -977 ); │ │ │ │ │ -978 │ │ │ │ │ -979 return factory._c_r_e_a_t_e_G_r_i_d(); │ │ │ │ │ -980 } │ │ │ │ │ -981 │ │ │ │ │ -_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, const std::string& │ │ │ │ │ -fileName, │ │ │ │ │ -984 bool verbose = true, bool insertBoundarySegments=true) │ │ │ │ │ -985 { │ │ │ │ │ -986 doRead( │ │ │ │ │ -987 factory, fileName, discarded(std::vector{}), │ │ │ │ │ -988 discarded(std::vector{}), verbose, insertBoundarySegments │ │ │ │ │ -989 ); │ │ │ │ │ -990 } │ │ │ │ │ -991 │ │ │ │ │ -993 │ │ │ │ │ -_1_0_1_6 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, │ │ │ │ │ -1017 const std::string &fileName, │ │ │ │ │ -1018 DataFlagArg boundarySegmentData, │ │ │ │ │ -1019 DataArg _e_l_e_m_e_n_t_D_a_t_a, │ │ │ │ │ -1020 bool verbose=true) │ │ │ │ │ -1021 { │ │ │ │ │ -1022 doRead( │ │ │ │ │ -1023 factory, fileName, │ │ │ │ │ -1024 boundarySegmentData.data_ │ │ │ │ │ -1025 ? *boundarySegmentData.data_ : discarded(std::vector{}), │ │ │ │ │ -1026 _e_l_e_m_e_n_t_D_a_t_a.data_ │ │ │ │ │ -1027 ? *_e_l_e_m_e_n_t_D_a_t_a.data_ : discarded(std::vector{}), │ │ │ │ │ -1028 verbose, │ │ │ │ │ -1029 boundarySegmentData.flag_ || boundarySegmentData.data_ │ │ │ │ │ -1030 ); │ │ │ │ │ -1031 } │ │ │ │ │ -1032 │ │ │ │ │ -_1_0_5_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, │ │ │ │ │ -1054 const std::string& fileName, │ │ │ │ │ -1055 std::vector& boundarySegmentToPhysicalEntity, │ │ │ │ │ -1056 std::vector& elementToPhysicalEntity, │ │ │ │ │ -1057 bool verbose, bool insertBoundarySegments) │ │ │ │ │ -1058 { │ │ │ │ │ -1059 doRead( │ │ │ │ │ -1060 factory, fileName, boundarySegmentToPhysicalEntity, │ │ │ │ │ -1061 elementToPhysicalEntity, verbose, insertBoundarySegments │ │ │ │ │ -1062 ); │ │ │ │ │ -1063 } │ │ │ │ │ -1064 │ │ │ │ │ -1066 //\{ │ │ │ │ │ -1067 │ │ │ │ │ -_1_0_6_8 using _O_p_t_s = _G_m_s_h_:_:_R_e_a_d_e_r_O_p_t_i_o_n_s; │ │ │ │ │ -1069 │ │ │ │ │ -_1_0_7_0 static constexpr _O_p_t_s _d_e_f_a_u_l_t_O_p_t_s = │ │ │ │ │ -1071 Opts::verbose | Opts::insertBoundarySegments | Opts::readElementData | │ │ │ │ │ -Opts::readBoundaryData; │ │ │ │ │ -1072 │ │ │ │ │ -1074 │ │ │ │ │ -_1_0_9_7 _G_m_s_h_R_e_a_d_e_r(const std::string& fileName, │ │ │ │ │ -1098 _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) │ │ │ │ │ -1099 { │ │ │ │ │ -1100 gridFactory_ = std::make_unique>(); │ │ │ │ │ -1101 readGridFile(fileName, *gridFactory_, options); │ │ │ │ │ -1102 } │ │ │ │ │ -1103 │ │ │ │ │ -_1_1_1_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, │ │ │ │ │ -1112 _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) │ │ │ │ │ -1113 { │ │ │ │ │ -1114 readGridFile(fileName, factory, options); │ │ │ │ │ -1115 } │ │ │ │ │ -1116 │ │ │ │ │ -_1_1_1_8 const std::vector& _e_l_e_m_e_n_t_D_a_t_a () const │ │ │ │ │ -1119 { │ │ │ │ │ -1120 checkElementData(); │ │ │ │ │ -1121 return elementIndexToGmshPhysicalEntity_; │ │ │ │ │ -1122 } │ │ │ │ │ -1123 │ │ │ │ │ -_1_1_2_5 const std::vector& _b_o_u_n_d_a_r_y_D_a_t_a () const │ │ │ │ │ -1126 { │ │ │ │ │ -1127 checkBoundaryData(); │ │ │ │ │ -1128 return boundarySegmentIndexToGmshPhysicalEntity_; │ │ │ │ │ -1129 } │ │ │ │ │ -1130 │ │ │ │ │ -_1_1_3_5 bool _h_a_s_E_l_e_m_e_n_t_D_a_t_a () const │ │ │ │ │ -1136 { return hasElementData_ && !extractedElementData_; } │ │ │ │ │ -1137 │ │ │ │ │ -_1_1_4_2 bool _h_a_s_B_o_u_n_d_a_r_y_D_a_t_a () const │ │ │ │ │ -1143 { return hasBoundaryData_ && !extractedBoundaryData_; } │ │ │ │ │ -1144 │ │ │ │ │ -_1_1_4_6 std::vector _e_x_t_r_a_c_t_E_l_e_m_e_n_t_D_a_t_a () │ │ │ │ │ -1147 { │ │ │ │ │ -1148 checkElementData(); │ │ │ │ │ -1149 extractedElementData_ = true; │ │ │ │ │ -1150 return std::move(elementIndexToGmshPhysicalEntity_); │ │ │ │ │ -1151 } │ │ │ │ │ -1152 │ │ │ │ │ -_1_1_5_4 std::vector _e_x_t_r_a_c_t_B_o_u_n_d_a_r_y_D_a_t_a () │ │ │ │ │ -1155 { │ │ │ │ │ -1156 checkBoundaryData(); │ │ │ │ │ -1157 extractedBoundaryData_ = true; │ │ │ │ │ -1158 return std::move(boundarySegmentIndexToGmshPhysicalEntity_); │ │ │ │ │ -1159 } │ │ │ │ │ -1160 │ │ │ │ │ -_1_1_6_2 std::unique_ptr _c_r_e_a_t_e_G_r_i_d () │ │ │ │ │ -1163 { │ │ │ │ │ -1164 if (!gridFactory_) │ │ │ │ │ -1165 DUNE_THROW(Dune::InvalidStateException, │ │ │ │ │ -1166 "This GmshReader has been constructed with a Dune::GridFactory. " │ │ │ │ │ -1167 << "This grid factory has been filled with all information to create a │ │ │ │ │ -grid. " │ │ │ │ │ -1168 << "Please use this factory to create the grid by calling │ │ │ │ │ -factory.createGrid(). " │ │ │ │ │ -1169 << "Alternatively use the constructor without passing the factory in │ │ │ │ │ -combination with this member function." │ │ │ │ │ -1170 ); │ │ │ │ │ -1171 │ │ │ │ │ -1172 return gridFactory_->createGrid(); │ │ │ │ │ -1173 } │ │ │ │ │ -1174 │ │ │ │ │ -1175 //\} │ │ │ │ │ -1176 │ │ │ │ │ -1177 private: │ │ │ │ │ -1178 void checkElementData () const │ │ │ │ │ -1179 { │ │ │ │ │ -1180 if (!hasElementData_) │ │ │ │ │ -1181 DUNE_THROW(Dune::InvalidStateException, │ │ │ │ │ -1182 "This GmshReader has been constructed without the option │ │ │ │ │ -'readElementData'. " │ │ │ │ │ -1183 << "Please enable reading element data by passing the option 'Gmsh:: │ │ │ │ │ -ReaderOpts::readElementData' " │ │ │ │ │ -1184 << "to the constructor of this class." │ │ │ │ │ -1185 ); │ │ │ │ │ -1186 │ │ │ │ │ -1187 if (extractedElementData_) │ │ │ │ │ -1188 DUNE_THROW(Dune::InvalidStateException, │ │ │ │ │ -1189 "The element data has already been extracted from this GmshReader " │ │ │ │ │ -1190 << "via a function call to reader.extractElementData(). Use the extracted │ │ │ │ │ -data or " │ │ │ │ │ -1191 << "read the grid data from file again by constructing a new reader." │ │ │ │ │ -1192 ); │ │ │ │ │ -1193 } │ │ │ │ │ -1194 │ │ │ │ │ -1195 void checkBoundaryData () const │ │ │ │ │ -1196 { │ │ │ │ │ -1197 if (!hasBoundaryData_) │ │ │ │ │ -1198 DUNE_THROW(Dune::InvalidStateException, │ │ │ │ │ -1199 "This GmshReader has been constructed without the option │ │ │ │ │ -'readBoundaryData'. " │ │ │ │ │ -1200 << "Please enable reading boundary data by passing the option 'Gmsh:: │ │ │ │ │ -ReaderOpts::readBoundaryData' " │ │ │ │ │ -1201 << "to the constructor of this class." │ │ │ │ │ -1202 ); │ │ │ │ │ -1203 │ │ │ │ │ -1204 if (extractedBoundaryData_) │ │ │ │ │ -1205 DUNE_THROW(Dune::InvalidStateException, │ │ │ │ │ -1206 "The boundary data has already been extracted from this GmshReader " │ │ │ │ │ -1207 << "via a function call to reader.extractBoundaryData(). Use the extracted │ │ │ │ │ -data or " │ │ │ │ │ -1208 << "read the grid data from file again by constructing a new reader." │ │ │ │ │ -1209 ); │ │ │ │ │ -1210 } │ │ │ │ │ -1211 │ │ │ │ │ -1212 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) │ │ │ │ │ -1213 { │ │ │ │ │ -1214 const bool _v_e_r_b_o_s_e = options & Opts::verbose; │ │ │ │ │ -1215 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; │ │ │ │ │ -1216 const bool _r_e_a_d_B_o_u_n_d_a_r_y_D_a_t_a = options & Opts::readBoundaryData; │ │ │ │ │ -1217 const bool _r_e_a_d_E_l_e_m_e_n_t_D_a_t_a = options & Opts::readElementData; │ │ │ │ │ -1218 │ │ │ │ │ -1219 doRead( │ │ │ │ │ -1220 factory, fileName, boundarySegmentIndexToGmshPhysicalEntity_, │ │ │ │ │ -1221 elementIndexToGmshPhysicalEntity_, verbose, │ │ │ │ │ -1222 readBoundaryData || insertBoundarySegments │ │ │ │ │ -1223 ); │ │ │ │ │ -1224 │ │ │ │ │ -1225 // clear unwanted data │ │ │ │ │ -1226 if (!readBoundaryData) │ │ │ │ │ -1227 boundarySegmentIndexToGmshPhysicalEntity_ = std::vector{}; │ │ │ │ │ -1228 if (!readElementData) │ │ │ │ │ -1229 elementIndexToGmshPhysicalEntity_ = std::vector{}; │ │ │ │ │ -1230 │ │ │ │ │ -1231 hasElementData_ = _r_e_a_d_E_l_e_m_e_n_t_D_a_t_a; │ │ │ │ │ -1232 hasBoundaryData_ = _r_e_a_d_B_o_u_n_d_a_r_y_D_a_t_a; │ │ │ │ │ -1233 } │ │ │ │ │ -1234 │ │ │ │ │ -1235 std::unique_ptr> gridFactory_; │ │ │ │ │ -1236 │ │ │ │ │ -1237 std::vector elementIndexToGmshPhysicalEntity_; │ │ │ │ │ -1238 std::vector boundarySegmentIndexToGmshPhysicalEntity_; │ │ │ │ │ -1239 │ │ │ │ │ -1240 bool hasElementData_; │ │ │ │ │ -1241 bool hasBoundaryData_; │ │ │ │ │ -1242 │ │ │ │ │ -1243 // for better error messages, we keep track of these separately │ │ │ │ │ -1244 bool extractedElementData_ = false; │ │ │ │ │ -1245 bool extractedBoundaryData_ = false; │ │ │ │ │ -1246 }; │ │ │ │ │ -1247 │ │ │ │ │ -1250} // namespace Dune │ │ │ │ │ -1251 │ │ │ │ │ -1252#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:791 │ │ │ │ │ -_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 │ │ │ │ │ +105 public: │ │ │ │ │ +_1_0_7 _L_e_v_e_l_G_n_u_p_l_o_t_W_r_i_t_e_r (const G& grid, int level) │ │ │ │ │ +108 : _G_n_u_p_l_o_t_W_r_i_t_e_r(grid._l_e_v_e_l_G_r_i_d_V_i_e_w(level)) │ │ │ │ │ +109 {} │ │ │ │ │ +110 }; │ │ │ │ │ +111 │ │ │ │ │ +112} │ │ │ │ │ +113 │ │ │ │ │ +114#include "_g_n_u_p_l_o_t_/_g_n_u_p_l_o_t_._c_c" │ │ │ │ │ +115 │ │ │ │ │ +116#endif // DUNE_IO_GNUPLOT_HH │ │ │ │ │ +_g_n_u_p_l_o_t_._c_c │ │ │ │ │ +Implementation of gnuplot output for 1D and 2D grids. │ │ │ │ │ +_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_:_:_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:805 │ │ │ │ │ +_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:788 │ │ │ │ │ +_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:137 │ │ │ │ │ _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_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:807 │ │ │ │ │ -_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:799 │ │ │ │ │ -_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:258 │ │ │ │ │ -_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:275 │ │ │ │ │ -_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:333 │ │ │ │ │ -_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_h_y_s_i_c_a_l_E_n_t_i_t_y_N_a_m_e_s │ │ │ │ │ -std::vector< std::string > & physicalEntityNames() │ │ │ │ │ -Returns the names of the gmsh physical entities (0-based index) │ │ │ │ │ -DDeeffiinniittiioonn gmshreader.hh:373 │ │ │ │ │ -_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:545 │ │ │ │ │ -_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:321 │ │ │ │ │ -_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:361 │ │ │ │ │ -_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,...) │ │ │ │ │ -DDeeffiinniittiioonn gmshreader.hh:331 │ │ │ │ │ -_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() │ │ │ │ │ -Returns a map for the gmsh physical entity id (1-based index) for each entity │ │ │ │ │ -of codim 0. │ │ │ │ │ -DDeeffiinniittiioonn gmshreader.hh:367 │ │ │ │ │ -_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:608 │ │ │ │ │ -_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:358 │ │ │ │ │ -_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:378 │ │ │ │ │ -_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:348 │ │ │ │ │ -_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:633 │ │ │ │ │ -_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:320 │ │ │ │ │ -_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:325 │ │ │ │ │ -_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_:_:_p_h_y_s_i_c_a_l___e_n_t_i_t_y___n_a_m_e_s │ │ │ │ │ -std::vector< std::string > physical_entity_names │ │ │ │ │ -DDeeffiinniittiioonn gmshreader.hh:317 │ │ │ │ │ -_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:597 │ │ │ │ │ -_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:840 │ │ │ │ │ -_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:966 │ │ │ │ │ -_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:1118 │ │ │ │ │ -_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:1016 │ │ │ │ │ -_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:937 │ │ │ │ │ -_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:983 │ │ │ │ │ -_D_u_n_e_:_:_G_m_s_h_R_e_a_d_e_r_:_:_G_r_i_d │ │ │ │ │ -GridType Grid │ │ │ │ │ -DDeeffiinniittiioonn gmshreader.hh:929 │ │ │ │ │ -_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:1162 │ │ │ │ │ -_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:1154 │ │ │ │ │ -_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:1053 │ │ │ │ │ -_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:1135 │ │ │ │ │ -_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:1142 │ │ │ │ │ -_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:1070 │ │ │ │ │ -_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:1111 │ │ │ │ │ -_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:1097 │ │ │ │ │ -_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:1146 │ │ │ │ │ -_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:1125 │ │ │ │ │ -_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_:_:_G_r_i_d_V_i_e_w │ │ │ │ │ +Grid view abstract base class. │ │ │ │ │ +DDeeffiinniittiioonn common/gridview.hh:66 │ │ │ │ │ +_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_:_:_a_d_d_V_e_r_t_e_x_D_a_t_a │ │ │ │ │ +void addVertexData(const DataContainer &data, const std::string &name) │ │ │ │ │ +Add vertex data. │ │ │ │ │ +DDeeffiinniittiioonn gnuplot.hh:61 │ │ │ │ │ +_D_u_n_e_:_:_G_n_u_p_l_o_t_W_r_i_t_e_r_:_:_a_d_d_C_e_l_l_D_a_t_a │ │ │ │ │ +void addCellData(const DataContainer &data, const std::string &name) │ │ │ │ │ +Add cell data. │ │ │ │ │ +DDeeffiinniittiioonn gnuplot.hh:49 │ │ │ │ │ +_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_:_:_G_n_u_p_l_o_t_W_r_i_t_e_r_:_:_G_n_u_p_l_o_t_W_r_i_t_e_r │ │ │ │ │ +GnuplotWriter(const GridView &gv) │ │ │ │ │ +DDeeffiinniittiioonn gnuplot.hh:37 │ │ │ │ │ +_D_u_n_e_:_:_L_e_a_f_G_n_u_p_l_o_t_W_r_i_t_e_r │ │ │ │ │ +GnuplotWriter on the leaf grid. │ │ │ │ │ +DDeeffiinniittiioonn gnuplot.hh:91 │ │ │ │ │ +_D_u_n_e_:_:_L_e_a_f_G_n_u_p_l_o_t_W_r_i_t_e_r_:_:_L_e_a_f_G_n_u_p_l_o_t_W_r_i_t_e_r │ │ │ │ │ +LeafGnuplotWriter(const G &grid) │ │ │ │ │ +Construct a Gnuplot writer for the leaf level of a given grid. │ │ │ │ │ +DDeeffiinniittiioonn gnuplot.hh:94 │ │ │ │ │ +_D_u_n_e_:_:_L_e_v_e_l_G_n_u_p_l_o_t_W_r_i_t_e_r │ │ │ │ │ +GnuplotWriter on a given level grid. │ │ │ │ │ +DDeeffiinniittiioonn gnuplot.hh:104 │ │ │ │ │ +_D_u_n_e_:_:_L_e_v_e_l_G_n_u_p_l_o_t_W_r_i_t_e_r_:_:_L_e_v_e_l_G_n_u_p_l_o_t_W_r_i_t_e_r │ │ │ │ │ +LevelGnuplotWriter(const G &grid, int level) │ │ │ │ │ +Construct a Gnuplot writer for a certain level of a given grid. │ │ │ │ │ +DDeeffiinniittiioonn gnuplot.hh:107 │ │ │ │ │ +_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/a00977.html │ │ │ │ @@ -86,15 +86,15 @@ │ │ │ │ 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-config.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/a00977_source.html │ │ │ │ @@ -93,15 +93,15 @@ │ │ │ │
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
│ │ │ │
20#include <dune-grid-config.hh> // HAVE_DUNE_UGGRID
│ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │
24
│ │ │ │
25#if HAVE_DUNE_UGGRID || DOXYGEN
│ │ │ │
26
│ │ │ │
27#ifdef ModelP
│ │ │ │
28#include <dune/common/parallel/mpicommunication.hh>
│ │ │ │ @@ -668,15 +668,15 @@ │ │ │ │
820
│ │ │ │
821 }
│ │ │ │
822
│ │ │ │
823} // namespace Dune
│ │ │ │
824
│ │ │ │
825#endif // HAVE_DUNE_UGGRID || DOXYGEN
│ │ │ │
826#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:138
│ │ │ │
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/a00980.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.

│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00980_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
│ │ │ │
typename GridFamily::Traits::Communication Communication
A type that is a model of Dune::Communication. It provides a portable way for communication on the se...
Definition common/grid.hh:515
│ │ │ │
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:70
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00983.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: persistentcontainerinterface.hh File Reference │ │ │ │ +dune-grid: persistentcontainermap.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,24 +72,33 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
persistentcontainerinterface.hh File Reference
│ │ │ │ +
persistentcontainermap.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>
│ │ │ │ +
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

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

│ │ │ │ Classes

class  Dune::PersistentContainerInterface< G, T >
 Persistent storage of data on all entities of a grid. More...
class  Dune::PersistentContainerMap< G, IdSet, Map >
 map-based implementation of the PersistentContainer More...
 
class  Dune::PersistentContainerMap< G, IdSet, Map >::IteratorWrapper< value, iterator >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,19 +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 │ │ │ │ │ -persistentcontainerinterface.hh File Reference │ │ │ │ │ +persistentcontainermap.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> │ │ │ │ │ _G_o_ _t_o_ _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_:_:_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_:_:_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/a00983_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: persistentcontainerinterface.hh Source File │ │ │ │ +dune-grid: persistentcontainermap.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,124 +74,387 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
persistentcontainerinterface.hh
│ │ │ │ +
persistentcontainermap.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │ +
5#ifndef DUNE_PERSISTENTCONTAINERMAP_HH
│ │ │ │ +
6#define DUNE_PERSISTENTCONTAINERMAP_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;
│ │ │ │ +
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{
│ │ │ │ +
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 public:
│ │ │ │ -
61 typedef G Grid;
│ │ │ │ -
62
│ │ │ │ -
63 typedef T Value;
│ │ │ │ -
64
│ │ │ │ -
65 typedef ImplementationDefined Size;
│ │ │ │ -
66 typedef ImplementationDefined ConstIterator;
│ │ │ │ -
67 typedef ImplementationDefined Iterator;
│ │ │ │ +
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 // construction
│ │ │ │ -
70
│ │ │ │ -
79 PersistentContainerInterface ( Grid &grid, int codim, const Value &value = Value() );
│ │ │ │ -
80
│ │ │ │ - │ │ │ │ -
83
│ │ │ │ -
85 const This &operator= ( const This &other );
│ │ │ │ +
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 // 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;
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
116 template< class Entity >
│ │ │ │ -
117 Value &operator() ( const Entity &entity, int subEntity );
│ │ │ │ +
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 // capacity
│ │ │ │ -
120
│ │ │ │ -
126 Size size () const;
│ │ │ │ -
127
│ │ │ │ -
141 void resize ( const Value &value = Value() );
│ │ │ │ +
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
│ │ │ │ -
156 void shrinkToFit ();
│ │ │ │ +
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 // modifiers
│ │ │ │ -
159
│ │ │ │ -
165 void fill ( const Value &value );
│ │ │ │ +
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
│ │ │ │ -
171 void swap ( This &other );
│ │ │ │ +
167
│ │ │ │ +
168
│ │ │ │ +
169
│ │ │ │ +
170 // Implementation of PersistentContainerMap
│ │ │ │ +
171 // ----------------------------------------
│ │ │ │
172
│ │ │ │ -
173 // iterators
│ │ │ │ -
174
│ │ │ │ - │ │ │ │ - │ │ │ │ +
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
│ │ │ │ - │ │ │ │ - │ │ │ │ -
200
│ │ │ │ -
201 // information
│ │ │ │ +
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
│ │ │ │ -
204 int codimension () const;
│ │ │ │ -
205 };
│ │ │ │ +
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
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │
│ │ │ │ -
206
│ │ │ │ -
207} // namespace Dune
│ │ │ │ -
208
│ │ │ │ -
209#endif // #ifndef DUNE_PERSISTENTCONTAINERINTERFACE_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
│ │ │ │
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())
constructor
│ │ │ │ -
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 codimension
Know your own codimension.
Definition common/entity.hh:106
│ │ │ │ +
Id Set Interface.
Definition common/indexidset.hh:447
│ │ │ │ +
IdTypeImp IdType
Type used to represent an id.
Definition common/indexidset.hh:453
│ │ │ │ +
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 common/indexidset.hh:457
│ │ │ │ +
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,165 +1,432 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _u_t_i_l_i_t_y │ │ │ │ │ -persistentcontainerinterface.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 © 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 │ │ │ │ │ +5#ifndef DUNE_PERSISTENTCONTAINERMAP_HH │ │ │ │ │ +6#define DUNE_PERSISTENTCONTAINERMAP_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 │ │ │ │ │ -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; │ │ │ │ │ +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{ │ │ │ │ │ +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 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; │ │ │ │ │ +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 // construction │ │ │ │ │ -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 ); │ │ │ │ │ +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 │ │ │ │ │ -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; │ │ │ │ │ +_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 │ │ │ │ │ -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 ); │ │ │ │ │ +_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 // 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() ); │ │ │ │ │ +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 │ │ │ │ │ -_1_5_6 void _s_h_r_i_n_k_T_o_F_i_t (); │ │ │ │ │ +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 │ │ │ │ │ -158 // modifiers │ │ │ │ │ -159 │ │ │ │ │ -_1_6_5 void _f_i_l_l ( const _V_a_l_u_e &value ); │ │ │ │ │ +_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 │ │ │ │ │ -_1_7_1 void _s_w_a_p ( _T_h_i_s &other ); │ │ │ │ │ +167 │ │ │ │ │ +168 │ │ │ │ │ +169 │ │ │ │ │ +170 // Implementation of PersistentContainerMap │ │ │ │ │ +171 // ---------------------------------------- │ │ │ │ │ 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 (); │ │ │ │ │ +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 │ │ │ │ │ -_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 │ │ │ │ │ +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 │ │ │ │ │ -_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 │ │ │ │ │ +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_:_:_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()) │ │ │ │ │ -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_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ +_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 common/indexidset.hh:447 │ │ │ │ │ +_D_u_n_e_:_:_I_d_S_e_t_:_:_I_d_T_y_p_e │ │ │ │ │ +IdTypeImp IdType │ │ │ │ │ +Type used to represent an id. │ │ │ │ │ +DDeeffiinniittiioonn common/indexidset.hh:453 │ │ │ │ │ +_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 common/indexidset.hh:457 │ │ │ │ │ +_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 │ │ │ │ │ -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 │ │ │ │ │ +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 │ │ │ │ │ -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 │ │ │ │ │ +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()) │ │ │ │ │ -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_(_) │ │ │ │ │ +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 │ │ │ │ │ -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 │ │ │ │ │ +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/a00989.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: gridtype.hh File Reference │ │ │ │ +dune-grid: hostgridaccess.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -69,26 +69,44 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
gridtype.hh File Reference
│ │ │ │ +
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
hostgridaccess.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ -

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

│ │ │ │ -
#include <dune-grid-config.hh>
│ │ │ │ +
#include <string>
│ │ │ │ +#include <dune/grid/geometrygrid/intersection.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ -

Detailed Description

│ │ │ │ -

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

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

│ │ │ │ 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.
 
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,19 +1,32 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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_._._. │ │ │ │ │ -#include │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +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_. │ │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -This file can be included directly following config.h to test if a grid type │ │ │ │ │ -was correctly selected. │ │ │ │ │ - Author │ │ │ │ │ - Andreas Dedner │ │ │ │ │ +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. │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00989_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: gridtype.hh Source File │ │ │ │ +dune-grid: hostgridaccess.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,44 +74,219 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
gridtype.hh
│ │ │ │ +
hostgridaccess.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │ +
5#ifndef DUNE_GRID_HOSTGRIDACCESS_HH
│ │ │ │ +
6#define DUNE_GRID_HOSTGRIDACCESS_HH
│ │ │ │
7
│ │ │ │ -
17#include <dune-grid-config.hh> // HAVE_GRIDTYPE
│ │ │ │ -
18
│ │ │ │ -
19#ifndef HEADERCHECK
│ │ │ │ +
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// NOGRID is used to specify that no default was set during configure
│ │ │ │ -
22// If NOGRID and HAVE_GRIDTYPE are both not set then no grid was selected
│ │ │ │ -
23// and an error is produced
│ │ │ │ -
24#if defined NOGRID
│ │ │ │ -
25 #if ! HAVE_GRIDTYPE
│ │ │ │ -
26 #error "No grid type selected, use GRIDTYPE=..."
│ │ │ │ -
27 #endif
│ │ │ │ -
28#else
│ │ │ │ -
29 #if ! HAVE_GRIDTYPE
│ │ │ │ -
30 #error "No grid type selected, typo in GRIDTYPE=...?"
│ │ │ │ -
31 #endif
│ │ │ │ -
32#endif
│ │ │ │ -
33
│ │ │ │ -
34#endif // HEADERCHECK
│ │ │ │ -
35
│ │ │ │ -
36#endif // DUNE_GRIDTYPE_HH
│ │ │ │ +
21 template< class >
│ │ │ │ +
22 class IdentityGrid;
│ │ │ │ +
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 };
│ │ │ │ +
│ │ │ │ +
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:533
│ │ │ │ +
traits structure containing types for a codimension
Definition geometrygrid/grid.hh:606
│ │ │ │ +
Definition geometrygrid/intersection.hh:22
│ │ │ │ +
Provides a meta grid that is identical to its host.
Definition identitygrid.hh:93
│ │ │ │ +
HostGridType & getHostGrid() const
Returns the hostgrid this IdentityGrid lives in.
Definition identitygrid.hh:415
│ │ │ │ +
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,39 +1,303 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _u_t_i_l_i_t_y │ │ │ │ │ -gridtype.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 © 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 │ │ │ │ │ +5#ifndef DUNE_GRID_HOSTGRIDACCESS_HH │ │ │ │ │ +6#define DUNE_GRID_HOSTGRIDACCESS_HH │ │ │ │ │ 7 │ │ │ │ │ -17#include // HAVE_GRIDTYPE │ │ │ │ │ -18 │ │ │ │ │ -19#ifndef HEADERCHECK │ │ │ │ │ +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// NOGRID is used to specify that no default was set during configure │ │ │ │ │ -22// If NOGRID and HAVE_GRIDTYPE are both not set then no grid was selected │ │ │ │ │ -23// and an error is produced │ │ │ │ │ -24#if defined NOGRID │ │ │ │ │ -25 #if ! HAVE_GRIDTYPE │ │ │ │ │ -26 #error "No grid type selected, use GRIDTYPE=..." │ │ │ │ │ -27 #endif │ │ │ │ │ -28#else │ │ │ │ │ -29 #if ! HAVE_GRIDTYPE │ │ │ │ │ -30 #error "No grid type selected, typo in GRIDTYPE=...?" │ │ │ │ │ -31 #endif │ │ │ │ │ -32#endif │ │ │ │ │ -33 │ │ │ │ │ -34#endif // HEADERCHECK │ │ │ │ │ -35 │ │ │ │ │ -36#endif // DUNE_GRIDTYPE_HH │ │ │ │ │ +21 template< class > │ │ │ │ │ +22 class IdentityGrid; │ │ │ │ │ +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 }; │ │ │ │ │ +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:533 │ │ │ │ │ +_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:606 │ │ │ │ │ +_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:93 │ │ │ │ │ +_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:415 │ │ │ │ │ +_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/a00992.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: persistentcontainervector.hh File Reference │ │ │ │ +dune-grid: tensorgridfactory.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,34 +72,50 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
persistentcontainervector.hh File Reference
│ │ │ │ +
tensorgridfactory.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <algorithm>
│ │ │ │ -#include <cassert>
│ │ │ │ + │ │ │ │ +

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.

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

│ │ │ │ Classes

class  Dune::PersistentContainerVector< G, IndexSet, Vector >
 vector-based implementation of the PersistentContainer 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,21 +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 │ │ │ │ │ -persistentcontainervector.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +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_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_._._. │ │ │ │ │ +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/a00992_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: persistentcontainervector.hh Source File │ │ │ │ +dune-grid: tensorgridfactory.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,175 +74,403 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
persistentcontainervector.hh
│ │ │ │ +
tensorgridfactory.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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 {
│ │ │ │ - │ │ │ │ +
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 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 {}
│ │ │ │ +
│ │ │ │ +
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 }
│ │ │ │
│ │ │ │
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 ); }
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
│ │ │ │ -
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_; }
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ +
│ │ │ │ +
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...
│ │ │ │ + │ │ │ │
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 common/indexidset.hh:78
│ │ │ │ -
auto size(GeometryType type) const
Return total number of entities of given geometry type in entity set .
Definition common/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 common/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 common/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
│ │ │ │ +
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:518
│ │ │ │ +
Provide a generic factory class for unstructured grids.
Definition common/gridfactory.hh:275
│ │ │ │ +
virtual void insertElement(const GeometryType &type, const std::vector< unsigned int > &vertices)
Insert an element into the coarse grid.
Definition common/gridfactory.hh:307
│ │ │ │ +
virtual void insertVertex(const FieldVector< ctype, dimworld > &pos)
Insert a vertex into the coarse grid.
Definition common/gridfactory.hh:296
│ │ │ │ +
virtual std::unique_ptr< GridType > createGrid()
Finalize grid creation and hand over the grid.
Definition common/gridfactory.hh:333
│ │ │ │ +
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:166
│ │ │ │ +
typename Base::Communication Communication
Definition yaspgrid.hh:181
│ │ │ │ +
Coordinate container for a tensor product YaspGrid.
Definition coordinates.hh:245
│ │ │ │ +
Provide a generic factory class for unstructured grids.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,227 +1,481 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _u_t_i_l_i_t_y │ │ │ │ │ -persistentcontainervector.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 © 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; │ │ │ │ │ +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 │ │ │ │ │ -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 {} │ │ │ │ │ +_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 } │ │ │ │ │ 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 ); } │ │ │ │ │ +_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_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__; } │ │ │ │ │ +_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 │ │ │ │ │ -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 │ │ │ │ │ +_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 │ │ │ │ │ _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 common/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 common/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 common/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 common/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_:_:_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:518 │ │ │ │ │ +_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:275 │ │ │ │ │ +_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:307 │ │ │ │ │ +_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:296 │ │ │ │ │ +_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:333 │ │ │ │ │ +_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:166 │ │ │ │ │ +_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:181 │ │ │ │ │ +_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/a00995.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: entitycommhelper.hh File Reference │ │ │ │ +dune-grid: persistentcontainerwrapper.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,32 +72,25 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
entitycommhelper.hh File Reference
│ │ │ │ +
persistentcontainerwrapper.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/grid/common/gridenums.hh>
│ │ │ │ +
#include <dune/grid/utility/hostgridaccess.hh>
│ │ │ │ +#include <dune/grid/utility/persistentcontainer.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ 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 >
class  Dune::PersistentContainerWrapper< G, T >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,27 +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 │ │ │ │ │ -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> │ │ │ │ │ +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 │ │ │ │ │ -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_ _> │ │ │ │ │ +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. │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ 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: entitycommhelper.hh Source File │ │ │ │ +dune-grid: persistentcontainerwrapper.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,169 +74,150 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
entitycommhelper.hh
│ │ │ │ +
persistentcontainerwrapper.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_PERSISTENTCONTAINERWRAPPER_HH
│ │ │ │ +
6#define DUNE_PERSISTENTCONTAINERWRAPPER_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ -
9
│ │ │ │ -
10namespace Dune
│ │ │ │ -
11{
│ │ │ │ -
12
│ │ │ │ -
13 template< InterfaceType iftype >
│ │ │ │ - │ │ │ │ -
15
│ │ │ │ + │ │ │ │ + │ │ │ │ +
10
│ │ │ │ +
11namespace Dune
│ │ │ │ +
12{
│ │ │ │ +
13
│ │ │ │ +
14 // PersistentContainerWrapper
│ │ │ │ +
15 // --------------------------
│ │ │ │
16
│ │ │ │ -
17 template<>
│ │ │ │ +
17 template< class G, class T >
│ │ │ │
│ │ │ │ - │ │ │ │ + │ │ │ │
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 };
│ │ │ │ -
│ │ │ │ + │ │ │ │ +
21
│ │ │ │ + │ │ │ │ +
23
│ │ │ │ +
24 typedef typename HostGridAccess::HostGrid HostGrid;
│ │ │ │ + │ │ │ │ +
26
│ │ │ │ +
27 public:
│ │ │ │ +
28 typedef G Grid;
│ │ │ │ +
29
│ │ │ │ + │ │ │ │ + │ │ │ │
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 {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
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 static bool send ( const PartitionType p )
│ │ │ │ -
54 {
│ │ │ │ -
55 //return (p == InteriorEntity) || (p == BorderEntity) || (p == OverlapEntity);
│ │ │ │ -
56 return (p != FrontEntity) && (p != GhostEntity);
│ │ │ │ -
57 }
│ │ │ │ +
53 const Value &operator() ( const Entity &entity, int subEntity ) const
│ │ │ │ +
54 {
│ │ │ │ +
55 return hostContainer_( HostGridAccess::hostEntity( entity ), subEntity );
│ │ │ │ +
56 }
│ │ │ │
│ │ │ │ -
58
│ │ │ │ +
57
│ │ │ │ +
58 template< class Entity >
│ │ │ │
│ │ │ │ -
59 static bool receive ( const PartitionType p )
│ │ │ │ +
59 Value &operator() ( const Entity &entity, int subEntity )
│ │ │ │
60 {
│ │ │ │ -
61 //return (p == InteriorEntity) || (p == BorderEntity) || (p == OverlapEntity) || (p == FrontEntity);
│ │ │ │ -
62 return (p != GhostEntity);
│ │ │ │ -
63 }
│ │ │ │ -
│ │ │ │ -
64 };
│ │ │ │ +
61 return hostContainer_( HostGridAccess::hostEntity( entity ), subEntity );
│ │ │ │ +
62 }
│ │ │ │
│ │ │ │ +
63
│ │ │ │ +
64 Size size () const { return hostContainer_.size(); }
│ │ │ │
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 }
│ │ │ │ -
│ │ │ │ +
66 void resize ( const Value &value = Value() ) { hostContainer_.resize( value ); }
│ │ │ │ + │ │ │ │ +
68
│ │ │ │ +
69 void fill ( const Value &value = Value() ) { hostContainer_.fill( value ); }
│ │ │ │ +
70
│ │ │ │ +
71 void swap ( This &other ) { hostContainer_.swap( other.hostContainer_ ); }
│ │ │ │ +
72
│ │ │ │ +
73 ConstIterator begin () const { return hostContainer_.begin(); }
│ │ │ │ + │ │ │ │
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
│ │ │ │ +
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
│ │ │ │ +
85} // namespace Dune
│ │ │ │ +
86
│ │ │ │ +
87#endif // #ifndef DUNE_PERSISTENTCONTAINERWRAPPER_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
│ │ │ │ +
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,190 +1,198 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _u_t_i_l_i_t_y │ │ │ │ │ -entitycommhelper.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 © 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_PERSISTENTCONTAINERWRAPPER_HH │ │ │ │ │ +6#define DUNE_PERSISTENTCONTAINERWRAPPER_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 │ │ │ │ │ +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<> │ │ │ │ │ -_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 > │ │ │ │ │ +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 { │ │ │ │ │ -_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 }; │ │ │ │ │ +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 │ │ │ │ │ -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 ) │ │ │ │ │ +_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 (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 ) │ │ │ │ │ +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 (p == InteriorEntity) || (p == BorderEntity) || (p == │ │ │ │ │ -OverlapEntity) || (p == FrontEntity); │ │ │ │ │ -62 return (p != _G_h_o_s_t_E_n_t_i_t_y); │ │ │ │ │ -63 } │ │ │ │ │ -64 }; │ │ │ │ │ +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 │ │ │ │ │ -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 } │ │ │ │ │ +_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_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 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 │ │ │ │ │ +_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 │ │ │ │ │ +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_:_:_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_:_:_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/a00998.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.

│ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00998_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:177
│ │ │ │
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/a01001.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: persistentcontainermap.hh File Reference │ │ │ │ +dune-grid: persistentcontainervector.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,33 +72,26 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
persistentcontainermap.hh File Reference
│ │ │ │ +
persistentcontainervector.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>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Classes

class  Dune::GlobalIndexSet< GridView >
│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::PersistentContainerMap< G, IdSet, Map >
 map-based implementation of the PersistentContainer More...
 
class  Dune::PersistentContainerMap< G, IdSet, Map >::IteratorWrapper< value, iterator >
class  Dune::PersistentContainerVector< G, IndexSet, Vector >
 vector-based implementation of the PersistentContainer More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,29 +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 │ │ │ │ │ -persistentcontainermap.hh File Reference │ │ │ │ │ +persistentcontainervector.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> │ │ │ │ │ _G_o_ _t_o_ _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_:_:_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_ _> │ │ │ │ │ +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. │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ 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: persistentcontainervector.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,387 +74,175 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
persistentcontainermap.hh
│ │ │ │ +
persistentcontainervector.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │ +
5#ifndef DUNE_PERSISTENTCONTAINERVECTOR_HH
│ │ │ │ +
6#define DUNE_PERSISTENTCONTAINERVECTOR_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>
│ │ │ │ - │ │ │ │ +
10
│ │ │ │ +
11namespace Dune
│ │ │ │ +
12{
│ │ │ │ +
13
│ │ │ │ +
14 // PersistentContainerVector
│ │ │ │ +
15 // -------------------------
│ │ │ │
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 ); }
│ │ │ │ +
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 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_ );
│ │ │ │ +
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
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
107
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
110
│ │ │ │ -
111 int codimension () const { return codim_; }
│ │ │ │ +
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 protected:
│ │ │ │ -
114 const Grid &grid () const { return *grid_; }
│ │ │ │ -
115
│ │ │ │ -
116 template< int codim >
│ │ │ │ +
113 void shrinkToFit () {}
│ │ │ │ +
114
│ │ │ │ +
115 void fill ( const Value &value ) { std::fill( begin(), end(), value ); }
│ │ │ │ +
116
│ │ │ │
│ │ │ │ -
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 > );
│ │ │ │ +
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 static void migrateEntry ( const typename IdSet::IdType &id, const Value &value,
│ │ │ │ -
128 Map &oldData, Map &newData );
│ │ │ │ +
127 ConstIterator end () const { return data_.end(); }
│ │ │ │ +
128 Iterator end () { return data_.end(); }
│ │ │ │
129
│ │ │ │ -
130 const IdSet &idSet () const { return *idSet_; }
│ │ │ │ +
130 int codimension () const { return codim_; }
│ │ │ │
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
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ +
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
│ │ │ │
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 common/indexidset.hh:447
│ │ │ │ -
IdTypeImp IdType
Type used to represent an id.
Definition common/indexidset.hh:453
│ │ │ │ -
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 common/indexidset.hh:457
│ │ │ │ -
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.
│ │ │ │ +
Index Set Interface base class.
Definition common/indexidset.hh:78
│ │ │ │ +
auto size(GeometryType type) const
Return total number of entities of given geometry type in entity set .
Definition common/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 common/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 common/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,432 +1,227 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _u_t_i_l_i_t_y │ │ │ │ │ -persistentcontainermap.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 © 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 │ │ │ │ │ +5#ifndef DUNE_PERSISTENTCONTAINERVECTOR_HH │ │ │ │ │ +6#define DUNE_PERSISTENTCONTAINERVECTOR_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> │ │ │ │ │ +10 │ │ │ │ │ +11namespace _D_u_n_e │ │ │ │ │ +12{ │ │ │ │ │ +13 │ │ │ │ │ +14 // PersistentContainerVector │ │ │ │ │ +15 // ------------------------- │ │ │ │ │ 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 ); } │ │ │ │ │ +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 │ │ │ │ │ -_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__ ); │ │ │ │ │ +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 _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__; } │ │ │ │ │ +_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 │ │ │ │ │ -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 > ); │ │ │ │ │ +_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 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 ); │ │ │ │ │ +_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 const _I_d_S_e_t &_i_d_S_e_t () const { return *_i_d_S_e_t__; } │ │ │ │ │ +_1_3_0 int _c_o_d_i_m_e_n_s_i_o_n () const { return _c_o_d_i_m__; } │ │ │ │ │ 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 │ │ │ │ │ +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 // 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 │ │ │ │ │ +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_:_:_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 common/indexidset.hh:447 │ │ │ │ │ -_D_u_n_e_:_:_I_d_S_e_t_:_:_I_d_T_y_p_e │ │ │ │ │ -IdTypeImp IdType │ │ │ │ │ -Type used to represent an id. │ │ │ │ │ -DDeeffiinniittiioonn common/indexidset.hh:453 │ │ │ │ │ -_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 common/indexidset.hh:457 │ │ │ │ │ -_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 │ │ │ │ │ +_D_u_n_e_:_:_I_n_d_e_x_S_e_t │ │ │ │ │ +Index Set Interface base class. │ │ │ │ │ +DDeeffiinniittiioonn common/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 common/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 common/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 common/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 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 │ │ │ │ │ +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 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_(_) │ │ │ │ │ +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 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 │ │ │ │ │ +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 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 │ │ │ │ │ +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 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. │ │ │ │ │ +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/a01004.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: tensorgridfactory.hh File Reference │ │ │ │ +dune-grid: vertexorderfactory.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,50 +72,41 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
tensorgridfactory.hh File Reference
│ │ │ │ +
vertexorderfactory.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 <algorithm>
│ │ │ │ +#include <cstddef>
│ │ │ │ +#include <functional>
│ │ │ │ #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/geometry/referenceelements.hh>
│ │ │ │ +#include <dune/geometry/generalvertexorder.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Namespaces

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

│ │ │ │ Classes

class  Dune::TensorGridFactory< Grid >
 A factory class for conveniently creating tensorproduct grids. More...
 
class  Dune::TensorGridFactoryCreator< Grid >
class  Dune::VertexOrderByIdFactory< IdSet, Index >
 Factory for GeneralVertexOrder objects using an IdSet. More...
 
class  Dune::TensorGridFactoryCreator< YaspGrid< dim, TensorProductCoordinates< ctype, dim > > >
struct  Dune::VertexOrderByIdFactory< IdSet, Index >::VertexOrder< dim >
 type of vertex order object may depend on the dimension of the element More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ 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,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 │ │ │ │ │ -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 │ │ │ │ │ +vertexorderfactory.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#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> │ │ │ │ │ +#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_:_:_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_:_:_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_:_:_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_ _>_ _>_ _> │ │ │ │ │ +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. │ │ │ │ │   │ │ │ │ │ -********** 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/a01004_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: tensorgridfactory.hh Source File │ │ │ │ +dune-grid: vertexorderfactory.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,403 +74,82 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
tensorgridfactory.hh
│ │ │ │ +
vertexorderfactory.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │ +
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │ +
4// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
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
│ │ │ │ -
│ │ │ │ -
66 const std::vector<ctype>& operator[](std::size_t d) const
│ │ │ │ -
67 {
│ │ │ │ -
68 return _coords[d];
│ │ │ │ -
69 }
│ │ │ │ -
│ │ │ │ -
70
│ │ │ │ -
│ │ │ │ -
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
│ │ │ │ -
│ │ │ │ -
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...
│ │ │ │ - │ │ │ │ +
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
│ │ │ │ +
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
│ │ │ │ -
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:518
│ │ │ │ -
Provide a generic factory class for unstructured grids.
Definition common/gridfactory.hh:275
│ │ │ │ -
virtual void insertElement(const GeometryType &type, const std::vector< unsigned int > &vertices)
Insert an element into the coarse grid.
Definition common/gridfactory.hh:307
│ │ │ │ -
virtual void insertVertex(const FieldVector< ctype, dimworld > &pos)
Insert a vertex into the coarse grid.
Definition common/gridfactory.hh:296
│ │ │ │ -
virtual std::unique_ptr< GridType > createGrid()
Finalize grid creation and hand over the grid.
Definition common/gridfactory.hh:333
│ │ │ │ -
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:166
│ │ │ │ -
typename Base::Communication Communication
Definition yaspgrid.hh:181
│ │ │ │ -
Coordinate container for a tensor product YaspGrid.
Definition coordinates.hh:245
│ │ │ │ -
Provide a generic factory class for unstructured grids.
│ │ │ │ +
auto referenceElement(const Geometry< mydim, cdim, GridImp, GeometryImp > &geo) -> decltype(referenceElement(geo, geo.impl()))
Definition common/geometry.hh:558
│ │ │ │ +
Id Set Interface.
Definition common/indexidset.hh:447
│ │ │ │ +
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 common/indexidset.hh:481
│ │ │ │ +
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,481 +1,96 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _u_t_i_l_i_t_y │ │ │ │ │ -tensorgridfactory.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 © 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 │ │ │ │ │ +3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ +4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 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 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 } │ │ │ │ │ -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 } │ │ │ │ │ -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 │ │ │ │ │ +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 │ │ │ │ │ +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_:_:_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:518 │ │ │ │ │ -_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:275 │ │ │ │ │ -_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:307 │ │ │ │ │ -_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:296 │ │ │ │ │ -_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:333 │ │ │ │ │ -_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:166 │ │ │ │ │ -_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:181 │ │ │ │ │ -_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_:_:_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 common/indexidset.hh:447 │ │ │ │ │ +_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 common/indexidset.hh:481 │ │ │ │ │ +_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/a01007.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: hierarchicsearch.hh File Reference │ │ │ │ +dune-grid: parmetisgridpartitioner.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -69,49 +69,32 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
hierarchicsearch.hh File Reference
│ │ │ │ +
parmetisgridpartitioner.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Utility class for hierarchically searching for an Entity containing a given point. │ │ │ │ +

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

│ │ │ │ -
#include <cstddef>
│ │ │ │ -#include <sstream>
│ │ │ │ -#include <string>
│ │ │ │ -#include <utility>
│ │ │ │ -#include <dune/common/classname.hh>
│ │ │ │ +
#include <algorithm>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/common/parallel/mpihelper.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/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...
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │

Detailed Description

│ │ │ │ -

Utility class for hierarchically searching for an Entity containing a given point.

│ │ │ │ +

Compute a repartitioning of a Dune grid using ParMetis.

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,34 +1,22 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ -hierarchicsearch.hh File Reference │ │ │ │ │ -Utility class for hierarchically searching for an Entity containing a given │ │ │ │ │ -point. _M_o_r_e_._._. │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +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_/_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_e_n_u_m_s_._h_h> │ │ │ │ │ +#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_:_:_H_i_e_r_a_r_c_h_i_c_S_e_a_r_c_h_<_ _G_r_i_d_,_ _I_S_ _> │ │ │ │ │ -  Search an _I_n_d_e_x_S_e_t for an _E_n_t_i_t_y containing a given point. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -NNaammeessppaacceess │ │ │ │ │ -namespace   _D_u_n_e │ │ │ │ │ -  Include standard header files. │ │ │ │ │ -  │ │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -Utility class for hierarchically searching for an Entity containing a given │ │ │ │ │ -point. │ │ │ │ │ +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/a01007_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: hierarchicsearch.hh Source File │ │ │ │ +dune-grid: parmetisgridpartitioner.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,184 +74,218 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
hierarchicsearch.hh
│ │ │ │ +
parmetisgridpartitioner.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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:
│ │ │ │ +
3#ifndef DUNE_GRID_UTILITY_PARMETISGRIDPARTITIONER_HH
│ │ │ │ +
4#define DUNE_GRID_UTILITY_PARMETISGRIDPARTITIONER_HH
│ │ │ │
5
│ │ │ │ -
6#ifndef DUNE_GRID_HIERARCHICSEARCH_HH
│ │ │ │ -
7#define DUNE_GRID_HIERARCHICSEARCH_HH
│ │ │ │ -
8
│ │ │ │ -
15#include <cstddef>
│ │ │ │ -
16#include <sstream>
│ │ │ │ -
17#include <string>
│ │ │ │ -
18#include <utility>
│ │ │ │ -
19
│ │ │ │ -
20#include <dune/common/classname.hh>
│ │ │ │ -
21#include <dune/common/exceptions.hh>
│ │ │ │ -
22#include <dune/common/fvector.hh>
│ │ │ │ +
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
│ │ │ │ - │ │ │ │ - │ │ │ │ -
26
│ │ │ │ -
27namespace Dune
│ │ │ │ -
28{
│ │ │ │ +
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
│ │ │ │ -
33 template<class Grid, class IS>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
35 {
│ │ │ │ -
37 constexpr static int dim = Grid::dimension;
│ │ │ │ -
38
│ │ │ │ -
40 constexpr static int dimw = Grid::dimensionworld;
│ │ │ │ -
41
│ │ │ │ -
43 typedef typename Grid::ctype ct;
│ │ │ │ -
44
│ │ │ │ -
46 typedef typename Grid::template Codim<0>::Entity Entity;
│ │ │ │ -
47
│ │ │ │ -
49 typedef typename Grid::HierarchicIterator HierarchicIterator;
│ │ │ │ +
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 static std::string formatEntityInformation ( const Entity &e ) {
│ │ │ │ -
52 const typename Entity::Geometry &geo = e.geometry();
│ │ │ │ -
53 std::ostringstream info;
│ │ │ │ -
54 info << "level=" << e.level() << " "
│ │ │ │ -
55 << "partition=" << e.partitionType() << " "
│ │ │ │ -
56 << "center=(" << geo.center() << ") "
│ │ │ │ -
57 << "corners=[(" << geo.corner(0) << ")";
│ │ │ │ -
58 for(int i = 1; i < geo.corners(); ++i)
│ │ │ │ -
59 info << " (" << e.geometry().corner(i) << ")";
│ │ │ │ -
60 info << "]";
│ │ │ │ -
61 return info.str();
│ │ │ │ -
62 }
│ │ │ │ -
63
│ │ │ │ -
74 Entity hFindEntity ( const Entity &entity,
│ │ │ │ -
75 const FieldVector<ct,dimw>& global) const
│ │ │ │ -
76 {
│ │ │ │ -
77 // type of element geometry
│ │ │ │ -
78 typedef typename Entity::Geometry Geometry;
│ │ │ │ -
79 // type of local coordinate
│ │ │ │ -
80 typedef typename Geometry::LocalCoordinate LocalCoordinate;
│ │ │ │ -
81
│ │ │ │ -
82 const int childLevel = entity.level()+1 ;
│ │ │ │ -
83 // loop over all child Entities
│ │ │ │ -
84 const HierarchicIterator end = entity.hend( childLevel );
│ │ │ │ -
85 for( HierarchicIterator it = entity.hbegin( childLevel ); it != end; ++it )
│ │ │ │ -
86 {
│ │ │ │ -
87 Entity child = *it;
│ │ │ │ -
88 Geometry geo = child.geometry();
│ │ │ │ -
89
│ │ │ │ -
90 LocalCoordinate local = geo.local(global);
│ │ │ │ -
91 if (referenceElement( geo ).checkInside(local))
│ │ │ │ -
92 {
│ │ │ │ -
93 // return if we found the leaf, else search through the child entities
│ │ │ │ -
94 if( indexSet_.contains( child ) )
│ │ │ │ -
95 return child;
│ │ │ │ -
96 else
│ │ │ │ -
97 return hFindEntity( child, global );
│ │ │ │ -
98 }
│ │ │ │ -
99 }
│ │ │ │ -
100 std::ostringstream children;
│ │ │ │ -
101 HierarchicIterator it = entity.hbegin( childLevel );
│ │ │ │ -
102 if(it != end) {
│ │ │ │ -
103 children << "{" << formatEntityInformation(*it) << "}";
│ │ │ │ -
104 for( ++it; it != end; ++it )
│ │ │ │ -
105 children << " {" << formatEntityInformation(*it) << "}";
│ │ │ │ -
106 }
│ │ │ │ -
107 DUNE_THROW(Exception, "{" << className(*this) << "} Unexpected "
│ │ │ │ -
108 "internal Error: none of the children of the entity "
│ │ │ │ -
109 "{" << formatEntityInformation(entity) << "} contains "
│ │ │ │ -
110 "coordinate (" << global << "). Children are: "
│ │ │ │ -
111 "[" << children.str() << "].");
│ │ │ │ -
112 }
│ │ │ │ -
113
│ │ │ │ -
114 public:
│ │ │ │ -
118 HierarchicSearch(const Grid & g, const IS & is) : grid_(g), indexSet_(is) {}
│ │ │ │ -
119
│ │ │ │ -
│ │ │ │ -
127 Entity findEntity(const FieldVector<ct,dimw>& global) const
│ │ │ │ -
128 { return findEntity<All_Partition>(global); }
│ │ │ │ -
│ │ │ │ -
129
│ │ │ │ -
137 template<PartitionIteratorType partition>
│ │ │ │ -
│ │ │ │ -
138 Entity findEntity(const FieldVector<ct,dimw>& global) const
│ │ │ │ -
139 {
│ │ │ │ -
140 typedef typename Grid::LevelGridView LevelGV;
│ │ │ │ -
141 const LevelGV &gv = grid_.levelGridView(0);
│ │ │ │ -
142
│ │ │ │ -
144 typedef typename LevelGV::template Codim<0>::template Partition<partition>::Iterator LevelIterator;
│ │ │ │ -
145
│ │ │ │ -
146 // type of element geometry
│ │ │ │ -
147 typedef typename Entity::Geometry Geometry;
│ │ │ │ -
148 // type of local coordinate
│ │ │ │ -
149 typedef typename Geometry::LocalCoordinate LocalCoordinate;
│ │ │ │ -
150
│ │ │ │ -
151 // loop over macro level
│ │ │ │ -
152 const LevelIterator end = gv.template end<0, partition>();
│ │ │ │ -
153 for (LevelIterator it = gv.template begin<0, partition>(); it != end; ++it)
│ │ │ │ -
154 {
│ │ │ │ -
155 Entity entity = *it;
│ │ │ │ -
156 Geometry geo = entity.geometry();
│ │ │ │ +
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 LocalCoordinate local = geo.local( global );
│ │ │ │ -
159 if( !referenceElement( geo ).checkInside( local ) )
│ │ │ │ -
160 continue;
│ │ │ │ +
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 if( (int(dim) != int(dimw)) && ((geo.global( local ) - global).two_norm() > 1e-8) )
│ │ │ │ -
163 continue;
│ │ │ │ +
162 for (unsigned int i=1; i<vtxdist.size(); ++i)
│ │ │ │ +
163 vtxdist[i] = vtxdist[i-1] + offset[i-1];
│ │ │ │
164
│ │ │ │ -
165 // return if we found the leaf, else search through the child entities
│ │ │ │ -
166 if( indexSet_.contains( entity ) )
│ │ │ │ -
167 return entity;
│ │ │ │ -
168 else
│ │ │ │ -
169 return hFindEntity( entity, global );
│ │ │ │ -
170 }
│ │ │ │ -
171 DUNE_THROW( GridError, "Coordinate " << global << " is outside the grid." );
│ │ │ │ -
172 }
│ │ │ │ -
│ │ │ │ -
173
│ │ │ │ -
174 private:
│ │ │ │ -
175 const Grid& grid_;
│ │ │ │ -
176 const IS& indexSet_;
│ │ │ │ -
177 };
│ │ │ │ -
│ │ │ │ -
178
│ │ │ │ -
179} // end namespace Dune
│ │ │ │ -
180
│ │ │ │ -
181#endif // DUNE_GRID_HIERARCHICSEARCH_HH
│ │ │ │ - │ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ -
LocalCoordinate local(const GlobalCoordinate &global) const
Evaluate the inverse map .
Definition common/geometry.hh:237
│ │ │ │ -
Grid abstract base class.
Definition common/grid.hh:375
│ │ │ │ -
static constexpr int dimension
The dimension of the grid.
Definition common/grid.hh:387
│ │ │ │ -
GridFamily::Traits::HierarchicIterator HierarchicIterator
A type that is a model of Dune::HierarchicIterator A type of iterator that allows to examine,...
Definition common/grid.hh:482
│ │ │ │ -
GridFamily::Traits::LevelGridView LevelGridView
type of view for level grid
Definition common/grid.hh:402
│ │ │ │ -
static constexpr int dimensionworld
The dimension of the world the grid lives in.
Definition common/grid.hh:390
│ │ │ │ -
LevelGridView levelGridView(int level) const
View for a grid level for All_Partition.
Definition common/grid.hh:584
│ │ │ │ -
ct ctype
Define type used for coordinates in grid module.
Definition common/grid.hh:518
│ │ │ │ -
A Traits struct that collects all associated types of one implementation.
Definition common/grid.hh:411
│ │ │ │ -
Search an IndexSet for an Entity containing a given point.
Definition hierarchicsearch.hh:35
│ │ │ │ -
Entity findEntity(const FieldVector< ct, dimw > &global) const
Search the IndexSet of this HierarchicSearch for an Entity containing point global.
Definition hierarchicsearch.hh:127
│ │ │ │ -
Entity findEntity(const FieldVector< ct, dimw > &global) const
Search the IndexSet of this HierarchicSearch for an Entity containing point global.
Definition hierarchicsearch.hh:138
│ │ │ │ -
HierarchicSearch(const Grid &g, const IS &is)
Construct a HierarchicSearch object from a Grid and an IndexSet.
Definition hierarchicsearch.hh:118
│ │ │ │ -
Different resources needed by all grid implementations.
│ │ │ │ +
constexpr Interior interior
PartitionSet for the interior partition.
Definition partitionset.hh:271
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,235 +1,248 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _u_t_i_l_i_t_y │ │ │ │ │ -hierarchicsearch.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 © 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: │ │ │ │ │ +3#ifndef DUNE_GRID_UTILITY_PARMETISGRIDPARTITIONER_HH │ │ │ │ │ +4#define DUNE_GRID_UTILITY_PARMETISGRIDPARTITIONER_HH │ │ │ │ │ 5 │ │ │ │ │ -6#ifndef DUNE_GRID_HIERARCHICSEARCH_HH │ │ │ │ │ -7#define DUNE_GRID_HIERARCHICSEARCH_HH │ │ │ │ │ -8 │ │ │ │ │ -15#include │ │ │ │ │ -16#include │ │ │ │ │ -17#include │ │ │ │ │ -18#include │ │ │ │ │ -19 │ │ │ │ │ -20#include │ │ │ │ │ -21#include │ │ │ │ │ -22#include │ │ │ │ │ +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 <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_._h_h> │ │ │ │ │ -25#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> │ │ │ │ │ -26 │ │ │ │ │ -27namespace _D_u_n_e │ │ │ │ │ -28{ │ │ │ │ │ +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 │ │ │ │ │ -33 template │ │ │ │ │ -_3_4 class _H_i_e_r_a_r_c_h_i_c_S_e_a_r_c_h │ │ │ │ │ -35 { │ │ │ │ │ -37 constexpr static int dim = _G_r_i_d_:_:_d_i_m_e_n_s_i_o_n; │ │ │ │ │ -38 │ │ │ │ │ -40 constexpr static int dimw = _G_r_i_d_:_:_d_i_m_e_n_s_i_o_n_w_o_r_l_d; │ │ │ │ │ -41 │ │ │ │ │ -43 typedef typename _G_r_i_d_:_:_c_t_y_p_e ct; │ │ │ │ │ -44 │ │ │ │ │ -46 typedef typename _G_r_i_d_:_:_t_e_m_p_l_a_t_e Codim<0>::Entity Entity; │ │ │ │ │ -47 │ │ │ │ │ -49 typedef typename _G_r_i_d_:_:_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r HierarchicIterator; │ │ │ │ │ +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 static std::string formatEntityInformation ( const Entity &e ) { │ │ │ │ │ -52 const typename _E_n_t_i_t_y_:_:_G_e_o_m_e_t_r_y &geo = e.geometry(); │ │ │ │ │ -53 std::ostringstream info; │ │ │ │ │ -54 info << "level=" << e.level() << " " │ │ │ │ │ -55 << "partition=" << e.partitionType() << " " │ │ │ │ │ -56 << "center=(" << geo.center() << ") " │ │ │ │ │ -57 << "corners=[(" << geo.corner(0) << ")"; │ │ │ │ │ -58 for(int i = 1; i < geo.corners(); ++i) │ │ │ │ │ -59 info << " (" << e.geometry().corner(i) << ")"; │ │ │ │ │ -60 info << "]"; │ │ │ │ │ -61 return info.str(); │ │ │ │ │ -62 } │ │ │ │ │ -63 │ │ │ │ │ -74 Entity hFindEntity ( const Entity &entity, │ │ │ │ │ -75 const FieldVector& global) const │ │ │ │ │ -76 { │ │ │ │ │ -77 // type of element geometry │ │ │ │ │ -78 typedef typename _E_n_t_i_t_y_:_:_G_e_o_m_e_t_r_y _G_e_o_m_e_t_r_y; │ │ │ │ │ -79 // type of local coordinate │ │ │ │ │ -80 typedef typename _G_e_o_m_e_t_r_y_:_:_L_o_c_a_l_C_o_o_r_d_i_n_a_t_e LocalCoordinate; │ │ │ │ │ -81 │ │ │ │ │ -82 const int childLevel = entity.level()+1 ; │ │ │ │ │ -83 // loop over all child Entities │ │ │ │ │ -84 const HierarchicIterator end = entity.hend( childLevel ); │ │ │ │ │ -85 for( HierarchicIterator it = entity.hbegin( childLevel ); it != end; ++it ) │ │ │ │ │ -86 { │ │ │ │ │ -87 Entity child = *it; │ │ │ │ │ -88 _G_e_o_m_e_t_r_y geo = child.geometry(); │ │ │ │ │ -89 │ │ │ │ │ -90 LocalCoordinate local = geo._l_o_c_a_l(global); │ │ │ │ │ -91 if (_r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t( geo ).checkInside(local)) │ │ │ │ │ -92 { │ │ │ │ │ -93 // return if we found the leaf, else search through the child entities │ │ │ │ │ -94 if( indexSet_.contains( child ) ) │ │ │ │ │ -95 return child; │ │ │ │ │ -96 else │ │ │ │ │ -97 return hFindEntity( child, global ); │ │ │ │ │ -98 } │ │ │ │ │ -99 } │ │ │ │ │ -100 std::ostringstream children; │ │ │ │ │ -101 HierarchicIterator it = entity.hbegin( childLevel ); │ │ │ │ │ -102 if(it != end) { │ │ │ │ │ -103 children << "{" << formatEntityInformation(*it) << "}"; │ │ │ │ │ -104 for( ++it; it != end; ++it ) │ │ │ │ │ -105 children << " {" << formatEntityInformation(*it) << "}"; │ │ │ │ │ -106 } │ │ │ │ │ -107 DUNE_THROW(Exception, "{" << className(*this) << "} Unexpected " │ │ │ │ │ -108 "internal Error: none of the children of the entity " │ │ │ │ │ -109 "{" << formatEntityInformation(entity) << "} contains " │ │ │ │ │ -110 "coordinate (" << global << "). Children are: " │ │ │ │ │ -111 "[" << children.str() << "]."); │ │ │ │ │ -112 } │ │ │ │ │ -113 │ │ │ │ │ -114 public: │ │ │ │ │ -_1_1_8 _H_i_e_r_a_r_c_h_i_c_S_e_a_r_c_h(const _G_r_i_d & g, const IS & is) : grid_(g), indexSet_(is) │ │ │ │ │ -{} │ │ │ │ │ -119 │ │ │ │ │ -_1_2_7 Entity _f_i_n_d_E_n_t_i_t_y(const FieldVector& global) const │ │ │ │ │ -128 { return findEntity(global); } │ │ │ │ │ -129 │ │ │ │ │ -137 template │ │ │ │ │ -_1_3_8 Entity _f_i_n_d_E_n_t_i_t_y(const FieldVector& global) const │ │ │ │ │ -139 { │ │ │ │ │ -140 typedef typename _G_r_i_d_:_:_L_e_v_e_l_G_r_i_d_V_i_e_w LevelGV; │ │ │ │ │ -141 const LevelGV &gv = grid_._l_e_v_e_l_G_r_i_d_V_i_e_w(0); │ │ │ │ │ -142 │ │ │ │ │ -144 typedef typename LevelGV::template Codim<0>::template │ │ │ │ │ -Partition::Iterator LevelIterator; │ │ │ │ │ -145 │ │ │ │ │ -146 // type of element geometry │ │ │ │ │ -147 typedef typename _E_n_t_i_t_y_:_:_G_e_o_m_e_t_r_y _G_e_o_m_e_t_r_y; │ │ │ │ │ -148 // type of local coordinate │ │ │ │ │ -149 typedef typename _G_e_o_m_e_t_r_y_:_:_L_o_c_a_l_C_o_o_r_d_i_n_a_t_e LocalCoordinate; │ │ │ │ │ -150 │ │ │ │ │ -151 // loop over macro level │ │ │ │ │ -152 const LevelIterator end = gv.template end<0, partition>(); │ │ │ │ │ -153 for (LevelIterator it = gv.template begin<0, partition>(); it != end; ++it) │ │ │ │ │ -154 { │ │ │ │ │ -155 Entity entity = *it; │ │ │ │ │ -156 _G_e_o_m_e_t_r_y geo = entity.geometry(); │ │ │ │ │ +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 LocalCoordinate local = geo._l_o_c_a_l( global ); │ │ │ │ │ -159 if( !_r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t( geo ).checkInside( local ) ) │ │ │ │ │ -160 continue; │ │ │ │ │ +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 if( (int(dim) != int(dimw)) && ((geo._g_l_o_b_a_l( local ) - global).two_norm() > │ │ │ │ │ -1e-8) ) │ │ │ │ │ -163 continue; │ │ │ │ │ +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_:_:_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_:_:_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_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 │ │ │ │ │ -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 │ │ │ │ │ -GlobalCoordinate global(const LocalCoordinate &local) const │ │ │ │ │ -Evaluate the map . │ │ │ │ │ -DDeeffiinniittiioonn common/geometry.hh:228 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_:_:_L_o_c_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ │ -FieldVector< ctype, mydim > LocalCoordinate │ │ │ │ │ -type of local coordinates │ │ │ │ │ -DDeeffiinniittiioonn common/geometry.hh:103 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_m_e_t_r_y_:_:_l_o_c_a_l │ │ │ │ │ -LocalCoordinate local(const GlobalCoordinate &global) const │ │ │ │ │ -Evaluate the inverse map . │ │ │ │ │ -DDeeffiinniittiioonn common/geometry.hh:237 │ │ │ │ │ -_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_:_:_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ │ -GridFamily::Traits::HierarchicIterator HierarchicIterator │ │ │ │ │ -A type that is a model of Dune::HierarchicIterator A type of iterator that │ │ │ │ │ -allows to examine,... │ │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:482 │ │ │ │ │ -_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_:_:_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_:_:_l_e_v_e_l_G_r_i_d_V_i_e_w │ │ │ │ │ -LevelGridView levelGridView(int level) const │ │ │ │ │ -View for a grid level for All_Partition. │ │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:584 │ │ │ │ │ -_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:518 │ │ │ │ │ -_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_:_:_H_i_e_r_a_r_c_h_i_c_S_e_a_r_c_h │ │ │ │ │ -Search an IndexSet for an Entity containing a given point. │ │ │ │ │ -DDeeffiinniittiioonn hierarchicsearch.hh:35 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_S_e_a_r_c_h_:_:_f_i_n_d_E_n_t_i_t_y │ │ │ │ │ -Entity findEntity(const FieldVector< ct, dimw > &global) const │ │ │ │ │ -Search the IndexSet of this HierarchicSearch for an Entity containing point │ │ │ │ │ -global. │ │ │ │ │ -DDeeffiinniittiioonn hierarchicsearch.hh:127 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_S_e_a_r_c_h_:_:_f_i_n_d_E_n_t_i_t_y │ │ │ │ │ -Entity findEntity(const FieldVector< ct, dimw > &global) const │ │ │ │ │ -Search the IndexSet of this HierarchicSearch for an Entity containing point │ │ │ │ │ -global. │ │ │ │ │ -DDeeffiinniittiioonn hierarchicsearch.hh:138 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_S_e_a_r_c_h_:_:_H_i_e_r_a_r_c_h_i_c_S_e_a_r_c_h │ │ │ │ │ -HierarchicSearch(const Grid &g, const IS &is) │ │ │ │ │ -Construct a HierarchicSearch object from a Grid and an IndexSet. │ │ │ │ │ -DDeeffiinniittiioonn hierarchicsearch.hh:118 │ │ │ │ │ -_g_r_i_d_._h_h │ │ │ │ │ -Different resources needed by all grid implementations. │ │ │ │ │ +_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:271 │ │ │ │ │ =============================================================================== │ │ │ │ │ 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: parmetisgridpartitioner.hh File Reference │ │ │ │ +dune-grid: gridtype.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -69,32 +69,26 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
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>
│ │ │ │ +
#include <dune-grid-config.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,19 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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_._._. │ │ │ │ │ +#include │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -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/a01010_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: parmetisgridpartitioner.hh Source File │ │ │ │ +dune-grid: gridtype.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,218 +74,44 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
parmetisgridpartitioner.hh
│ │ │ │ +
gridtype.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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:271
│ │ │ │ +
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#include <dune-grid-config.hh> // HAVE_GRIDTYPE
│ │ │ │ +
18
│ │ │ │ +
19#ifndef HEADERCHECK
│ │ │ │ +
20
│ │ │ │ +
21// NOGRID is used to specify that no default was set during configure
│ │ │ │ +
22// If NOGRID and HAVE_GRIDTYPE are both not set then no grid was selected
│ │ │ │ +
23// and an error is produced
│ │ │ │ +
24#if defined NOGRID
│ │ │ │ +
25 #if ! HAVE_GRIDTYPE
│ │ │ │ +
26 #error "No grid type selected, use GRIDTYPE=..."
│ │ │ │ +
27 #endif
│ │ │ │ +
28#else
│ │ │ │ +
29 #if ! HAVE_GRIDTYPE
│ │ │ │ +
30 #error "No grid type selected, typo in GRIDTYPE=...?"
│ │ │ │ +
31 #endif
│ │ │ │ +
32#endif
│ │ │ │ +
33
│ │ │ │ +
34#endif // HEADERCHECK
│ │ │ │ +
35
│ │ │ │ +
36#endif // DUNE_GRIDTYPE_HH
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,248 +1,39 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 © 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 │ │ │ │ │ -_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_:_:_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:271 │ │ │ │ │ +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#include // HAVE_GRIDTYPE │ │ │ │ │ +18 │ │ │ │ │ +19#ifndef HEADERCHECK │ │ │ │ │ +20 │ │ │ │ │ +21// NOGRID is used to specify that no default was set during configure │ │ │ │ │ +22// If NOGRID and HAVE_GRIDTYPE are both not set then no grid was selected │ │ │ │ │ +23// and an error is produced │ │ │ │ │ +24#if defined NOGRID │ │ │ │ │ +25 #if ! HAVE_GRIDTYPE │ │ │ │ │ +26 #error "No grid type selected, use GRIDTYPE=..." │ │ │ │ │ +27 #endif │ │ │ │ │ +28#else │ │ │ │ │ +29 #if ! HAVE_GRIDTYPE │ │ │ │ │ +30 #error "No grid type selected, typo in GRIDTYPE=...?" │ │ │ │ │ +31 #endif │ │ │ │ │ +32#endif │ │ │ │ │ +33 │ │ │ │ │ +34#endif // HEADERCHECK │ │ │ │ │ +35 │ │ │ │ │ +36#endif // DUNE_GRIDTYPE_HH │ │ │ │ │ =============================================================================== │ │ │ │ │ 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: vertexorderfactory.hh File Reference │ │ │ │ +dune-grid: hierarchicsearch.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,41 +72,46 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
vertexorderfactory.hh File Reference
│ │ │ │ +
hierarchicsearch.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <algorithm>
│ │ │ │ -#include <cstddef>
│ │ │ │ -#include <functional>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/geometry/referenceelements.hh>
│ │ │ │ -#include <dune/geometry/generalvertexorder.hh>
│ │ │ │ + │ │ │ │ +

Utility class for hierarchically searching for an Entity containing a given point. │ │ │ │ +More...

│ │ │ │ +
#include <cstddef>
│ │ │ │ +#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>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::VertexOrderByIdFactory< IdSet, Index >
 Factory for GeneralVertexOrder objects using an IdSet. More...
 
struct  Dune::VertexOrderByIdFactory< IdSet, Index >::VertexOrder< dim >
 type of vertex order object may depend on the dimension of the element More...
class  Dune::HierarchicSearch< Grid, IS >
 Search an IndexSet for an Entity containing a given point. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

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

Detailed Description

│ │ │ │ +

Utility class for hierarchically searching for an Entity containing a given point.

│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,29 +2,33 @@ │ │ │ │ │ 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 │ │ │ │ │ -#include │ │ │ │ │ +hierarchicsearch.hh File Reference │ │ │ │ │ +Utility class for hierarchically searching for an Entity containing a given │ │ │ │ │ +point. _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_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_:_:_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_._._. │ │ │ │ │ -  │ │ │ │ │ -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_:_:_H_i_e_r_a_r_c_h_i_c_S_e_a_r_c_h_<_ _G_r_i_d_,_ _I_S_ _> │ │ │ │ │ +  Search an _I_n_d_e_x_S_e_t for an _E_n_t_i_t_y containing a given point. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ +Utility class for hierarchically searching for an Entity containing a given │ │ │ │ │ +point. │ │ │ │ │ =============================================================================== │ │ │ │ │ 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: vertexorderfactory.hh Source File │ │ │ │ +dune-grid: hierarchicsearch.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,82 +74,184 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
vertexorderfactory.hh
│ │ │ │ +
hierarchicsearch.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │ +
6#ifndef DUNE_GRID_HIERARCHICSEARCH_HH
│ │ │ │ +
7#define DUNE_GRID_HIERARCHICSEARCH_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
│ │ │ │ -
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
│ │ │ │ +
15#include <cstddef>
│ │ │ │ +
16#include <sstream>
│ │ │ │ +
17#include <string>
│ │ │ │ +
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>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
35 {
│ │ │ │ +
37 constexpr static int dim = Grid::dimension;
│ │ │ │ +
38
│ │ │ │ +
40 constexpr static int dimw = Grid::dimensionworld;
│ │ │ │ +
41
│ │ │ │ +
43 typedef typename Grid::ctype ct;
│ │ │ │
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
│ │ │ │ +
46 typedef typename Grid::template Codim<0>::Entity Entity;
│ │ │ │ +
47
│ │ │ │ +
49 typedef typename Grid::HierarchicIterator HierarchicIterator;
│ │ │ │ +
50
│ │ │ │ +
51 static std::string formatEntityInformation ( const Entity &e ) {
│ │ │ │ +
52 const typename Entity::Geometry &geo = e.geometry();
│ │ │ │ +
53 std::ostringstream info;
│ │ │ │ +
54 info << "level=" << e.level() << " "
│ │ │ │ +
55 << "partition=" << e.partitionType() << " "
│ │ │ │ +
56 << "center=(" << geo.center() << ") "
│ │ │ │ +
57 << "corners=[(" << geo.corner(0) << ")";
│ │ │ │ +
58 for(int i = 1; i < geo.corners(); ++i)
│ │ │ │ +
59 info << " (" << e.geometry().corner(i) << ")";
│ │ │ │ +
60 info << "]";
│ │ │ │ +
61 return info.str();
│ │ │ │ +
62 }
│ │ │ │ +
63
│ │ │ │ +
74 Entity hFindEntity ( const Entity &entity,
│ │ │ │ +
75 const FieldVector<ct,dimw>& global) const
│ │ │ │ +
76 {
│ │ │ │ +
77 // type of element geometry
│ │ │ │ +
78 typedef typename Entity::Geometry Geometry;
│ │ │ │ +
79 // type of local coordinate
│ │ │ │ +
80 typedef typename Geometry::LocalCoordinate LocalCoordinate;
│ │ │ │ +
81
│ │ │ │ +
82 const int childLevel = entity.level()+1 ;
│ │ │ │ +
83 // loop over all child Entities
│ │ │ │ +
84 const HierarchicIterator end = entity.hend( childLevel );
│ │ │ │ +
85 for( HierarchicIterator it = entity.hbegin( childLevel ); it != end; ++it )
│ │ │ │ +
86 {
│ │ │ │ +
87 Entity child = *it;
│ │ │ │ +
88 Geometry geo = child.geometry();
│ │ │ │ +
89
│ │ │ │ +
90 LocalCoordinate local = geo.local(global);
│ │ │ │ +
91 if (referenceElement( geo ).checkInside(local))
│ │ │ │ +
92 {
│ │ │ │ +
93 // return if we found the leaf, else search through the child entities
│ │ │ │ +
94 if( indexSet_.contains( child ) )
│ │ │ │ +
95 return child;
│ │ │ │ +
96 else
│ │ │ │ +
97 return hFindEntity( child, global );
│ │ │ │ +
98 }
│ │ │ │ +
99 }
│ │ │ │ +
100 std::ostringstream children;
│ │ │ │ +
101 HierarchicIterator it = entity.hbegin( childLevel );
│ │ │ │ +
102 if(it != end) {
│ │ │ │ +
103 children << "{" << formatEntityInformation(*it) << "}";
│ │ │ │ +
104 for( ++it; it != end; ++it )
│ │ │ │ +
105 children << " {" << formatEntityInformation(*it) << "}";
│ │ │ │ +
106 }
│ │ │ │ +
107 DUNE_THROW(Exception, "{" << className(*this) << "} Unexpected "
│ │ │ │ +
108 "internal Error: none of the children of the entity "
│ │ │ │ +
109 "{" << formatEntityInformation(entity) << "} contains "
│ │ │ │ +
110 "coordinate (" << global << "). Children are: "
│ │ │ │ +
111 "[" << children.str() << "].");
│ │ │ │ +
112 }
│ │ │ │ +
113
│ │ │ │ +
114 public:
│ │ │ │ +
118 HierarchicSearch(const Grid & g, const IS & is) : grid_(g), indexSet_(is) {}
│ │ │ │ +
119
│ │ │ │ +
│ │ │ │ +
127 Entity findEntity(const FieldVector<ct,dimw>& global) const
│ │ │ │ +
128 { return findEntity<All_Partition>(global); }
│ │ │ │ +
│ │ │ │ +
129
│ │ │ │ +
137 template<PartitionIteratorType partition>
│ │ │ │ +
│ │ │ │ +
138 Entity findEntity(const FieldVector<ct,dimw>& global) const
│ │ │ │ +
139 {
│ │ │ │ +
140 typedef typename Grid::LevelGridView LevelGV;
│ │ │ │ +
141 const LevelGV &gv = grid_.levelGridView(0);
│ │ │ │ +
142
│ │ │ │ +
144 typedef typename LevelGV::template Codim<0>::template Partition<partition>::Iterator LevelIterator;
│ │ │ │ +
145
│ │ │ │ +
146 // type of element geometry
│ │ │ │ +
147 typedef typename Entity::Geometry Geometry;
│ │ │ │ +
148 // type of local coordinate
│ │ │ │ +
149 typedef typename Geometry::LocalCoordinate LocalCoordinate;
│ │ │ │ +
150
│ │ │ │ +
151 // loop over macro level
│ │ │ │ +
152 const LevelIterator end = gv.template end<0, partition>();
│ │ │ │ +
153 for (LevelIterator it = gv.template begin<0, partition>(); it != end; ++it)
│ │ │ │ +
154 {
│ │ │ │ +
155 Entity entity = *it;
│ │ │ │ +
156 Geometry geo = entity.geometry();
│ │ │ │ +
157
│ │ │ │ +
158 LocalCoordinate local = geo.local( global );
│ │ │ │ +
159 if( !referenceElement( geo ).checkInside( local ) )
│ │ │ │ +
160 continue;
│ │ │ │ +
161
│ │ │ │ +
162 if( (int(dim) != int(dimw)) && ((geo.global( local ) - global).two_norm() > 1e-8) )
│ │ │ │ +
163 continue;
│ │ │ │ +
164
│ │ │ │ +
165 // return if we found the leaf, else search through the child entities
│ │ │ │ +
166 if( indexSet_.contains( entity ) )
│ │ │ │ +
167 return entity;
│ │ │ │ +
168 else
│ │ │ │ +
169 return hFindEntity( entity, global );
│ │ │ │ +
170 }
│ │ │ │ +
171 DUNE_THROW( GridError, "Coordinate " << global << " is outside the grid." );
│ │ │ │ +
172 }
│ │ │ │ +
│ │ │ │ +
173
│ │ │ │ +
174 private:
│ │ │ │ +
175 const Grid& grid_;
│ │ │ │ +
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
│ │ │ │ -
Id Set Interface.
Definition common/indexidset.hh:447
│ │ │ │ -
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 common/indexidset.hh:481
│ │ │ │ -
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
│ │ │ │ +
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
│ │ │ │ +
LocalCoordinate local(const GlobalCoordinate &global) const
Evaluate the inverse map .
Definition common/geometry.hh:237
│ │ │ │ +
Grid abstract base class.
Definition common/grid.hh:375
│ │ │ │ +
static constexpr int dimension
The dimension of the grid.
Definition common/grid.hh:387
│ │ │ │ +
GridFamily::Traits::HierarchicIterator HierarchicIterator
A type that is a model of Dune::HierarchicIterator A type of iterator that allows to examine,...
Definition common/grid.hh:482
│ │ │ │ +
GridFamily::Traits::LevelGridView LevelGridView
type of view for level grid
Definition common/grid.hh:402
│ │ │ │ +
static constexpr int dimensionworld
The dimension of the world the grid lives in.
Definition common/grid.hh:390
│ │ │ │ +
LevelGridView levelGridView(int level) const
View for a grid level for All_Partition.
Definition common/grid.hh:584
│ │ │ │ +
ct ctype
Define type used for coordinates in grid module.
Definition common/grid.hh:518
│ │ │ │ +
A Traits struct that collects all associated types of one implementation.
Definition common/grid.hh:411
│ │ │ │ +
Search an IndexSet for an Entity containing a given point.
Definition hierarchicsearch.hh:35
│ │ │ │ +
Entity findEntity(const FieldVector< ct, dimw > &global) const
Search the IndexSet of this HierarchicSearch for an Entity containing point global.
Definition hierarchicsearch.hh:127
│ │ │ │ +
Entity findEntity(const FieldVector< ct, dimw > &global) const
Search the IndexSet of this HierarchicSearch for an Entity containing point global.
Definition hierarchicsearch.hh:138
│ │ │ │ +
HierarchicSearch(const Grid &g, const IS &is)
Construct a HierarchicSearch object from a Grid and an IndexSet.
Definition hierarchicsearch.hh:118
│ │ │ │ +
Different resources needed by all grid implementations.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,96 +1,235 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _u_t_i_l_i_t_y │ │ │ │ │ -vertexorderfactory.hh │ │ │ │ │ +hierarchicsearch.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 © 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 │ │ │ │ │ +6#ifndef DUNE_GRID_HIERARCHICSEARCH_HH │ │ │ │ │ +7#define DUNE_GRID_HIERARCHICSEARCH_HH │ │ │ │ │ 8 │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11#include │ │ │ │ │ -12#include │ │ │ │ │ -13 │ │ │ │ │ -14#include │ │ │ │ │ -15#include │ │ │ │ │ -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 │ │ │ │ │ +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_/_c_o_m_m_o_n_/_g_r_i_d_._h_h> │ │ │ │ │ +25#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> │ │ │ │ │ +26 │ │ │ │ │ +27namespace _D_u_n_e │ │ │ │ │ +28{ │ │ │ │ │ +29 │ │ │ │ │ +33 template │ │ │ │ │ +_3_4 class _H_i_e_r_a_r_c_h_i_c_S_e_a_r_c_h │ │ │ │ │ +35 { │ │ │ │ │ +37 constexpr static int dim = _G_r_i_d_:_:_d_i_m_e_n_s_i_o_n; │ │ │ │ │ +38 │ │ │ │ │ +40 constexpr static int dimw = _G_r_i_d_:_:_d_i_m_e_n_s_i_o_n_w_o_r_l_d; │ │ │ │ │ +41 │ │ │ │ │ +43 typedef typename _G_r_i_d_:_:_c_t_y_p_e ct; │ │ │ │ │ 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 │ │ │ │ │ +46 typedef typename _G_r_i_d_:_:_t_e_m_p_l_a_t_e Codim<0>::Entity Entity; │ │ │ │ │ +47 │ │ │ │ │ +49 typedef typename _G_r_i_d_:_:_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r HierarchicIterator; │ │ │ │ │ +50 │ │ │ │ │ +51 static std::string formatEntityInformation ( const Entity &e ) { │ │ │ │ │ +52 const typename _E_n_t_i_t_y_:_:_G_e_o_m_e_t_r_y &geo = e.geometry(); │ │ │ │ │ +53 std::ostringstream info; │ │ │ │ │ +54 info << "level=" << e.level() << " " │ │ │ │ │ +55 << "partition=" << e.partitionType() << " " │ │ │ │ │ +56 << "center=(" << geo.center() << ") " │ │ │ │ │ +57 << "corners=[(" << geo.corner(0) << ")"; │ │ │ │ │ +58 for(int i = 1; i < geo.corners(); ++i) │ │ │ │ │ +59 info << " (" << e.geometry().corner(i) << ")"; │ │ │ │ │ +60 info << "]"; │ │ │ │ │ +61 return info.str(); │ │ │ │ │ +62 } │ │ │ │ │ +63 │ │ │ │ │ +74 Entity hFindEntity ( const Entity &entity, │ │ │ │ │ +75 const FieldVector& global) const │ │ │ │ │ +76 { │ │ │ │ │ +77 // type of element geometry │ │ │ │ │ +78 typedef typename _E_n_t_i_t_y_:_:_G_e_o_m_e_t_r_y _G_e_o_m_e_t_r_y; │ │ │ │ │ +79 // type of local coordinate │ │ │ │ │ +80 typedef typename _G_e_o_m_e_t_r_y_:_:_L_o_c_a_l_C_o_o_r_d_i_n_a_t_e LocalCoordinate; │ │ │ │ │ +81 │ │ │ │ │ +82 const int childLevel = entity.level()+1 ; │ │ │ │ │ +83 // loop over all child Entities │ │ │ │ │ +84 const HierarchicIterator end = entity.hend( childLevel ); │ │ │ │ │ +85 for( HierarchicIterator it = entity.hbegin( childLevel ); it != end; ++it ) │ │ │ │ │ +86 { │ │ │ │ │ +87 Entity child = *it; │ │ │ │ │ +88 _G_e_o_m_e_t_r_y geo = child.geometry(); │ │ │ │ │ +89 │ │ │ │ │ +90 LocalCoordinate local = geo._l_o_c_a_l(global); │ │ │ │ │ +91 if (_r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t( geo ).checkInside(local)) │ │ │ │ │ +92 { │ │ │ │ │ +93 // return if we found the leaf, else search through the child entities │ │ │ │ │ +94 if( indexSet_.contains( child ) ) │ │ │ │ │ +95 return child; │ │ │ │ │ +96 else │ │ │ │ │ +97 return hFindEntity( child, global ); │ │ │ │ │ +98 } │ │ │ │ │ +99 } │ │ │ │ │ +100 std::ostringstream children; │ │ │ │ │ +101 HierarchicIterator it = entity.hbegin( childLevel ); │ │ │ │ │ +102 if(it != end) { │ │ │ │ │ +103 children << "{" << formatEntityInformation(*it) << "}"; │ │ │ │ │ +104 for( ++it; it != end; ++it ) │ │ │ │ │ +105 children << " {" << formatEntityInformation(*it) << "}"; │ │ │ │ │ +106 } │ │ │ │ │ +107 DUNE_THROW(Exception, "{" << className(*this) << "} Unexpected " │ │ │ │ │ +108 "internal Error: none of the children of the entity " │ │ │ │ │ +109 "{" << formatEntityInformation(entity) << "} contains " │ │ │ │ │ +110 "coordinate (" << global << "). Children are: " │ │ │ │ │ +111 "[" << children.str() << "]."); │ │ │ │ │ +112 } │ │ │ │ │ +113 │ │ │ │ │ +114 public: │ │ │ │ │ +_1_1_8 _H_i_e_r_a_r_c_h_i_c_S_e_a_r_c_h(const _G_r_i_d & g, const IS & is) : grid_(g), indexSet_(is) │ │ │ │ │ +{} │ │ │ │ │ +119 │ │ │ │ │ +_1_2_7 Entity _f_i_n_d_E_n_t_i_t_y(const FieldVector& global) const │ │ │ │ │ +128 { return findEntity(global); } │ │ │ │ │ +129 │ │ │ │ │ +137 template │ │ │ │ │ +_1_3_8 Entity _f_i_n_d_E_n_t_i_t_y(const FieldVector& global) const │ │ │ │ │ +139 { │ │ │ │ │ +140 typedef typename _G_r_i_d_:_:_L_e_v_e_l_G_r_i_d_V_i_e_w LevelGV; │ │ │ │ │ +141 const LevelGV &gv = grid_._l_e_v_e_l_G_r_i_d_V_i_e_w(0); │ │ │ │ │ +142 │ │ │ │ │ +144 typedef typename LevelGV::template Codim<0>::template │ │ │ │ │ +Partition::Iterator LevelIterator; │ │ │ │ │ +145 │ │ │ │ │ +146 // type of element geometry │ │ │ │ │ +147 typedef typename _E_n_t_i_t_y_:_:_G_e_o_m_e_t_r_y _G_e_o_m_e_t_r_y; │ │ │ │ │ +148 // type of local coordinate │ │ │ │ │ +149 typedef typename _G_e_o_m_e_t_r_y_:_:_L_o_c_a_l_C_o_o_r_d_i_n_a_t_e LocalCoordinate; │ │ │ │ │ +150 │ │ │ │ │ +151 // loop over macro level │ │ │ │ │ +152 const LevelIterator end = gv.template end<0, partition>(); │ │ │ │ │ +153 for (LevelIterator it = gv.template begin<0, partition>(); it != end; ++it) │ │ │ │ │ +154 { │ │ │ │ │ +155 Entity entity = *it; │ │ │ │ │ +156 _G_e_o_m_e_t_r_y geo = entity.geometry(); │ │ │ │ │ +157 │ │ │ │ │ +158 LocalCoordinate local = geo._l_o_c_a_l( global ); │ │ │ │ │ +159 if( !_r_e_f_e_r_e_n_c_e_E_l_e_m_e_n_t( geo ).checkInside( local ) ) │ │ │ │ │ +160 continue; │ │ │ │ │ +161 │ │ │ │ │ +162 if( (int(dim) != int(dimw)) && ((geo._g_l_o_b_a_l( local ) - global).two_norm() > │ │ │ │ │ +1e-8) ) │ │ │ │ │ +163 continue; │ │ │ │ │ +164 │ │ │ │ │ +165 // return if we found the leaf, else search through the child entities │ │ │ │ │ +166 if( indexSet_.contains( entity ) ) │ │ │ │ │ +167 return entity; │ │ │ │ │ +168 else │ │ │ │ │ +169 return hFindEntity( entity, global ); │ │ │ │ │ +170 } │ │ │ │ │ +171 DUNE_THROW( _G_r_i_d_E_r_r_o_r, "Coordinate " << global << " is outside the grid." │ │ │ │ │ +); │ │ │ │ │ +172 } │ │ │ │ │ +173 │ │ │ │ │ +174 private: │ │ │ │ │ +175 const _G_r_i_d& grid_; │ │ │ │ │ +176 const IS& indexSet_; │ │ │ │ │ +177 }; │ │ │ │ │ +178 │ │ │ │ │ +179} // end namespace Dune │ │ │ │ │ +180 │ │ │ │ │ +181#endif // DUNE_GRID_HIERARCHICSEARCH_HH │ │ │ │ │ +_g_r_i_d_e_n_u_m_s_._h_h │ │ │ │ │ _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_:_:_I_d_S_e_t │ │ │ │ │ -Id Set Interface. │ │ │ │ │ -DDeeffiinniittiioonn common/indexidset.hh:447 │ │ │ │ │ -_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 common/indexidset.hh:481 │ │ │ │ │ -_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_:_:_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_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 │ │ │ │ │ +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 │ │ │ │ │ +GlobalCoordinate global(const LocalCoordinate &local) const │ │ │ │ │ +Evaluate the map . │ │ │ │ │ +DDeeffiinniittiioonn common/geometry.hh:228 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_:_:_L_o_c_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ │ +FieldVector< ctype, mydim > LocalCoordinate │ │ │ │ │ +type of local coordinates │ │ │ │ │ +DDeeffiinniittiioonn common/geometry.hh:103 │ │ │ │ │ +_D_u_n_e_:_:_G_e_o_m_e_t_r_y_:_:_l_o_c_a_l │ │ │ │ │ +LocalCoordinate local(const GlobalCoordinate &global) const │ │ │ │ │ +Evaluate the inverse map . │ │ │ │ │ +DDeeffiinniittiioonn common/geometry.hh:237 │ │ │ │ │ +_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_:_:_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ │ +GridFamily::Traits::HierarchicIterator HierarchicIterator │ │ │ │ │ +A type that is a model of Dune::HierarchicIterator A type of iterator that │ │ │ │ │ +allows to examine,... │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:482 │ │ │ │ │ +_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_:_:_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_:_:_l_e_v_e_l_G_r_i_d_V_i_e_w │ │ │ │ │ +LevelGridView levelGridView(int level) const │ │ │ │ │ +View for a grid level for All_Partition. │ │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:584 │ │ │ │ │ +_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:518 │ │ │ │ │ +_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_:_:_H_i_e_r_a_r_c_h_i_c_S_e_a_r_c_h │ │ │ │ │ +Search an IndexSet for an Entity containing a given point. │ │ │ │ │ +DDeeffiinniittiioonn hierarchicsearch.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_S_e_a_r_c_h_:_:_f_i_n_d_E_n_t_i_t_y │ │ │ │ │ +Entity findEntity(const FieldVector< ct, dimw > &global) const │ │ │ │ │ +Search the IndexSet of this HierarchicSearch for an Entity containing point │ │ │ │ │ +global. │ │ │ │ │ +DDeeffiinniittiioonn hierarchicsearch.hh:127 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_S_e_a_r_c_h_:_:_f_i_n_d_E_n_t_i_t_y │ │ │ │ │ +Entity findEntity(const FieldVector< ct, dimw > &global) const │ │ │ │ │ +Search the IndexSet of this HierarchicSearch for an Entity containing point │ │ │ │ │ +global. │ │ │ │ │ +DDeeffiinniittiioonn hierarchicsearch.hh:138 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_S_e_a_r_c_h_:_:_H_i_e_r_a_r_c_h_i_c_S_e_a_r_c_h │ │ │ │ │ +HierarchicSearch(const Grid &g, const IS &is) │ │ │ │ │ +Construct a HierarchicSearch object from a Grid and an IndexSet. │ │ │ │ │ +DDeeffiinniittiioonn hierarchicsearch.hh:118 │ │ │ │ │ +_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/a01016.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: hostgridaccess.hh File Reference │ │ │ │ +dune-grid: persistentcontainerinterface.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,33 +72,24 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
hostgridaccess.hh File Reference
│ │ │ │ +
persistentcontainerinterface.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <string>
│ │ │ │ -#include <dune/grid/geometrygrid/intersection.hh>
│ │ │ │ -
│ │ │ │ + │ │ │ │

Go to the source code of this file.

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

│ │ │ │ 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...
class  Dune::PersistentContainerInterface< G, T >
 Persistent storage of data on all entities of a grid. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,31 +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 │ │ │ │ │ -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> │ │ │ │ │ +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 │ │ │ │ │ -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_._._. │ │ │ │ │ +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: hostgridaccess.hh Source File │ │ │ │ +dune-grid: persistentcontainerinterface.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,219 +74,124 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
hostgridaccess.hh
│ │ │ │ +
persistentcontainerinterface.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │ +
5#ifndef DUNE_PERSISTENTCONTAINERINTERFACE_HH
│ │ │ │ +
6#define DUNE_PERSISTENTCONTAINERINTERFACE_HH
│ │ │ │
7
│ │ │ │ -
8#include <string>
│ │ │ │ -
9
│ │ │ │ - │ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ -
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 {
│ │ │ │ - │ │ │ │ +
53 template< class G, class T >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
55 {
│ │ │ │ + │ │ │ │ +
57
│ │ │ │ +
58 struct ImplementationDefined;
│ │ │ │ +
59
│ │ │ │ +
60 public:
│ │ │ │ +
61 typedef G Grid;
│ │ │ │
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 };
│ │ │ │ -
│ │ │ │ +
63 typedef T Value;
│ │ │ │ +
64
│ │ │ │ +
65 typedef ImplementationDefined Size;
│ │ │ │ +
66 typedef ImplementationDefined ConstIterator;
│ │ │ │ +
67 typedef ImplementationDefined Iterator;
│ │ │ │ +
68
│ │ │ │ +
69 // construction
│ │ │ │ +
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
│ │ │ │ - │ │ │ │ - │ │ │ │ -
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
│ │ │ │ +
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
│ │ │ │ -
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:533
│ │ │ │ -
traits structure containing types for a codimension
Definition geometrygrid/grid.hh:606
│ │ │ │ -
Definition geometrygrid/intersection.hh:22
│ │ │ │ -
Provides a meta grid that is identical to its host.
Definition identitygrid.hh:93
│ │ │ │ -
HostGridType & getHostGrid() const
Returns the hostgrid this IdentityGrid lives in.
Definition identitygrid.hh:415
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ +
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())
constructor
│ │ │ │ +
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,303 +1,165 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _u_t_i_l_i_t_y │ │ │ │ │ -hostgridaccess.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 © 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 │ │ │ │ │ +5#ifndef DUNE_PERSISTENTCONTAINERINTERFACE_HH │ │ │ │ │ +6#define DUNE_PERSISTENTCONTAINERINTERFACE_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> │ │ │ │ │ +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 │ │ │ │ │ -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 │ │ │ │ │ -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; │ │ │ │ │ +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 struct ImplementationDefined; │ │ │ │ │ +59 │ │ │ │ │ +60 public: │ │ │ │ │ +_6_1 typedef G _G_r_i_d; │ │ │ │ │ 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 }; │ │ │ │ │ +_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 │ │ │ │ │ +69 // construction │ │ │ │ │ +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_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 │ │ │ │ │ +_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_:_:_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:533 │ │ │ │ │ -_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:606 │ │ │ │ │ -_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:93 │ │ │ │ │ -_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:415 │ │ │ │ │ -_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 │ │ │ │ │ +_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()) │ │ │ │ │ +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_:_:_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 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a01019.html │ │ │ │ @@ -88,15 +88,15 @@ │ │ │ │ #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/io/file/gmshreader.hh>
│ │ │ │ #include <dune/grid/utility/gridinfo.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
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a01019_source.html │ │ │ │ @@ -100,15 +100,15 @@ │ │ │ │
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
│ │ │ │
50#ifdef HEADERCHECK
│ │ │ │
51// define so headercheck will run
│ │ │ │
52const std::string programName = "headercheck";
│ │ │ │
53#endif // HEADERCHECK
│ │ │ │
54
│ │ │ │ @@ -278,15 +278,15 @@ │ │ │ │
218 }
│ │ │ │
219}
│ │ │ │
220#endif // !HEADERCHECK
│ │ │ │
221#endif // !DOXYGEN
│ │ │ │
222
│ │ │ │
223#endif // DUNE_GRID_UTILITY_GRIDINFO_GMSH_MAIN_HH
│ │ │ │
int main(int argc, char **argv)
Definition recipe-integration.cc:65
│ │ │ │ - │ │ │ │ + │ │ │ │
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:840
│ │ │ │
structure to hold information about a certain GridView.
Definition utility/gridinfo.hh:100
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

│ │ │ │ Namespaces

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

│ │ │ │ Classes

class  Dune::PersistentContainerWrapper< G, T >
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 >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,20 +2,27 @@ │ │ │ │ │ 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> │ │ │ │ │ +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_. │ │ │ │ │ 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_ _> │ │ │ │ │ +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/a01022_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: persistentcontainerwrapper.hh Source File │ │ │ │ +dune-grid: entitycommhelper.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,150 +74,169 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
persistentcontainerwrapper.hh
│ │ │ │ +
entitycommhelper.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_ENTITYCOMMHELPER_HH
│ │ │ │ +
6#define DUNE_ENTITYCOMMHELPER_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ - │ │ │ │ -
10
│ │ │ │ -
11namespace Dune
│ │ │ │ -
12{
│ │ │ │ -
13
│ │ │ │ -
14 // PersistentContainerWrapper
│ │ │ │ -
15 // --------------------------
│ │ │ │ + │ │ │ │ +
9
│ │ │ │ +
10namespace Dune
│ │ │ │ +
11{
│ │ │ │ +
12
│ │ │ │ +
13 template< InterfaceType iftype >
│ │ │ │ + │ │ │ │ +
15
│ │ │ │
16
│ │ │ │ -
17 template< class G, class T >
│ │ │ │ +
17 template<>
│ │ │ │
│ │ │ │ - │ │ │ │ + │ │ │ │
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 }
│ │ │ │ +
│ │ │ │ +
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 };
│ │ │ │
│ │ │ │ -
51
│ │ │ │ -
52 template< class Entity >
│ │ │ │ +
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 const Value &operator() ( const Entity &entity, int subEntity ) const
│ │ │ │ -
54 {
│ │ │ │ -
55 return hostContainer_( HostGridAccess::hostEntity( entity ), subEntity );
│ │ │ │ -
56 }
│ │ │ │ +
53 static bool send ( const PartitionType p )
│ │ │ │ +
54 {
│ │ │ │ +
55 //return (p == InteriorEntity) || (p == BorderEntity) || (p == OverlapEntity);
│ │ │ │ +
56 return (p != FrontEntity) && (p != GhostEntity);
│ │ │ │ +
57 }
│ │ │ │
│ │ │ │ -
57
│ │ │ │ -
58 template< class Entity >
│ │ │ │ +
58
│ │ │ │
│ │ │ │ -
59 Value &operator() ( const Entity &entity, int subEntity )
│ │ │ │ +
59 static bool receive ( const PartitionType p )
│ │ │ │
60 {
│ │ │ │ -
61 return hostContainer_( HostGridAccess::hostEntity( entity ), subEntity );
│ │ │ │ -
62 }
│ │ │ │ +
61 //return (p == InteriorEntity) || (p == BorderEntity) || (p == OverlapEntity) || (p == FrontEntity);
│ │ │ │ +
62 return (p != GhostEntity);
│ │ │ │ +
63 }
│ │ │ │ +
│ │ │ │ +
64 };
│ │ │ │
│ │ │ │ -
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
│ │ │ │ -
71 void swap ( This &other ) { hostContainer_.swap( other.hostContainer_ ); }
│ │ │ │ -
72
│ │ │ │ -
73 ConstIterator begin () const { return hostContainer_.begin(); }
│ │ │ │ - │ │ │ │ +
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 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
│ │ │ │ -
85} // namespace Dune
│ │ │ │ -
86
│ │ │ │ -
87#endif // #ifndef DUNE_PERSISTENTCONTAINERWRAPPER_HH
│ │ │ │ - │ │ │ │ +
│ │ │ │ +
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
│ │ │ │
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
│ │ │ │ - │ │ │ │ +
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,198 +1,190 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _u_t_i_l_i_t_y │ │ │ │ │ -persistentcontainerwrapper.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 © 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_ENTITYCOMMHELPER_HH │ │ │ │ │ +6#define DUNE_ENTITYCOMMHELPER_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 // -------------------------- │ │ │ │ │ +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< 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 │ │ │ │ │ +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 { │ │ │ │ │ -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; │ │ │ │ │ +_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 │ │ │ │ │ -_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 │ │ │ │ │ +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 _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 ) │ │ │ │ │ +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 _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(); } │ │ │ │ │ +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 │ │ │ │ │ -_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_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(); } │ │ │ │ │ +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 _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 │ │ │ │ │ -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 │ │ │ │ │ +_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 │ │ │ │ │ _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_[_] │ │ │ │ │ -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 │ │ │ │ │ +_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/a01025.html │ │ │ │ @@ -98,30 +98,30 @@ │ │ │ │ #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/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/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/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/backuprestore.hh>
│ │ │ │ │ │ │ │

Go to the source code of this file.

│ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a01025_source.html │ │ │ │ @@ -105,15 +105,15 @@ │ │ │ │
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>;
│ │ │ │ @@ -2055,34 +2055,34 @@ │ │ │ │
2061 };
│ │ │ │
2062
│ │ │ │
2063 }
│ │ │ │
2064
│ │ │ │
2065} // end namespace
│ │ │ │
2066
│ │ │ │
2067// Include the specialization of the StructuredGridFactory class for YaspGrid
│ │ │ │ - │ │ │ │ + │ │ │ │
2069// Include the specialization of the BackupRestoreFacility class for YaspGrid
│ │ │ │ │ │ │ │
2071
│ │ │ │
2072#endif
│ │ │ │ -
The YaspGeometry class and its specializations.
│ │ │ │ -
The YaspIntersection class.
│ │ │ │ - │ │ │ │ -
Specialization of the PersistentContainer for YaspGrid.
│ │ │ │ -
The YaspEntitySeed class.
│ │ │ │ -
This provides container classes for the coordinates to be used in YaspGrid Upon implementation of the...
│ │ │ │ - │ │ │ │ -
This provides a YGrid, the elemental component of the yaspgrid implementation.
│ │ │ │ -
The YaspIntersectionIterator class.
│ │ │ │ -
The YaspLevelIterator class.
│ │ │ │ -
level-wise, non-persistent, consecutive indices for YaspGrid
│ │ │ │ -
the YaspEntity class and its specializations
│ │ │ │ -
Specialization of the StructuredGridFactory class for YaspGrid.
│ │ │ │ -
This file provides the infrastructure for toroidal communication in YaspGrid.
│ │ │ │ -
Describes the parallel communication interface class for MessageBuffers and DataHandles.
│ │ │ │ +
The YaspIntersectionIterator class.
│ │ │ │ +
Specialization of the StructuredGridFactory class for YaspGrid.
│ │ │ │ +
the YaspEntity class and its specializations
│ │ │ │ +
The YaspGeometry class and its specializations.
│ │ │ │ + │ │ │ │ + │ │ │ │ +
The YaspIntersection class.
│ │ │ │ +
The YaspLevelIterator class.
│ │ │ │ +
This provides a YGrid, the elemental component of the yaspgrid implementation.
│ │ │ │ +
This provides container classes for the coordinates to be used in YaspGrid Upon implementation of the...
│ │ │ │ +
Specialization of the PersistentContainer for YaspGrid.
│ │ │ │ +
This file provides the infrastructure for toroidal communication in YaspGrid.
│ │ │ │ +
level-wise, non-persistent, consecutive indices for YaspGrid
│ │ │ │ +
The YaspEntitySeed class.
│ │ │ │ +
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 {} │ │ │ │ │ @@ -2085,41 +2085,41 @@ │ │ │ │ │ YaspGrid │ │ │ │ │ 2068#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> │ │ │ │ │ 2069// Include the specialization of the BackupRestoreFacility class for │ │ │ │ │ YaspGrid │ │ │ │ │ 2070#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> │ │ │ │ │ 2071 │ │ │ │ │ 2072#endif │ │ │ │ │ +_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. │ │ │ │ │ +_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_._h_h │ │ │ │ │ +the YaspEntity class and its specializations │ │ │ │ │ _y_a_s_p_g_r_i_d_g_e_o_m_e_t_r_y_._h_h │ │ │ │ │ The YaspGeometry class and its specializations. │ │ │ │ │ +_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_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_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_s_e_e_d_._h_h │ │ │ │ │ -The YaspEntitySeed class. │ │ │ │ │ +_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. │ │ │ │ │ +_y_g_r_i_d_._h_h │ │ │ │ │ +This provides a YGrid, the elemental component of the yaspgrid implementation. │ │ │ │ │ _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... │ │ │ │ │ -_y_a_s_p_g_r_i_d_i_d_s_e_t_._h_h │ │ │ │ │ -_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_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_l_e_v_e_l_i_t_e_r_a_t_o_r_._h_h │ │ │ │ │ -The YaspLevelIterator class. │ │ │ │ │ -_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_e_n_t_i_t_y_._h_h │ │ │ │ │ -the YaspEntity class and its specializations │ │ │ │ │ -_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_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. │ │ │ │ │ _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_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_e_n_t_i_t_y_s_e_e_d_._h_h │ │ │ │ │ +The YaspEntitySeed class. │ │ │ │ │ _d_a_t_a_h_a_n_d_l_e_i_f_._h_h │ │ │ │ │ Describes the parallel communication interface class for MessageBuffers and │ │ │ │ │ DataHandles. │ │ │ │ │ _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 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a01034.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/a01058.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/a01068.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/a01081.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/a01900.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/a01904.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
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -277,15 +277,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 │ │ │ │   │ │ │ │ @@ -1436,15 +1436,15 @@ │ │ │ │
│ │ │ │ template<int dim, int dimworld = Alberta::dimWorld>
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
ALBERTA MESH * Dune::AlbertaGrid< dim, dimworld >::getMesh ALBERTA MESH * Dune::AlbertaGrid< dim, dimworld >::getMesh () const
│ │ │ │
│ │ │ │ @@ -3103,16 +3103,16 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following files: │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a01916.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/a01956.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/a01960.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/a01964.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/a01984.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/a01988.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/a01992.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/a02004.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/a02008.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/a02012.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/a02016.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/a02020.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/a02024.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/a02028.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/a02032.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/a02040.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/a02044.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/a02048.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/a02052.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/a02056.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/a02060.html │ │ │ │ @@ -1491,15 +1491,15 @@ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02068.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/a02076.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/a02096.html │ │ │ │ @@ -273,15 +273,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02100.html │ │ │ │ @@ -273,15 +273,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02108.html │ │ │ │ @@ -1036,15 +1036,15 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02120.html │ │ │ │ @@ -427,15 +427,15 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02128.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/a02132.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/a02136.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/a02140.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/a02160.html │ │ │ │ @@ -886,15 +886,15 @@ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02172.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/a02176.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/a02256.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/a02264.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/a02268.html │ │ │ │ @@ -450,15 +450,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02272.html │ │ │ │ @@ -1018,15 +1018,15 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02284.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/a02288.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/a02296.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/a02300.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/a02304.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/a02308.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/a02312.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/a02316.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/a02320.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/a02328.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/a02332.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/a02336.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/a02340.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/a02344.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/a02348.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/a02352.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/a02356.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/a02360.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/a02364.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/a02368.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/a02372.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/a02376.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/a02380.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/a02384.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/a02388.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/a02392.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/a02396.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/a02400.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/a02404.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/a02408.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/a02412.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/a02416.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/a02420.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/a02424.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/a02428.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/a02432.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/a02440.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/a02444.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/a02448.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/a02452.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/a02456.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/a02460.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/a02464.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/a02468.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/a02472.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/a02476.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/a02480.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/a02512.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/a02516.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/a02520.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/a02524.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/a02528.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/a02532.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/a02536.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/a02540.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/a02544.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/a02548.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/a02552.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/a02564.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/a02568.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/a02580.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/a02584.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/a02588.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/a02592.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/a02604.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/a02608.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/a02612.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/a02616.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/a02620.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/a02624.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/a02712.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/a02716.html │ │ │ │ @@ -81,15 +81,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 interpret 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
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -433,15 +433,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02720.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...
 
│ │ │ │ @@ -810,15 +810,15 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02724.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...
 
│ │ │ │ @@ -800,15 +800,15 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02728.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
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -243,15 +243,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02732.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/a02736.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/a02740.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/a02744.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
 
│ │ │ │ │ │ │ │

│ │ │ │ @@ -243,15 +243,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02748.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/a02752.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/a02756.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/a02760.html │ │ │ │ @@ -945,15 +945,15 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02792.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/a02876.html │ │ │ │ @@ -287,15 +287,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/a02912.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
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -426,15 +426,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/a02916.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
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -929,15 +929,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/a02976.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
Dune::PartitionSet< partitions > Struct Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

A set of PartitionType values. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/common/partitionset.hh>

│ │ │ │ +

#include <dune/grid/common/partitionset.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -395,15 +395,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

creates a PartitionSet for the given PartitionIteratorType

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a02980.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
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -664,15 +664,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/a02984.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/a03024.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Static Public Attributes | │ │ │ │ Protected Member Functions | │ │ │ │ List of all members │ │ │ │
Dune::CachedCoordFunction< HostGrid, CoordFunction > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ -

#include <dune/grid/geometrygrid/cachedcoordfunction.hh>

│ │ │ │ +

#include <dune/grid/geometrygrid/cachedcoordfunction.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::CachedCoordFunction< HostGrid, CoordFunction >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -469,15 +469,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

dimension of the range vector

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

#include <dune/grid/geometrygrid/cachedcoordfunction.hh>

│ │ │ │ +

#include <dune/grid/geometrygrid/cachedcoordfunction.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::GeoGrid::CoordCache< HostGrid, Coordinate >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -319,15 +319,15 @@ │ │ │ │ │ │ │ │

│ │ │ │ Public Member Functions

template<unsigned int p>
struct PartitionSet< partitions|p > constexpr operator+ (const PartitionSet< p > &) const
 Returns a new PartitionSet that also contains the partitions in set.
 
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03084.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/a03088.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/a03092.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/a03096.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/a03128.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/a03140.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/a03144.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/a03148.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/a03152.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/a03156.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/a03164.html │ │ │ │ @@ -1547,15 +1547,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/a03176.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/a03292.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/a03296.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/a03300.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/a03312.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/a03316.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/a03320.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/a03324.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/a03328.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/a03332.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/a03336.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/a03340.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/a03344.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/a03348.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/a03360.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/a03388.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/a03392.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/a03396.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/a03400.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/a03404.html │ │ │ │ @@ -342,15 +342,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03408.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/a03412.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/a03420.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
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -771,15 +771,15 @@ │ │ │ │

│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03424.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
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -754,15 +754,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03428.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/a03432.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/a03436.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/a03440.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/a03444.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/a03448.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/a03452.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/a03456.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/a03460.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/a03464.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/a03468.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/a03472.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/a03476.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/a03480.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
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -839,15 +839,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03484.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/a03488.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/a03492.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/a03496.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/a03500.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/a03504.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/a03508.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/a03512.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/a03516.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/a03520.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/a03524.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/a03528.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/a03532.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/a03536.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/a03540.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/a03544.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/a03548.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/a03552.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/a03556.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/a03560.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/a03564.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/a03568.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/a03572.html │ │ │ │ @@ -848,15 +848,15 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03588.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/a03592.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/a03596.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/a03600.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/a03604.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/a03608.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/a03612.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/a03616.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/a03620.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/a03624.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/a03628.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/a03636.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/a03640.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/a03644.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/a03648.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/a03660.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
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -1002,16 +1002,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/a03664.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/a03668.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/a03672.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/a03676.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
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -904,15 +904,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03680.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/a03684.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/a03688.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/a03692.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/a03696.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/a03700.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/a03704.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/a03708.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/a03712.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
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -622,15 +622,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03716.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/a03724.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/a03728.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/a03732.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/a03748.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>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -939,15 +939,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/a03752.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>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -855,15 +855,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/a03764.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
 Dynamic Gmsh reader interface.
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -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 intersection 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/a03768.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::GnuplotWriter< GridView > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Writer for 1D grids in gnuplot format. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/gnuplot.hh>

│ │ │ │ +

#include <dune/grid/io/file/gnuplot.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::GnuplotWriter< GridView >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -280,16 +280,16 @@ │ │ │ │

│ │ │ │ Public Member Functions

 GmshWriter (const GridView &gridView, int numDigits=6)
 Constructor expecting GridView of Grid to be written.
 
void setPrecision (int numDigits)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03772.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::LeafGnuplotWriter< G > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

GnuplotWriter on the leaf grid. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/gnuplot.hh>

│ │ │ │ +

#include <dune/grid/io/file/gnuplot.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::LeafGnuplotWriter< G >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -268,15 +268,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03776.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::LevelGnuplotWriter< G > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

GnuplotWriter on a given level grid. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/gnuplot.hh>

│ │ │ │ +

#include <dune/grid/io/file/gnuplot.hh>

│ │ │ │
│ │ │ │ Inheritance diagram for Dune::LevelGnuplotWriter< G >:
│ │ │ │
│ │ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -278,15 +278,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03788.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::StarCDReader< GridType > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

File reader for the Star-CD format. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/io/file/starcdreader.hh>

│ │ │ │ +

#include <dune/grid/io/file/starcdreader.hh>

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

│ │ │ │ Static Public Member Functions

static std::unique_ptr< GridType > read (const std::string &fileName, bool verbose=true)
 Read grid from a Star-CD file.
 
│ │ │ │ @@ -153,15 +153,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
Returns
The return type is a special pointer type that casts into std::unique_ptr<GridType>, and std::shared_ptr<GridType>. It is scheduled to be replaced by std::unique_ptr<GridType> eventually.
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a03792.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 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/a03796.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/a03800.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/a03804.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/a03808.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/a03812.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/a03816.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/a03820.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/a03824.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/a03828.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/a03832.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/a03836.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/a03840.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/a03844.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/a03848.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/a03852.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/a03856.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/a03860.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/a03864.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/a03868.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/a03872.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/a03876.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/a03880.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/a03884.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/a03888.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/a03892.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/a03896.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/a03900.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/a03904.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/a03908.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/a03912.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/a03916.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/a03920.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/a03924.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/a03928.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/a03932.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/a03936.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/a03940.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/a03944.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/a03952.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/a03956.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/a03960.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/a03964.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::VTKSequenceWriter< GridView > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Writer for the output 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/a03968.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/a03988.html │ │ │ │ @@ -85,15 +85,15 @@ │ │ │ │
Dune::VTKWriter< GridView > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Writer for the output 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/a03992.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/a03996.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/a04000.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/a04004.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/a04008.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/a04012.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/a04016.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/a04020.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/a04024.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/a04104.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/a04108.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/a04112.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/a04116.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/a04120.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/a04124.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/a04164.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
Dune::HierarchicSearch< Grid, IS > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

Search an IndexSet for an Entity containing a given point. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/utility/hierarchicsearch.hh>

│ │ │ │ +

#include <dune/grid/utility/hierarchicsearch.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -215,15 +215,15 @@ │ │ │ │ │ │ │ │ │ │ │ │

type of LevelIterator

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04168.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>

│ │ │ │

│ │ │ │ Public Member Functions

 HierarchicSearch (const Grid &g, const IS &is)
 Construct a HierarchicSearch object from a Grid and an IndexSet.
 
Entity findEntity (const FieldVector< ct, dimw > &global) const
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ 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/a04172.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/a04176.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/a04180.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/a04196.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/a04200.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/a04204.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/a04208.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/a04212.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/a04216.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/a04220.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/a04224.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/a04228.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/a04232.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/a04240.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/a04244.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/a04248.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/a04252.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/a04256.html │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
Dune::YaspIntersectionIterator< GridImp > Class Template Reference
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │

YaspIntersectionIterator enables iteration over intersections with neighboring codim 0 entities. │ │ │ │ More...

│ │ │ │ │ │ │ │ -

#include <dune/grid/yaspgrid/yaspgridintersectioniterator.hh>

│ │ │ │ +

#include <dune/grid/yaspgrid/yaspgridintersectioniterator.hh>

│ │ │ │

│ │ │ │ Public Types

typedef GridImp::template Codim< codim >::Entity Entity
 
typedef GridImp::YGridLevelIterator YGLI
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -367,15 +367,15 @@ │ │ │ │ │ │ │ │

assignment

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
The documentation for this class was generated from the following files: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04260.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 Dune::YaspIntersection< GridImp > IntersectionImp
 
typedef Dune::Intersection< GridImp, IntersectionImpIntersection
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -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/a04264.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/a04268.html │ │ │ │ @@ -82,15 +82,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
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -791,15 +791,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/a04272.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/a04276.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/a04340.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/a04344.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/a04348.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/a04352.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
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -210,15 +210,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

Implemented in Dune::Yasp::DefaultPartitioning< d >, Dune::Yasp::PowerDPartitioning< d >, and Dune::Yasp::FixedSizePartitioning< d >.

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04356.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/a04360.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/a04364.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/a04368.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/a04372.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 > &, const FieldVector< ctype, dimworld > &, const std::array< unsigned int, dim > &)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -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/a04376.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/a04388.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 > &, const FieldVector< ctype, dimworld > &, const std::array< unsigned int, dim > &)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -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/a04392.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/a04396.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/a04400.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/a04404.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/a04408.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/a04416.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/a04420.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/a04424.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/a04428.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/a04432.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/a04436.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/a04440.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 handles the index offset

│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a04444.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/a07097.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/a07097_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/a07109.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/a07109_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/a07112.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/a07112_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 refinement patches and the corners for geometryInFather
│ │ │ │ - │ │ │ │ -
provides a wrapper for ALBERTA's el_info structure
│ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ +
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 │ │ │ │ │ -_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_b_e_r_t_a_h_e_a_d_e_r_._h_h │ │ │ │ │ _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 │ │ │ │ │ -_a_l_b_e_r_t_a_h_e_a_d_e_r_._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 │ │ │ │ │ _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/a07118.html │ │ │ │ @@ -73,15 +73,15 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
datahandle.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include <cstddef>
│ │ │ │ -#include <dune/grid/common/datahandleif.hh>
│ │ │ │ +#include <dune/grid/common/datahandleif.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07118_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_CONCEPTS_ARCHETYPES_COMMDATAHANDLE_HH
│ │ │ │
6#define DUNE_GRID_CONCEPTS_ARCHETYPES_COMMDATAHANDLE_HH
│ │ │ │
7
│ │ │ │
8#include <cstddef>
│ │ │ │
9
│ │ │ │ - │ │ │ │ + │ │ │ │
11
│ │ │ │
12#ifndef DOXYGEN
│ │ │ │
13namespace Dune::Concept::Archetypes {
│ │ │ │
14
│ │ │ │
15template <class Data>
│ │ │ │
16struct CommDataHandle : public Dune::CommDataHandleIF<CommDataHandle<Data>, Data>
│ │ │ │
17{
│ │ │ │ @@ -113,15 +113,15 @@ │ │ │ │
30 void scatter (Buffer& buffer, const Entity& entity, std::size_t size);
│ │ │ │
31};
│ │ │ │
32
│ │ │ │
33} // end namespace Dune::Concept::Archetypes
│ │ │ │
34#endif // DOXYGEN
│ │ │ │
35
│ │ │ │
36#endif // DUNE_GRID_CONCEPTS_ARCHETYPES_COMMDATAHANDLE_HH
│ │ │ │ -
Describes the parallel communication interface class for MessageBuffers and DataHandles.
│ │ │ │ +
Describes the parallel communication interface class for MessageBuffers and DataHandles.
│ │ │ │
CommDataHandleIF describes the features of a data handle for communication in parallel runs using the...
Definition datahandleif.hh:78
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07121.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/a07121_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/a07127.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │ │ │ │ │
│ │ │ │
#include <dune-grid-config.hh>
│ │ │ │ #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/a07130.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/a07130_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/a07133.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/a07133_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_i_d_e_n_t_i_t_y_g_r_i_d_._h_h │ │ │ │ │ -_d_g_f_u_g_._h_h │ │ │ │ │ _d_g_f_o_n_e_d_._h_h │ │ │ │ │ +_d_g_f_i_d_e_n_t_i_t_y_g_r_i_d_._h_h │ │ │ │ │ _d_g_f_g_e_o_g_r_i_d_._h_h │ │ │ │ │ +_d_g_f_u_g_._h_h │ │ │ │ │ _d_g_f_y_a_s_p_._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/a07136.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/a07136_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,38 +74,38 @@ │ │ │ │ │ 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. │ │ │ │ │ -_d_g_f_e_x_c_e_p_t_i_o_n_._h_h │ │ │ │ │ -_b_o_u_n_d_a_r_y_s_e_g_._h_h │ │ │ │ │ +_g_r_i_d_e_n_u_m_s_._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 │ │ │ │ │ +_b_a_s_i_c_._h_h │ │ │ │ │ _p_o_l_y_h_e_d_r_o_n_._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_d_o_m_._h_h │ │ │ │ │ -_p_e_r_i_o_d_i_c_f_a_c_e_t_r_a_n_s_._h_h │ │ │ │ │ +_p_o_l_y_g_o_n_._h_h │ │ │ │ │ +_c_u_b_e_._h_h │ │ │ │ │ +_i_n_t_e_r_v_a_l_._h_h │ │ │ │ │ +_d_i_m_._h_h │ │ │ │ │ +_b_o_u_n_d_a_r_y_s_e_g_._h_h │ │ │ │ │ _v_e_r_t_e_x_._h_h │ │ │ │ │ _s_i_m_p_l_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_d_o_m_._h_h │ │ │ │ │ _g_r_i_d_p_a_r_a_m_e_t_e_r_._h_h │ │ │ │ │ -_d_i_m_._h_h │ │ │ │ │ _g_e_n_e_r_a_l_._h_h │ │ │ │ │ -_i_n_t_e_r_v_a_l_._h_h │ │ │ │ │ -_p_o_l_y_g_o_n_._h_h │ │ │ │ │ -_b_a_s_i_c_._h_h │ │ │ │ │ -_c_u_b_e_._h_h │ │ │ │ │ +_p_e_r_i_o_d_i_c_f_a_c_e_t_r_a_n_s_._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 │ │ │ │ │ -_g_r_i_d_p_t_r_._h_h │ │ │ │ │ -_p_a_r_s_e_r_._h_h │ │ │ │ │ _e_n_t_i_t_y_k_e_y_._h_h │ │ │ │ │ +_g_r_i_d_p_t_r_._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_:_:_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 │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07139.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/a07139_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/a07142.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/a07142_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/a07145.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
entity.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include <concepts>
│ │ │ │ #include <utility>
│ │ │ │ #include <dune/common/rangeutilities.hh>
│ │ │ │ #include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/grid/common/gridenums.hh>
│ │ │ │ +#include <dune/grid/common/gridenums.hh>
│ │ │ │ #include <dune/grid/concepts/geometry.hh>
│ │ │ │ #include <dune/grid/concepts/archetypes/entity.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/a07145_source.html │ │ │ │ @@ -89,15 +89,15 @@ │ │ │ │
6#define DUNE_GRID_CONCEPT_ENTITY_HH
│ │ │ │
7
│ │ │ │
8#include <concepts>
│ │ │ │
9#include <utility>
│ │ │ │
10
│ │ │ │
11#include <dune/common/rangeutilities.hh>
│ │ │ │
12#include <dune/geometry/type.hh>
│ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │
16
│ │ │ │
17namespace Dune::Concept {
│ │ │ │
18
│ │ │ │
24template<class S>
│ │ │ │
│ │ │ │ @@ -174,15 +174,15 @@ │ │ │ │
106template<class E>
│ │ │ │
107concept Entity = EntityGeneral<E> && ((E::codimension != 0) || EntityExtended<E>);
│ │ │ │
108
│ │ │ │
109} // end namespace Dune::Concept
│ │ │ │
110
│ │ │ │
111
│ │ │ │
112#endif // DUNE_GRID_CONCEPT_ENTITY_HH
│ │ │ │ - │ │ │ │ + │ │ │ │
Definition concepts/datahandle.hh:14
│ │ │ │
Model of an entity seed.
Definition concepts/entity.hh:25
│ │ │ │
Model of a grid entity for any codimension.
Definition concepts/entity.hh:40
│ │ │ │
Model of a grid entity with extended requirements for codimension 0.
Definition concepts/entity.hh:77
│ │ │ │
Model of a grid entity.
Definition concepts/entity.hh:107
│ │ │ │
Model of a geometry object.
Definition concepts/geometry.hh:29
│ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07148.html │ │ │ │ @@ -73,15 +73,15 @@ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
entity.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/grid/common/gridenums.hh>
│ │ │ │ +#include <dune/grid/common/gridenums.hh>
│ │ │ │ #include <dune/grid/concepts/archetypes/entity.hh>
│ │ │ │ #include <dune/grid/concepts/archetypes/geometry.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

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

│ │ │ │ Namespaces

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07151_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/a07154.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/a07154_source.html │ │ │ │ @@ -84,16 +84,16 @@ │ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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/a07163.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/a07163_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
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07175.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/a07175_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/a07178.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/a07178_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:487
│ │ │ │
GridFamily::ctype ctype
Definition agrid.hh:143
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07181.html │ │ │ │ @@ -83,15 +83,15 @@ │ │ │ │

Provide a generic factory class for unstructured grids. │ │ │ │ More...

│ │ │ │
#include <memory>
│ │ │ │ #include <vector>
│ │ │ │ #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/a07181_source.html │ │ │ │ @@ -92,15 +92,15 @@ │ │ │ │
13#include <vector>
│ │ │ │
14
│ │ │ │
15#include <dune/common/fvector.hh>
│ │ │ │
16#include <dune/common/parallel/mpihelper.hh>
│ │ │ │
17
│ │ │ │
18#include <dune/geometry/type.hh>
│ │ │ │
19
│ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │
22
│ │ │ │
23namespace Dune
│ │ │ │
24{
│ │ │ │
25
│ │ │ │
68 template <class GridType>
│ │ │ │
│ │ │ │ @@ -255,15 +255,15 @@ │ │ │ │
336
│ │ │ │
337 };
│ │ │ │
│ │ │ │
338
│ │ │ │
339}
│ │ │ │
340
│ │ │ │
341#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:70
│ │ │ │
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:153
│ │ │ │
virtual unsigned int insertionIndex(const typename Codim< 0 >::Entity &entity) const
obtain an element's insertion index
Definition common/gridfactory.hh:181
│ │ │ │
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/a07184.html │ │ │ │ @@ -84,17 +84,17 @@ │ │ │ │ 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/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/a07184_source.html │ │ │ │ @@ -92,17 +92,17 @@ │ │ │ │
14
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
20
│ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │
24
│ │ │ │
25#if HAVE_ALBERTA
│ │ │ │
26
│ │ │ │
27namespace Dune
│ │ │ │
28{
│ │ │ │
29
│ │ │ │
30 // External Forward Declarations
│ │ │ │ @@ -236,16 +236,16 @@ │ │ │ │ │ │ │ │
151
│ │ │ │
152}
│ │ │ │
153
│ │ │ │
154#endif // #if HAVE_ALBERTA
│ │ │ │
155
│ │ │ │
156#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
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07187.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/a07187_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 {
│ │ │ │ @@ -206,17 +206,17 @@ │ │ │ │ │ │ │ │
117
│ │ │ │
118 } // namespace GeoGrid
│ │ │ │
119
│ │ │ │
120} // namespace Dune
│ │ │ │
121
│ │ │ │
122#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 common/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
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07193.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/a07193_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
│ │ │ │ @@ -378,16 +378,16 @@ │ │ │ │ │ │ │ │
352 };
│ │ │ │ │ │ │ │
353
│ │ │ │
354} // namespace Dune
│ │ │ │
355
│ │ │ │
356#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:177
│ │ │ │
Traits::Grid Grid
type of the grid
Definition common/gridview.hh:83
│ │ │ │
ThisType & operator=(const ThisType &other)
assignment operator
Definition common/gridview.hh:158
│ │ │ │
Codim< cd >::Iterator begin() const
obtain begin iterator for this view
Definition common/gridview.hh:230
│ │ │ │
const Grid & grid() const
obtain a const reference to the underlying hierarchic grid
Definition common/gridview.hh:166
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07196.html │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
gridview.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include <concepts>
│ │ │ │ #include <cstddef>
│ │ │ │ #include <utility>
│ │ │ │ #include <dune/grid/common/capabilities.hh>
│ │ │ │ -#include <dune/grid/common/gridenums.hh>
│ │ │ │ +#include <dune/grid/common/gridenums.hh>
│ │ │ │ #include <dune/grid/concepts/entityiterator.hh>
│ │ │ │ #include <dune/grid/concepts/geometry.hh>
│ │ │ │ #include <dune/grid/concepts/indexidset.hh>
│ │ │ │ #include <dune/grid/concepts/intersection.hh>
│ │ │ │ #include <dune/grid/concepts/intersectioniterator.hh>
│ │ │ │ #include <dune/grid/concepts/archetypes/datahandle.hh>
│ │ │ │
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07196_source.html │ │ │ │ @@ -89,15 +89,15 @@ │ │ │ │
6#define DUNE_GRID_CONCEPTS_GRIDVIEW_HH
│ │ │ │
7
│ │ │ │
8#include <concepts>
│ │ │ │
9#include <cstddef>
│ │ │ │
10#include <utility>
│ │ │ │
11
│ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
20
│ │ │ │ @@ -187,15 +187,15 @@ │ │ │ │
108 Impl::gridViewAllCodims<GV>(range(from, to).to_integer_sequence());
│ │ │ │
109};
│ │ │ │
│ │ │ │
110
│ │ │ │
111} // end namespace Dune::Concept
│ │ │ │
112
│ │ │ │
113#endif // DUNE_GRID_CONCEPTS_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
│ │ │ │
Definition concepts/datahandle.hh:14
│ │ │ │
specialize with 'true' for all codims that a grid provides an iterator for (default=hasEntity<codim>:...
Definition common/capabilities.hh:74
│ │ │ │
Model of a grid view.
Definition concepts/gridview.hh:81
│ │ │ │
Model of an index set.
Definition concepts/indexidset.hh:44
│ │ │ │
Model of an intersection.
Definition concepts/intersection.hh:23
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07199.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/a07199_source.html │ │ │ │ @@ -93,15 +93,15 @@ │ │ │ │
10
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │
18
│ │ │ │
19namespace Dune
│ │ │ │
20{
│ │ │ │
21
│ │ │ │
22 namespace GeoGrid
│ │ │ │
23 {
│ │ │ │
24
│ │ │ │ @@ -370,15 +370,15 @@ │ │ │ │ │ │ │ │
240
│ │ │ │
241 } // namespace GeoGrid
│ │ │ │
242
│ │ │ │
243} // namespace Dune
│ │ │ │
244
│ │ │ │
245#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 common/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/a07202.html │ │ │ │ @@ -82,19 +82,19 @@ │ │ │ │
│ │ │ │
#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/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/a07202_source.html │ │ │ │ @@ -93,19 +93,19 @@ │ │ │ │
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
│ │ │ │ @@ -705,19 +705,19 @@ │ │ │ │ │ │ │ │
586
│ │ │ │
587} // namespace Dune
│ │ │ │
588
│ │ │ │
589#endif // #if HAVE_ALBERTA
│ │ │ │
590
│ │ │ │
591#endif // #ifndef DUNE_ALBERTAGRIDINDEXSETS_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ -
Provides an index stack that supplies indices for element numbering for a grid (i....
│ │ │ │ - │ │ │ │ -
provides a wrapper for ALBERTA's el_info structure
│ │ │ │ + │ │ │ │ +
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 {} │ │ │ │ │ @@ -594,21 +594,21 @@ │ │ │ │ │ 586 │ │ │ │ │ 587} // namespace Dune │ │ │ │ │ 588 │ │ │ │ │ 589#endif // #if HAVE_ALBERTA │ │ │ │ │ 590 │ │ │ │ │ 591#endif // #ifndef DUNE_ALBERTAGRIDINDEXSETS_HH │ │ │ │ │ _d_o_f_a_d_m_i_n_._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.... │ │ │ │ │ _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 │ │ │ │ │ +_d_o_f_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_:_:_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/a07205.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/gridenums.hh>
│ │ │ │ #include <dune/grid/common/indexidset.hh>
│ │ │ │ -#include <dune/grid/geometrygrid/declaration.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/a07205_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
│ │ │ │ @@ -200,16 +200,16 @@ │ │ │ │ │ │ │ │
104
│ │ │ │
105 } // namespace GeoGrid
│ │ │ │
106
│ │ │ │
107} // namespace Dune
│ │ │ │
108
│ │ │ │
109#endif // #ifndef DUNE_GEOGRID_INDEXSETS_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │
Index Set Interface base class.
Definition common/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 common/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 common/indexidset.hh:113
│ │ │ │
Export the type of the entity used as parameter in the index(...) method.
Definition common/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/a07208.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/a07208_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/a07217.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/a07217_source.html │ │ │ │ @@ -84,16 +84,16 @@ │ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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 │ │ │ │ │ -_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 │ │ │ │ │ +_d_e_c_l_a_r_a_t_i_o_n_._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/a07232.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/a07232_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/a07235.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/a07235_source.html │ │ │ │ @@ -84,17 +84,17 @@ │ │ │ │ Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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/a07238.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/a07238_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/a07241.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/a07241_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 │ │ │ │ │ -_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 │ │ │ │ │ _A_L_B_E_R_T_A │ │ │ │ │ #define ALBERTA │ │ │ │ │ DDeeffiinniittiioonn albertaheader.hh:29 │ │ │ │ │ +_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 │ │ │ │ │ _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/a07244.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/a07244_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/a07259.html │ │ │ │ @@ -86,20 +86,20 @@ │ │ │ │
#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"
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07259_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 {
│ │ │ │ @@ -654,18 +654,18 @@ │ │ │ │
1131#include "entity.hh"
│ │ │ │
1132#include "intersection.hh"
│ │ │ │
1133#include "intersectioniterator.hh"
│ │ │ │
1134#include "entityiterator.hh"
│ │ │ │
1135#include "indexidset.hh"
│ │ │ │
1136
│ │ │ │
1137#endif // #ifndef DUNE_GRID_COMMON_GRID_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ -
Describes the parallel communication interface class for MessageBuffers and DataHandles.
│ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ +
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:805
│ │ │ │
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:788
│ │ │ │
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 {} │ │ │ │ │ @@ -532,20 +532,20 @@ │ │ │ │ │ 1131#include "_e_n_t_i_t_y_._h_h" │ │ │ │ │ 1132#include "_i_n_t_e_r_s_e_c_t_i_o_n_._h_h" │ │ │ │ │ 1133#include "_i_n_t_e_r_s_e_c_t_i_o_n_i_t_e_r_a_t_o_r_._h_h" │ │ │ │ │ 1134#include "_e_n_t_i_t_y_i_t_e_r_a_t_o_r_._h_h" │ │ │ │ │ 1135#include "_i_n_d_e_x_i_d_s_e_t_._h_h" │ │ │ │ │ 1136 │ │ │ │ │ 1137#endif // #ifndef DUNE_GRID_COMMON_GRID_HH │ │ │ │ │ -_g_r_i_d_e_n_u_m_s_._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 │ │ │ │ │ _d_a_t_a_h_a_n_d_l_e_i_f_._h_h │ │ │ │ │ Describes the parallel communication interface class for MessageBuffers and │ │ │ │ │ DataHandles. │ │ │ │ │ -_e_x_c_e_p_t_i_o_n_s_._h_h │ │ │ │ │ +_g_r_i_d_e_n_u_m_s_._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/a07262.html │ │ │ │ @@ -81,15 +81,15 @@ │ │ │ │
│ │ │ │
#include <concepts>
│ │ │ │ #include <cstddef>
│ │ │ │ #include <type_traits>
│ │ │ │ #include <utility>
│ │ │ │ #include <dune/common/indices.hh>
│ │ │ │ #include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/grid/common/gridenums.hh>
│ │ │ │ +#include <dune/grid/common/gridenums.hh>
│ │ │ │ #include <dune/grid/common/capabilities.hh>
│ │ │ │ #include <dune/grid/concepts/entity.hh>
│ │ │ │ #include <dune/grid/concepts/entityiterator.hh>
│ │ │ │ #include <dune/grid/concepts/geometry.hh>
│ │ │ │ #include <dune/grid/concepts/gridview.hh>
│ │ │ │ #include <dune/grid/concepts/indexidset.hh>
│ │ │ │ #include <dune/grid/concepts/intersection.hh>
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07262_source.html │ │ │ │ @@ -91,15 +91,15 @@ │ │ │ │
8#include <concepts>
│ │ │ │
9#include <cstddef>
│ │ │ │
10#include <type_traits>
│ │ │ │
11#include <utility>
│ │ │ │
12
│ │ │ │
13#include <dune/common/indices.hh>
│ │ │ │
14#include <dune/geometry/type.hh>
│ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -205,15 +205,15 @@ │ │ │ │
150 Impl::gridAllCodims<G>(range(from, to).to_integer_sequence());
│ │ │ │
151};
│ │ │ │
│ │ │ │
152
│ │ │ │
153} // end namespace Dune::Concept
│ │ │ │
154
│ │ │ │
155#endif // DUNE_GRID_CONCEPTS_GRID_HH
│ │ │ │ - │ │ │ │ + │ │ │ │
Definition concepts/datahandle.hh:14
│ │ │ │
specialize with 'true' for all codims that a grid can communicate data on (default=false)
Definition common/capabilities.hh:97
│ │ │ │
Requirements for implementations of the Dune::Grid interface.
Definition concepts/grid.hh:98
│ │ │ │
Model of a grid view.
Definition concepts/gridview.hh:81
│ │ │ │
Model of an index set.
Definition concepts/indexidset.hh:44
│ │ │ │
Model of an id set.
Definition concepts/indexidset.hh:83
│ │ │ │
Model of an intersection.
Definition concepts/intersection.hh:23
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07265.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::dgf::ProjectionBlock
 
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a07265_source.html │ │ │ │ @@ -94,15 +94,15 @@ │ │ │ │
11
│ │ │ │ │ │ │ │
13
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │
20
│ │ │ │
21namespace Dune
│ │ │ │
22{
│ │ │ │
23
│ │ │ │
24 // DefaultCoordFunction
│ │ │ │
25 // --------------------
│ │ │ │ @@ -495,15 +495,15 @@ │ │ │ │
674
│ │ │ │
676 };
│ │ │ │ │ │ │ │
677
│ │ │ │
678} // namespace Dune
│ │ │ │
679
│ │ │ │
680#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:848
│ │ │ │
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/a07271.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/a07271_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 common/indexidset.hh:78
│ │ │ │
auto size(GeometryType type) const
Return total number of entities of given geometry type in entity set .
Definition common/indexidset.hh:223
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/dir_000000_000003.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/entityiterator.hh
albertagrid/gridfamily.hhcommon/geometry.hh
albertagrid/gridfamily.hhcommon/intersection.hh
albertagrid/gridfamily.hhcommon/intersectioniterator.hh
albertagrid/gridview.hhcommon/capabilities.hh
albertagrid/gridview.hhcommon/gridview.hh
albertagrid/indexsets.hhcommon/grid.hh
albertagrid/indexsets.hhcommon/indexidset.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.hhcommon/entityiterator.hh
leafiterator.hhcommon/entityiterator.hh
leveliterator.hhcommon/entityiterator.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/entityiterator.hh
albertagrid/gridfamily.hhcommon/geometry.hh
albertagrid/gridfamily.hhcommon/intersection.hh
albertagrid/gridfamily.hhcommon/intersectioniterator.hh
albertagrid/gridview.hhcommon/capabilities.hh
albertagrid/gridview.hhcommon/gridview.hh
albertagrid/indexsets.hhcommon/grid.hh
albertagrid/indexsets.hhcommon/indexidset.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.hhcommon/entityiterator.hh
leafiterator.hhcommon/entityiterator.hh
leveliterator.hhcommon/entityiterator.hh
macrodata.ccexceptions.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/dir_000000_000014.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_000017.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_000003.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -

archetypes → common Relation

File in dune/grid/concepts/archetypesIncludes file in dune/grid/common
concepts/archetypes/datahandle.hhdatahandleif.hh
concepts/archetypes/entity.hhgridenums.hh
│ │ │ │ +

archetypes → common Relation

File in dune/grid/concepts/archetypesIncludes file in dune/grid/common
concepts/archetypes/datahandle.hhdatahandleif.hh
concepts/archetypes/entity.hhgridenums.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/dir_000002_000003.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_000003_000014.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_000004_000003.html │ │ │ │ @@ -69,14 +69,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

concepts → common Relation

File in dune/grid/conceptsIncludes file in dune/grid/common
archetypes / concepts/archetypes/datahandle.hhdatahandleif.hh
archetypes / concepts/archetypes/entity.hhgridenums.hh
concepts/entity.hhgridenums.hh
concepts/grid.hhcommon/capabilities.hh
concepts/grid.hhgridenums.hh
concepts/gridview.hhcommon/capabilities.hh
concepts/gridview.hhgridenums.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/dir_000005_000002.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_000005_000003.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_000005_000017.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_000009_000003.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_000009_000005.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_000009_000011.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_000009_000017.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_000009_000019.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_000010_000003.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.hhcommon/indexidset.hh
geometrygrid/indexsets.hhgridenums.hh
hostcorners.hhcommon/entity.hh
idset.hhcommon/indexidset.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/dir_000010_000017.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_000012_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_000012_000003.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/entityiterator.hh
albertagrid / albertagrid/gridfamily.hhcommon/geometry.hh
albertagrid / albertagrid/gridfamily.hhcommon/intersection.hh
albertagrid / albertagrid/gridfamily.hhcommon/intersectioniterator.hh
albertagrid / albertagrid/gridview.hhcommon/capabilities.hh
albertagrid / albertagrid/gridview.hhcommon/gridview.hh
albertagrid / albertagrid/indexsets.hhcommon/grid.hh
albertagrid / albertagrid/indexsets.hhcommon/indexidset.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
concepts / archetypes / concepts/archetypes/datahandle.hhdatahandleif.hh
concepts / archetypes / concepts/archetypes/entity.hhgridenums.hh
concepts / concepts/entity.hhgridenums.hh
concepts / concepts/grid.hhcommon/capabilities.hh
concepts / concepts/grid.hhgridenums.hh
concepts / concepts/gridview.hhcommon/capabilities.hh
concepts / concepts/gridview.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.hhcommon/indexidset.hh
geometrygrid / geometrygrid/indexsets.hhgridenums.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.hhcommon/entityiterator.hh
geometrygrid / hostcorners.hhcommon/entity.hh
identitygrid.hhcommon/capabilities.hh
identitygrid.hhcommon/grid.hh
geometrygrid / idset.hhcommon/indexidset.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.hhcommon/entityiterator.hh
albertagrid / leveliterator.hhcommon/entityiterator.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.hhcommon/indexidset.hh
yaspgrid.hhdatahandleif.hh
identitygrid / identitygridentity.hhcommon/grid.hh
identitygrid / identitygridgeometry.hhcommon/geometry.hh
identitygrid / identitygridindexsets.hhcommon/indexidset.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/entityiterator.hh
albertagrid / albertagrid/gridfamily.hhcommon/geometry.hh
albertagrid / albertagrid/gridfamily.hhcommon/intersection.hh
albertagrid / albertagrid/gridfamily.hhcommon/intersectioniterator.hh
albertagrid / albertagrid/gridview.hhcommon/capabilities.hh
albertagrid / albertagrid/gridview.hhcommon/gridview.hh
albertagrid / albertagrid/indexsets.hhcommon/grid.hh
albertagrid / albertagrid/indexsets.hhcommon/indexidset.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
concepts / archetypes / concepts/archetypes/datahandle.hhdatahandleif.hh
concepts / archetypes / concepts/archetypes/entity.hhgridenums.hh
concepts / concepts/entity.hhgridenums.hh
concepts / concepts/grid.hhcommon/capabilities.hh
concepts / concepts/grid.hhgridenums.hh
concepts / concepts/gridview.hhcommon/capabilities.hh
concepts / concepts/gridview.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.hhcommon/indexidset.hh
geometrygrid / geometrygrid/indexsets.hhgridenums.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.hhcommon/entityiterator.hh
geometrygrid / hostcorners.hhcommon/entity.hh
identitygrid.hhcommon/capabilities.hh
identitygrid.hhcommon/grid.hh
geometrygrid / idset.hhcommon/indexidset.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.hhcommon/entityiterator.hh
albertagrid / leveliterator.hhcommon/entityiterator.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.hhcommon/indexidset.hh
yaspgrid.hhdatahandleif.hh
identitygrid / identitygridentity.hhcommon/grid.hh
identitygrid / identitygridgeometry.hhcommon/geometry.hh
identitygrid / identitygridindexsets.hhcommon/indexidset.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_000012_000010.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_000012_000013.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_000012_000020.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_000013_000003.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.hhcommon/indexidset.hh
identitygridintersectioniterator.hhcommon/intersection.hh
identitygridleafiterator.hhgridenums.hh
identitygridleveliterator.hhgridenums.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/dir_000014_000003.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_000014_000017.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_000015_000008.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_000016_000003.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_000017_000003.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_000017_000010.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_000017_000014.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_000019_000003.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_000020_000003.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_000020_000017.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,126 +93,126 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ 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.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.
 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 │ │ │ │ @@ -92,53 +92,53 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Files

 backuprestore.hh
 
 cachedcoordfunction.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.
 gnuplot.hh
 Provides gnuplot output for 1D Grids.
 
 printgrid.hh
 printgrid.hh
 
 starcdreader.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,48 +87,48 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -137,29 +137,29 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ 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
 
 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.
 
 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
 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 │ │ │ │ │ │ @@ -32,149 +32,149 @@ │ │ │ │ │ │ a3c04138a5bfe5d72780bb7e82a18e627 │ │ │ │ │ │ (int argc, char **argv) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ recipe-iterate-over-grid.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/doc/recipes/ │ │ │ │ │ │ - a00143.html │ │ │ │ │ │ + a00149.html │ │ │ │ │ │ dune/grid/yaspgrid.hh │ │ │ │ │ │ │ │ │ │ │ │ int │ │ │ │ │ │ main │ │ │ │ │ │ - a00143.html │ │ │ │ │ │ + a00149.html │ │ │ │ │ │ a3c04138a5bfe5d72780bb7e82a18e627 │ │ │ │ │ │ (int argc, char **argv) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ albertagrid.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.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.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00683.html │ │ │ │ │ │ + a00623.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 │ │ │ │ │ │ - dune/grid/albertagrid/undefine-3.0.hh │ │ │ │ │ │ + hierarchiciterator.hh │ │ │ │ │ │ + treeiterator.hh │ │ │ │ │ │ + leveliterator.hh │ │ │ │ │ │ + leafiterator.hh │ │ │ │ │ │ + albertagrid.cc │ │ │ │ │ │ + dune/grid/albertagrid/undefine-3.0.hh │ │ │ │ │ │ Dune::AlbertaGrid │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ #define │ │ │ │ │ │ _ALBERTA_H_ │ │ │ │ │ │ - a00683.html │ │ │ │ │ │ + a00623.html │ │ │ │ │ │ a1067446415cacb23802d0f38ff2017d7 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ albertagrid.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00719.html │ │ │ │ │ │ - geometry.cc │ │ │ │ │ │ - entity.cc │ │ │ │ │ │ - intersection.cc │ │ │ │ │ │ + a00647.html │ │ │ │ │ │ + geometry.cc │ │ │ │ │ │ + entity.cc │ │ │ │ │ │ + intersection.cc │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Alberta │ │ │ │ │ │ │ │ │ │ │ │ #define │ │ │ │ │ │ DUNE_ALBERTAGRID_CC │ │ │ │ │ │ - a00719.html │ │ │ │ │ │ + a00647.html │ │ │ │ │ │ a53133f6d063b9eb2237193ae58eef706 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ albertaheader.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00713.html │ │ │ │ │ │ + a00641.html │ │ │ │ │ │ │ │ │ │ │ │ #define │ │ │ │ │ │ DIM_OF_WORLD │ │ │ │ │ │ - a00713.html │ │ │ │ │ │ + a00641.html │ │ │ │ │ │ a362e6794dc8da37bca88774ed43b8e54 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ #define │ │ │ │ │ │ ALBERTA │ │ │ │ │ │ - a00713.html │ │ │ │ │ │ + a00641.html │ │ │ │ │ │ a4cbe74d935d2e31c4b35398e93623f70 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ #define │ │ │ │ │ │ ALBERTA_DEBUG │ │ │ │ │ │ - a00713.html │ │ │ │ │ │ + a00641.html │ │ │ │ │ │ a8b7e159f2d6cd4970d240f9748cd2d2a │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ #define │ │ │ │ │ │ _MAX_NOT_DEFINED_ │ │ │ │ │ │ - a00713.html │ │ │ │ │ │ + a00641.html │ │ │ │ │ │ a4b7aa45c1743bf41ef31a987fcd0f372 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ #define │ │ │ │ │ │ _MIN_NOT_DEFINED_ │ │ │ │ │ │ - a00713.html │ │ │ │ │ │ + a00641.html │ │ │ │ │ │ a7d0dab8defd85e01c2f14a68a40b4f32 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ #define │ │ │ │ │ │ _ABS_NOT_DEFINED_ │ │ │ │ │ │ - a00713.html │ │ │ │ │ │ + a00641.html │ │ │ │ │ │ a0c6debd1ce74543115f35b5661f4f48b │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ albertareader.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00629.html │ │ │ │ │ │ + a00683.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.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00659.html │ │ │ │ │ │ + a00686.html │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Alberta │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ albertagrid/backuprestore.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ a07091.html │ │ │ │ │ │ @@ -191,15 +191,15 @@ │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ geometrygrid/backuprestore.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/geometrygrid/ │ │ │ │ │ │ a07097.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.10.0/dune/grid/geometrygrid/ │ │ │ │ │ │ a07109.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.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00692.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::Alberta::CoordCache │ │ │ │ │ │ Dune::Alberta::CoordCache::LocalCaching │ │ │ │ │ │ Dune::Alberta::CoordCache::Interpolation │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Alberta │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ albertagrid/datahandle.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ a07112.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 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ concepts/archetypes/datahandle.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/concepts/archetypes/ │ │ │ │ │ │ a07118.html │ │ │ │ │ │ - dune/grid/common/datahandleif.hh │ │ │ │ │ │ + dune/grid/common/datahandleif.hh │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ concepts/datahandle.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/concepts/ │ │ │ │ │ │ a07115.html │ │ │ │ │ │ dune/grid/concepts/archetypes/datahandle.hh │ │ │ │ │ │ dune/grid/concepts/archetypes/entity.hh │ │ │ │ │ │ @@ -329,15 +329,15 @@ │ │ │ │ │ │ Dune::Concept │ │ │ │ │ │ Dune::Concept::CommDataHandle │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ geometrygrid/datahandle.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/geometrygrid/ │ │ │ │ │ │ a07121.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 │ │ │ │ │ │ │ │ │ │ │ │ @@ -356,176 +356,176 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ io/file/dgfparser/dgfparser.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/io/file/dgfparser/ │ │ │ │ │ │ a07127.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.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ a07130.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.10.0/dune/grid/io/file/ │ │ │ │ │ │ a07133.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.10.0/dune/grid/io/file/dgfparser/ │ │ │ │ │ │ a07136.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.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00632.html │ │ │ │ │ │ - dune/grid/albertagrid/misc.hh │ │ │ │ │ │ - dune/grid/albertagrid/elementinfo.hh │ │ │ │ │ │ + a00635.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.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00641.html │ │ │ │ │ │ - dune/grid/albertagrid/misc.hh │ │ │ │ │ │ - dune/grid/albertagrid/elementinfo.hh │ │ │ │ │ │ - dune/grid/albertagrid/refinement.hh │ │ │ │ │ │ + a00677.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.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ a00707.html │ │ │ │ │ │ - dune/grid/albertagrid/elementinfo.hh │ │ │ │ │ │ - dune/grid/albertagrid/meshpointer.hh │ │ │ │ │ │ + dune/grid/albertagrid/elementinfo.hh │ │ │ │ │ │ + dune/grid/albertagrid/meshpointer.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Alberta │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ elementinfo.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00704.html │ │ │ │ │ │ - dune/grid/albertagrid/geometrycache.hh │ │ │ │ │ │ - dune/grid/albertagrid/macroelement.hh │ │ │ │ │ │ + a00662.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.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00698.html │ │ │ │ │ │ + a00689.html │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ #define │ │ │ │ │ │ DUNE_ALBERTA_ENTITY_CC │ │ │ │ │ │ - a00698.html │ │ │ │ │ │ + a00689.html │ │ │ │ │ │ a52a3d21da8af78e4568aaed1c24da792 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ albertagrid/entity.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ a07139.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.10.0/dune/grid/common/ │ │ │ │ │ │ a07142.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 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ concepts/archetypes/entity.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/concepts/archetypes/ │ │ │ │ │ │ a07148.html │ │ │ │ │ │ - dune/grid/common/gridenums.hh │ │ │ │ │ │ + dune/grid/common/gridenums.hh │ │ │ │ │ │ dune/grid/concepts/archetypes/entity.hh │ │ │ │ │ │ dune/grid/concepts/archetypes/geometry.hh │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ concepts/entity.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/concepts/ │ │ │ │ │ │ a07145.html │ │ │ │ │ │ - dune/grid/common/gridenums.hh │ │ │ │ │ │ + dune/grid/common/gridenums.hh │ │ │ │ │ │ dune/grid/concepts/geometry.hh │ │ │ │ │ │ dune/grid/concepts/archetypes/entity.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Concept │ │ │ │ │ │ Dune::Concept::EntitySeed │ │ │ │ │ │ Dune::Concept::EntityGeneral │ │ │ │ │ │ Dune::Concept::EntityExtended │ │ │ │ │ │ @@ -533,28 +533,28 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ geometrygrid/entity.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/geometrygrid/ │ │ │ │ │ │ a07151.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.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ a07154.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.10.0/dune/grid/common/ │ │ │ │ │ │ @@ -573,36 +573,36 @@ │ │ │ │ │ │ Dune::GeoGrid::EntitySeed< codim, Grd, true > │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::GeoGrid │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ geometry.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00668.html │ │ │ │ │ │ - dune/grid/albertagrid/algebra.hh │ │ │ │ │ │ + a00614.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 │ │ │ │ │ │ - a00668.html │ │ │ │ │ │ + a00614.html │ │ │ │ │ │ a085bbe8bddf730dd71a187dceae4e610 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ albertagrid/geometry.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ a07163.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 │ │ │ │ │ │ @@ -632,62 +632,62 @@ │ │ │ │ │ │ Dune::Concept::Geometry │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ geometrygrid/geometry.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/geometrygrid/ │ │ │ │ │ │ a07175.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.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00686.html │ │ │ │ │ │ - dune/grid/albertagrid/misc.hh │ │ │ │ │ │ - dune/grid/albertagrid/algebra.hh │ │ │ │ │ │ + a00674.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.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00701.html │ │ │ │ │ │ + a00716.html │ │ │ │ │ │ dune/grid/common/geometry.hh │ │ │ │ │ │ Dune::GeometryReference │ │ │ │ │ │ Dune::LocalGeometryReference │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ albertagrid/gridfactory.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ a07178.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.10.0/dune/grid/common/ │ │ │ │ │ │ a07181.html │ │ │ │ │ │ - dune/grid/common/boundarysegment.hh │ │ │ │ │ │ + dune/grid/common/boundarysegment.hh │ │ │ │ │ │ dune/grid/common/grid.hh │ │ │ │ │ │ Dune::GridFactoryInterface │ │ │ │ │ │ Dune::GridFactoryInterface::Codim │ │ │ │ │ │ Dune::GridFactory │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -695,38 +695,38 @@ │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ a07184.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/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.10.0/dune/grid/geometrygrid/ │ │ │ │ │ │ a07187.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 │ │ │ │ │ │ @@ -751,28 +751,28 @@ │ │ │ │ │ │ Dune::AlbertaLeafGridView::Codim │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ common/gridview.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/common/ │ │ │ │ │ │ a07193.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 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ concepts/gridview.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/concepts/ │ │ │ │ │ │ a07196.html │ │ │ │ │ │ dune/grid/common/capabilities.hh │ │ │ │ │ │ - dune/grid/common/gridenums.hh │ │ │ │ │ │ + dune/grid/common/gridenums.hh │ │ │ │ │ │ dune/grid/concepts/entityiterator.hh │ │ │ │ │ │ dune/grid/concepts/geometry.hh │ │ │ │ │ │ dune/grid/concepts/indexidset.hh │ │ │ │ │ │ dune/grid/concepts/intersection.hh │ │ │ │ │ │ dune/grid/concepts/intersectioniterator.hh │ │ │ │ │ │ dune/grid/concepts/archetypes/datahandle.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ @@ -785,100 +785,100 @@ │ │ │ │ │ │ a07199.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.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00671.html │ │ │ │ │ │ - dune/grid/albertagrid/elementinfo.hh │ │ │ │ │ │ + a00632.html │ │ │ │ │ │ + dune/grid/albertagrid/elementinfo.hh │ │ │ │ │ │ dune/grid/common/entityiterator.hh │ │ │ │ │ │ Dune::AlbertaGridHierarchicIterator │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ indexsets.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00623.html │ │ │ │ │ │ + a00638.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.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ a07202.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/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.10.0/dune/grid/geometrygrid/ │ │ │ │ │ │ a07205.html │ │ │ │ │ │ - dune/grid/common/gridenums.hh │ │ │ │ │ │ + dune/grid/common/gridenums.hh │ │ │ │ │ │ dune/grid/common/indexidset.hh │ │ │ │ │ │ - dune/grid/geometrygrid/declaration.hh │ │ │ │ │ │ + dune/grid/geometrygrid/declaration.hh │ │ │ │ │ │ Dune::GeoGrid::IndexSet │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::GeoGrid │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ indexstack.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00656.html │ │ │ │ │ │ + a00650.html │ │ │ │ │ │ Dune::IndexStack │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ intersection.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00665.html │ │ │ │ │ │ + a00671.html │ │ │ │ │ │ dune/grid/albertagrid/intersection.hh │ │ │ │ │ │ Dune::AlbertaGridIntersectionBase::GlobalCoordReader │ │ │ │ │ │ Dune::AlbertaGridIntersectionBase::LocalCoordReader │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ #define │ │ │ │ │ │ DUNE_ALBERTA_INTERSECTION_CC │ │ │ │ │ │ - a00665.html │ │ │ │ │ │ + a00671.html │ │ │ │ │ │ a8d4a192c9f43ac0db61703b46cb6a297 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ albertagrid/intersection.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ a07208.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 │ │ │ │ │ │ @@ -899,16 +899,16 @@ │ │ │ │ │ │ Dune::Concept │ │ │ │ │ │ Dune::Concept::Intersection │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ geometrygrid/intersection.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/geometrygrid/ │ │ │ │ │ │ a07217.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.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ @@ -947,100 +947,100 @@ │ │ │ │ │ │ Dune::GeoGrid::IntersectionIterator │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::GeoGrid │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ leafiterator.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00650.html │ │ │ │ │ │ + a00665.html │ │ │ │ │ │ dune/grid/common/entityiterator.hh │ │ │ │ │ │ - dune/grid/albertagrid/treeiterator.hh │ │ │ │ │ │ + dune/grid/albertagrid/treeiterator.hh │ │ │ │ │ │ Dune::AlbertaGridLeafIterator │ │ │ │ │ │ Dune::AlbertaGridLeafIterator< codim, Ghost_Partition, GridImp > │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ level.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00662.html │ │ │ │ │ │ - dune/grid/albertagrid/meshpointer.hh │ │ │ │ │ │ - dune/grid/albertagrid/dofadmin.hh │ │ │ │ │ │ - dune/grid/albertagrid/dofvector.hh │ │ │ │ │ │ + a00644.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.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00710.html │ │ │ │ │ │ + a00701.html │ │ │ │ │ │ dune/grid/common/entityiterator.hh │ │ │ │ │ │ - dune/grid/albertagrid/treeiterator.hh │ │ │ │ │ │ + dune/grid/albertagrid/treeiterator.hh │ │ │ │ │ │ Dune::AlbertaGridLevelIterator │ │ │ │ │ │ Dune::AlbertaGridLevelIterator< codim, Ghost_Partition, GridImp > │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ macrodata.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00644.html │ │ │ │ │ │ - dune/grid/common/exceptions.hh │ │ │ │ │ │ - dune/grid/albertagrid/macrodata.hh │ │ │ │ │ │ + a00713.html │ │ │ │ │ │ + dune/grid/common/exceptions.hh │ │ │ │ │ │ + dune/grid/albertagrid/macrodata.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Alberta │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ macrodata.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00677.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.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00617.html │ │ │ │ │ │ - dune/grid/albertagrid/misc.hh │ │ │ │ │ │ + a00626.html │ │ │ │ │ │ + dune/grid/albertagrid/misc.hh │ │ │ │ │ │ Dune::Alberta::MacroElement │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Alberta │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ meshpointer.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00626.html │ │ │ │ │ │ - dune/grid/albertagrid/meshpointer.hh │ │ │ │ │ │ + a00680.html │ │ │ │ │ │ + dune/grid/albertagrid/meshpointer.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Alberta │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ meshpointer.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00647.html │ │ │ │ │ │ - dune/grid/albertagrid/misc.hh │ │ │ │ │ │ - dune/grid/albertagrid/elementinfo.hh │ │ │ │ │ │ - dune/grid/albertagrid/macrodata.hh │ │ │ │ │ │ + a00629.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.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00689.html │ │ │ │ │ │ - dune/grid/albertagrid/albertaheader.hh │ │ │ │ │ │ + a00653.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 > │ │ │ │ │ │ @@ -1072,81 +1072,81 @@ │ │ │ │ │ │ Dune::Alberta::Twist< dim, 2 > │ │ │ │ │ │ Dune::Alberta::Twist< 2, 2 > │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Alberta │ │ │ │ │ │ │ │ │ │ │ │ #define │ │ │ │ │ │ DUNE_ALBERTA_CACHE_COORDINATES │ │ │ │ │ │ - a00689.html │ │ │ │ │ │ + a00653.html │ │ │ │ │ │ ac7a758bde399b9ddaa1d7efc4d08c19a │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ albertagrid/persistentcontainer.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ a07232.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.10.0/dune/grid/geometrygrid/ │ │ │ │ │ │ a07235.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.10.0/dune/grid/utility/ │ │ │ │ │ │ a07238.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.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ a07241.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.10.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ a07244.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.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00674.html │ │ │ │ │ │ - dune/grid/albertagrid/misc.hh │ │ │ │ │ │ - dune/grid/albertagrid/elementinfo.hh │ │ │ │ │ │ + a00695.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 > │ │ │ │ │ │ @@ -1173,82 +1173,82 @@ │ │ │ │ │ │ dune/grid/utility/multiindex.hh │ │ │ │ │ │ Dune::StructuredGridFactory │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ transformation.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00635.html │ │ │ │ │ │ - dune/grid/albertagrid/misc.hh │ │ │ │ │ │ + a00659.html │ │ │ │ │ │ + dune/grid/albertagrid/misc.hh │ │ │ │ │ │ Dune::AlbertaTransformation │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ treeiterator.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00716.html │ │ │ │ │ │ - dune/grid/albertagrid/elementinfo.hh │ │ │ │ │ │ - dune/grid/albertagrid/meshpointer.hh │ │ │ │ │ │ + a00710.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.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00653.html │ │ │ │ │ │ + a00692.html │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ undefine-3.0.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/albertagrid/ │ │ │ │ │ │ - a00680.html │ │ │ │ │ │ + a00620.html │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ adaptcallback.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/common/ │ │ │ │ │ │ - a00362.html │ │ │ │ │ │ + a00308.html │ │ │ │ │ │ Dune::AdaptDataHandleInterface │ │ │ │ │ │ Dune::AdaptDataHandle │ │ │ │ │ │ Dune::CombinedAdaptProlongRestrict │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ boundaryprojection.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/common/ │ │ │ │ │ │ - a00335.html │ │ │ │ │ │ - dune/grid/common/boundarysegment.hh │ │ │ │ │ │ - dune/grid/common/datahandleif.hh │ │ │ │ │ │ - dune/grid/io/file/gmshreader.hh │ │ │ │ │ │ + a00323.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.10.0/dune/grid/common/ │ │ │ │ │ │ - a00281.html │ │ │ │ │ │ + a00326.html │ │ │ │ │ │ Dune::BoundarySegmentBackupRestore │ │ │ │ │ │ Dune::BoundarySegment │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ datahandleif.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/common/ │ │ │ │ │ │ - a00305.html │ │ │ │ │ │ + a00332.html │ │ │ │ │ │ Dune::MessageBufferIF │ │ │ │ │ │ Dune::CommDataHandleIF │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ defaultgridview.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/common/ │ │ │ │ │ │ - a00296.html │ │ │ │ │ │ + a00248.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 │ │ │ │ │ │ @@ -1276,28 +1276,28 @@ │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Concept │ │ │ │ │ │ Dune::Concept::EntityIterator │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ exceptions.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/common/ │ │ │ │ │ │ - a00344.html │ │ │ │ │ │ + a00287.html │ │ │ │ │ │ Dune::GridError │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ common/grid.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/common/ │ │ │ │ │ │ a07259.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 │ │ │ │ │ │ @@ -1314,15 +1314,15 @@ │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Capabilities │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ concepts/grid.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/concepts/ │ │ │ │ │ │ a07262.html │ │ │ │ │ │ - dune/grid/common/gridenums.hh │ │ │ │ │ │ + dune/grid/common/gridenums.hh │ │ │ │ │ │ dune/grid/common/capabilities.hh │ │ │ │ │ │ dune/grid/concepts/entity.hh │ │ │ │ │ │ dune/grid/concepts/entityiterator.hh │ │ │ │ │ │ dune/grid/concepts/geometry.hh │ │ │ │ │ │ dune/grid/concepts/gridview.hh │ │ │ │ │ │ dune/grid/concepts/indexidset.hh │ │ │ │ │ │ dune/grid/concepts/intersection.hh │ │ │ │ │ │ @@ -1337,40 +1337,40 @@ │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/geometrygrid/ │ │ │ │ │ │ a07265.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.10.0/dune/grid/common/ │ │ │ │ │ │ - a00275.html │ │ │ │ │ │ + a00356.html │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ common/gridinfo.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/common/ │ │ │ │ │ │ a07268.html │ │ │ │ │ │ grid.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ utility/gridinfo.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/utility/ │ │ │ │ │ │ a07271.html │ │ │ │ │ │ - dune/grid/common/mcmgmapper.hh │ │ │ │ │ │ + dune/grid/common/mcmgmapper.hh │ │ │ │ │ │ Dune::EntityInfo │ │ │ │ │ │ Dune::GridViewInfoGTCompare │ │ │ │ │ │ Dune::GridViewInfo │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ common/indexidset.hh │ │ │ │ │ │ @@ -1393,57 +1393,57 @@ │ │ │ │ │ │ Dune::Concept │ │ │ │ │ │ Dune::Concept::IndexSet │ │ │ │ │ │ Dune::Concept::IdSet │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ mapper.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/common/ │ │ │ │ │ │ - a00272.html │ │ │ │ │ │ + a00344.html │ │ │ │ │ │ Dune::Mapper │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ mcmgmapper.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/common/ │ │ │ │ │ │ - a00257.html │ │ │ │ │ │ - mapper.hh │ │ │ │ │ │ + a00338.html │ │ │ │ │ │ + mapper.hh │ │ │ │ │ │ Dune::MultipleCodimMultipleGeomTypeMapper │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ partitionset.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/common/ │ │ │ │ │ │ - a00242.html │ │ │ │ │ │ - dune/grid/common/gridenums.hh │ │ │ │ │ │ + a00293.html │ │ │ │ │ │ + dune/grid/common/gridenums.hh │ │ │ │ │ │ Dune::PartitionSet │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Partitions │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ rangegenerators.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/common/ │ │ │ │ │ │ - a00245.html │ │ │ │ │ │ - dune/grid/common/gridenums.hh │ │ │ │ │ │ - dune/grid/common/partitionset.hh │ │ │ │ │ │ + a00263.html │ │ │ │ │ │ + dune/grid/common/gridenums.hh │ │ │ │ │ │ + dune/grid/common/partitionset.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ scsgmapper.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/common/ │ │ │ │ │ │ - a00347.html │ │ │ │ │ │ - mapper.hh │ │ │ │ │ │ + a00299.html │ │ │ │ │ │ + mapper.hh │ │ │ │ │ │ dune/grid/common/grid.hh │ │ │ │ │ │ Dune::SingleCodimSingleGeomTypeMapper │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ sizecache.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/common/ │ │ │ │ │ │ - a00308.html │ │ │ │ │ │ - dune/grid/common/gridenums.hh │ │ │ │ │ │ + a00314.html │ │ │ │ │ │ + dune/grid/common/gridenums.hh │ │ │ │ │ │ dune/grid/common/capabilities.hh │ │ │ │ │ │ Dune::SizeCache │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ archetypes/messagebuffer.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/concepts/archetypes/ │ │ │ │ │ │ @@ -1464,94 +1464,94 @@ │ │ │ │ │ │ a00728.html │ │ │ │ │ │ dune/grid/geometrygrid/grid.hh │ │ │ │ │ │ dune/grid/geometrygrid/persistentcontainer.hh │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ cachedcoordfunction.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/geometrygrid/ │ │ │ │ │ │ - a00602.html │ │ │ │ │ │ - dune/grid/common/gridenums.hh │ │ │ │ │ │ + a00599.html │ │ │ │ │ │ + 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.10.0/dune/grid/geometrygrid/ │ │ │ │ │ │ - a00578.html │ │ │ │ │ │ + a00590.html │ │ │ │ │ │ Dune::AnalyticalCoordFunctionInterface │ │ │ │ │ │ Dune::AnalyticalCoordFunction │ │ │ │ │ │ Dune::DiscreteCoordFunctionInterface │ │ │ │ │ │ Dune::DiscreteCoordFunction │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::GeoGrid │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ coordfunctioncaller.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/geometrygrid/ │ │ │ │ │ │ - a00569.html │ │ │ │ │ │ - dune/grid/geometrygrid/hostcorners.hh │ │ │ │ │ │ - dune/grid/geometrygrid/coordfunction.hh │ │ │ │ │ │ + a00584.html │ │ │ │ │ │ + dune/grid/geometrygrid/hostcorners.hh │ │ │ │ │ │ + dune/grid/geometrygrid/coordfunction.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::GeoGrid │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ cornerstorage.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/geometrygrid/ │ │ │ │ │ │ - a00587.html │ │ │ │ │ │ - dune/grid/geometrygrid/coordfunctioncaller.hh │ │ │ │ │ │ + a00572.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.10.0/dune/grid/geometrygrid/ │ │ │ │ │ │ - a00584.html │ │ │ │ │ │ + a00575.html │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ hostcorners.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/geometrygrid/ │ │ │ │ │ │ - a00566.html │ │ │ │ │ │ + a00569.html │ │ │ │ │ │ dune/grid/common/entity.hh │ │ │ │ │ │ Dune::GeoGrid::HostCorners │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::GeoGrid │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ identity.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/geometrygrid/ │ │ │ │ │ │ - a00605.html │ │ │ │ │ │ - dune/grid/geometrygrid/coordfunction.hh │ │ │ │ │ │ + a00608.html │ │ │ │ │ │ + dune/grid/geometrygrid/coordfunction.hh │ │ │ │ │ │ Dune::IdenticalCoordFunction │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ idset.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/geometrygrid/ │ │ │ │ │ │ - a00599.html │ │ │ │ │ │ + a00587.html │ │ │ │ │ │ dune/grid/common/indexidset.hh │ │ │ │ │ │ Dune::GeoGrid::IdSet │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::GeoGrid │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ iterator.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/geometrygrid/ │ │ │ │ │ │ - a00572.html │ │ │ │ │ │ + a00566.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 > │ │ │ │ │ │ @@ -1564,39 +1564,39 @@ │ │ │ │ │ │ │ │ │ │ │ │ identitygrid.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/ │ │ │ │ │ │ a00731.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/identitygridentity.hh │ │ │ │ │ │ + identitygrid/identitygridentityseed.hh │ │ │ │ │ │ + identitygrid/identitygridintersectioniterator.hh │ │ │ │ │ │ + identitygrid/identitygridleveliterator.hh │ │ │ │ │ │ + identitygrid/identitygridleafiterator.hh │ │ │ │ │ │ identitygrid/identitygridhierarchiciterator.hh │ │ │ │ │ │ - identitygrid/identitygridindexsets.hh │ │ │ │ │ │ + identitygrid/identitygridindexsets.hh │ │ │ │ │ │ Dune::IdentityGridFamily │ │ │ │ │ │ Dune::IdentityGrid │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Capabilities │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ identitygridentity.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/identitygrid/ │ │ │ │ │ │ - a00752.html │ │ │ │ │ │ + a00743.html │ │ │ │ │ │ dune/grid/common/grid.hh │ │ │ │ │ │ Dune::IdentityGridEntity │ │ │ │ │ │ Dune::IdentityGridEntity< 0, dim, GridImp > │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ identitygridentityseed.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/identitygrid/ │ │ │ │ │ │ - a00737.html │ │ │ │ │ │ + a00740.html │ │ │ │ │ │ Dune::IdentityGridEntitySeed │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ identitygridgeometry.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/identitygrid/ │ │ │ │ │ │ a00734.html │ │ │ │ │ │ @@ -1610,242 +1610,242 @@ │ │ │ │ │ │ a00755.html │ │ │ │ │ │ Dune::IdentityGridHierarchicIterator │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ identitygridindexsets.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/identitygrid/ │ │ │ │ │ │ - a00758.html │ │ │ │ │ │ + a00752.html │ │ │ │ │ │ dune/grid/common/indexidset.hh │ │ │ │ │ │ Dune::IdentityGridLevelIndexSet │ │ │ │ │ │ Dune::IdentityGridLeafIndexSet │ │ │ │ │ │ Dune::IdentityGridGlobalIdSet │ │ │ │ │ │ Dune::IdentityGridLocalIdSet │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ identitygridintersectioniterator.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/identitygrid/ │ │ │ │ │ │ - a00746.html │ │ │ │ │ │ - identitygridintersections.hh │ │ │ │ │ │ - identitygridentity.hh │ │ │ │ │ │ + a00749.html │ │ │ │ │ │ + identitygridintersections.hh │ │ │ │ │ │ + identitygridentity.hh │ │ │ │ │ │ dune/grid/common/intersection.hh │ │ │ │ │ │ Dune::IdentityGridLeafIntersectionIterator │ │ │ │ │ │ Dune::IdentityGridLevelIntersectionIterator │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ identitygridintersections.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/identitygrid/ │ │ │ │ │ │ - a00743.html │ │ │ │ │ │ - identitygridleafiterator.hh │ │ │ │ │ │ - dune/grid/identitygrid/identitygridentity.hh │ │ │ │ │ │ + a00746.html │ │ │ │ │ │ + identitygridleafiterator.hh │ │ │ │ │ │ + dune/grid/identitygrid/identitygridentity.hh │ │ │ │ │ │ Dune::IdentityGridLeafIntersection │ │ │ │ │ │ Dune::IdentityGridLevelIntersection │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ identitygridleafiterator.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/identitygrid/ │ │ │ │ │ │ - a00740.html │ │ │ │ │ │ - dune/grid/common/gridenums.hh │ │ │ │ │ │ + a00758.html │ │ │ │ │ │ + dune/grid/common/gridenums.hh │ │ │ │ │ │ Dune::IdentityGridLeafIterator │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ identitygridleveliterator.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/identitygrid/ │ │ │ │ │ │ - a00749.html │ │ │ │ │ │ - dune/grid/common/gridenums.hh │ │ │ │ │ │ + a00737.html │ │ │ │ │ │ + dune/grid/common/gridenums.hh │ │ │ │ │ │ Dune::IdentityGridLevelIterator │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ basic.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00776.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ + a00860.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ basic.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00842.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/entitykey.hh │ │ │ │ │ │ - dune/grid/io/file/dgfparser/dgfexception.hh │ │ │ │ │ │ + a00866.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.10.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00833.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/boundarydom.hh │ │ │ │ │ │ + a00917.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/boundarydom.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ boundarydom.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00788.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ - dune/grid/io/file/dgfparser/parser.hh │ │ │ │ │ │ + a00920.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.10.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00800.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/boundaryseg.hh │ │ │ │ │ │ + a00875.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/boundaryseg.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ boundaryseg.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00770.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.10.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00821.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/cube.hh │ │ │ │ │ │ + a00893.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/cube.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ cube.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00845.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ + a00878.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ Dune::dgf::CubeBlock │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ dim.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00836.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/dim.hh │ │ │ │ │ │ + a00902.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/dim.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ dim.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00815.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ + a00884.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ Dune::dgf::DimBlock │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ general.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00797.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/general.hh │ │ │ │ │ │ + a00857.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/general.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ general.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00824.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ + a00929.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ Dune::dgf::GeneralBlock │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ gridparameter.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00839.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/gridparameter.hh │ │ │ │ │ │ + a00890.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/gridparameter.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ gridparameter.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00812.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ + a00926.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ Dune::dgf::GridParameterBlock │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ interval.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00779.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/interval.hh │ │ │ │ │ │ + a00863.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/interval.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ interval.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00827.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ + a00881.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.10.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00818.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/periodicfacetrans.hh │ │ │ │ │ │ + a00854.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/periodicfacetrans.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ periodicfacetrans.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00794.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ + a00932.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.10.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00830.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ + a00872.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ Dune::dgf::PolygonBlock │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ polyhedron.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00773.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/polygon.hh │ │ │ │ │ │ + a00869.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/polygon.hh │ │ │ │ │ │ Dune::dgf::PolyhedronBlock │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ projection.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00782.html │ │ │ │ │ │ + a00896.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 │ │ │ │ │ │ @@ -1861,313 +1861,313 @@ │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ Dune::dgf::Expr │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ simplex.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00809.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/simplex.hh │ │ │ │ │ │ + a00908.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/simplex.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ simplex.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00806.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ + a00905.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ Dune::dgf::SimplexBlock │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ simplexgeneration.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00767.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/simplexgeneration.hh │ │ │ │ │ │ + a00923.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/simplexgeneration.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ simplexgeneration.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00785.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ + a00914.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ Dune::dgf::SimplexGenerationBlock │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ vertex.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00791.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/vertex.hh │ │ │ │ │ │ + a00911.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/vertex.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ vertex.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/io/file/dgfparser/blocks/ │ │ │ │ │ │ - a00803.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ + a00899.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/blocks/basic.hh │ │ │ │ │ │ Dune::dgf::VertexBlock │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ dgfexception.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/io/file/dgfparser/ │ │ │ │ │ │ - a00764.html │ │ │ │ │ │ + a00956.html │ │ │ │ │ │ Dune::DGFException │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ dgfgeogrid.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/io/file/dgfparser/ │ │ │ │ │ │ - a00878.html │ │ │ │ │ │ + a00938.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.10.0/dune/grid/io/file/dgfparser/ │ │ │ │ │ │ - a00851.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/dgfexception.hh │ │ │ │ │ │ - dune/grid/io/file/dgfparser/macrogrid.hh │ │ │ │ │ │ - dune/grid/io/file/dgfparser/parser.hh │ │ │ │ │ │ + a00842.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.10.0/dune/grid/io/file/dgfparser/ │ │ │ │ │ │ - a00860.html │ │ │ │ │ │ + a00935.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.10.0/dune/grid/io/file/dgfparser/ │ │ │ │ │ │ - a00875.html │ │ │ │ │ │ + a00851.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.10.0/dune/grid/io/file/dgfparser/ │ │ │ │ │ │ - a00863.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/dgfug.hh │ │ │ │ │ │ + a00833.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/dgfug.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::dgf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ dgfug.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/io/file/dgfparser/ │ │ │ │ │ │ - a00869.html │ │ │ │ │ │ + a00941.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.10.0/dune/grid/io/file/dgfparser/ │ │ │ │ │ │ - a00866.html │ │ │ │ │ │ + a00845.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.10.0/dune/grid/io/file/dgfparser/ │ │ │ │ │ │ - a00890.html │ │ │ │ │ │ + a00950.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.10.0/dune/grid/io/file/dgfparser/ │ │ │ │ │ │ - a00887.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/dgfexception.hh │ │ │ │ │ │ - entitykey_inline.hh │ │ │ │ │ │ + a00947.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.10.0/dune/grid/io/file/dgfparser/ │ │ │ │ │ │ - a00857.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/entitykey.hh │ │ │ │ │ │ + a00959.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/entitykey.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ gridptr.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/io/file/dgfparser/ │ │ │ │ │ │ - a00854.html │ │ │ │ │ │ - dune/grid/common/gridenums.hh │ │ │ │ │ │ - dune/grid/common/datahandleif.hh │ │ │ │ │ │ + a00953.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/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::GridPtr │ │ │ │ │ │ Dune::GridPtr::mygrid_ptr │ │ │ │ │ │ Dune::GridPtr::DataHandle │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ macrogrid.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/io/file/dgfparser/ │ │ │ │ │ │ - a00848.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/parser.hh │ │ │ │ │ │ + a00944.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/parser.hh │ │ │ │ │ │ Dune::MacroGrid │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ parser.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/io/file/dgfparser/ │ │ │ │ │ │ - a00872.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/entitykey.hh │ │ │ │ │ │ + a00848.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/entitykey.hh │ │ │ │ │ │ Dune::DGFBoundaryParameter │ │ │ │ │ │ Dune::DuneGridFormatParser │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ dgf2dgf.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/io/file/dgfparser/utils/ │ │ │ │ │ │ - a00884.html │ │ │ │ │ │ - dune/grid/io/file/dgfparser/dgfwriter.hh │ │ │ │ │ │ + a00839.html │ │ │ │ │ │ + dune/grid/io/file/dgfparser/dgfwriter.hh │ │ │ │ │ │ │ │ │ │ │ │ int │ │ │ │ │ │ main │ │ │ │ │ │ - a00884.html │ │ │ │ │ │ + a00839.html │ │ │ │ │ │ a0ddf1224851353fc92bfbff6f499fa97 │ │ │ │ │ │ (int argc, char *argv[]) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ gmsh2dgf.cc │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/io/file/dgfparser/utils/ │ │ │ │ │ │ - a00881.html │ │ │ │ │ │ - dune/grid/io/file/gmshreader.hh │ │ │ │ │ │ - dune/grid/io/file/dgfparser/dgfwriter.hh │ │ │ │ │ │ + a00836.html │ │ │ │ │ │ + dune/grid/io/file/gmshreader.hh │ │ │ │ │ │ + dune/grid/io/file/dgfparser/dgfwriter.hh │ │ │ │ │ │ │ │ │ │ │ │ int │ │ │ │ │ │ main │ │ │ │ │ │ - a00881.html │ │ │ │ │ │ + a00836.html │ │ │ │ │ │ a0ddf1224851353fc92bfbff6f499fa97 │ │ │ │ │ │ (int argc, char *argv[]) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ gmshreader.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/io/file/ │ │ │ │ │ │ - a00971.html │ │ │ │ │ │ - dune/grid/common/boundarysegment.hh │ │ │ │ │ │ + a00830.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.10.0/dune/grid/io/file/ │ │ │ │ │ │ - a00962.html │ │ │ │ │ │ + a00824.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.10.0/dune/grid/io/file/ │ │ │ │ │ │ - a00893.html │ │ │ │ │ │ + a00971.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.10.0/dune/grid/io/file/gnuplot/ │ │ │ │ │ │ - a00761.html │ │ │ │ │ │ - ../gnuplot.hh │ │ │ │ │ │ + a00968.html │ │ │ │ │ │ + ../gnuplot.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ printgrid.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/io/file/ │ │ │ │ │ │ - a00965.html │ │ │ │ │ │ - dune/grid/common/mcmgmapper.hh │ │ │ │ │ │ + a00962.html │ │ │ │ │ │ + dune/grid/common/mcmgmapper.hh │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ starcdreader.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/io/file/ │ │ │ │ │ │ - a00968.html │ │ │ │ │ │ + a00827.html │ │ │ │ │ │ dune/grid/common/gridfactory.hh │ │ │ │ │ │ Dune::StarCDReader │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ vtk.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/io/file/ │ │ │ │ │ │ - a00896.html │ │ │ │ │ │ - vtk/boundarywriter.hh │ │ │ │ │ │ - vtk/subsamplingvtkwriter.hh │ │ │ │ │ │ - vtk/vtksequencewriter.hh │ │ │ │ │ │ - vtk/vtkwriter.hh │ │ │ │ │ │ - vtk/volumewriter.hh │ │ │ │ │ │ + a00965.html │ │ │ │ │ │ + vtk/boundarywriter.hh │ │ │ │ │ │ + vtk/subsamplingvtkwriter.hh │ │ │ │ │ │ + vtk/vtksequencewriter.hh │ │ │ │ │ │ + vtk/vtkwriter.hh │ │ │ │ │ │ + vtk/volumewriter.hh │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ b64enc.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/io/file/vtk/ │ │ │ │ │ │ - a00902.html │ │ │ │ │ │ + a00821.html │ │ │ │ │ │ Dune::b64chunk │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ const char │ │ │ │ │ │ base64table │ │ │ │ │ │ a01067.html │ │ │ │ │ │ a0f8eaefa183de6150378561ac93d210a │ │ │ │ │ │ @@ -2180,247 +2180,247 @@ │ │ │ │ │ │ a0f8eaefa183de6150378561ac93d210a │ │ │ │ │ │ [] │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ basicwriter.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/io/file/vtk/ │ │ │ │ │ │ - a00935.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 │ │ │ │ │ │ + a00770.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.10.0/dune/grid/io/file/vtk/ │ │ │ │ │ │ - a00938.html │ │ │ │ │ │ - dune/grid/io/file/vtk/corner.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/corneriterator.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/functionwriter.hh │ │ │ │ │ │ + a00803.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.10.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 │ │ │ │ │ │ + a00785.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.10.0/dune/grid/io/file/vtk/ │ │ │ │ │ │ - a00932.html │ │ │ │ │ │ + a00761.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.10.0/dune/grid/io/file/vtk/ │ │ │ │ │ │ - a00908.html │ │ │ │ │ │ - dune/grid/io/file/vtk/common.hh │ │ │ │ │ │ + a00773.html │ │ │ │ │ │ + dune/grid/io/file/vtk/common.hh │ │ │ │ │ │ Dune::VTK::Corner │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::VTK │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ corneriterator.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/io/file/vtk/ │ │ │ │ │ │ - a00956.html │ │ │ │ │ │ - dune/grid/io/file/vtk/corner.hh │ │ │ │ │ │ + a00812.html │ │ │ │ │ │ + dune/grid/io/file/vtk/corner.hh │ │ │ │ │ │ Dune::VTK::CornerIterator │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::VTK │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ dataarraywriter.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/io/file/vtk/ │ │ │ │ │ │ - a00899.html │ │ │ │ │ │ - dune/grid/io/file/vtk/streams.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/common.hh │ │ │ │ │ │ + a00776.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.10.0/dune/grid/io/file/vtk/ │ │ │ │ │ │ - a00911.html │ │ │ │ │ │ - dune/grid/common/mcmgmapper.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/common.hh │ │ │ │ │ │ + a00800.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.10.0/dune/grid/io/file/vtk/ │ │ │ │ │ │ - a00950.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 │ │ │ │ │ │ + a00818.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.10.0/dune/grid/io/file/vtk/ │ │ │ │ │ │ - a00941.html │ │ │ │ │ │ - dune/grid/io/file/vtk/corner.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/corneriterator.hh │ │ │ │ │ │ + a00779.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.10.0/dune/grid/io/file/vtk/ │ │ │ │ │ │ - a00929.html │ │ │ │ │ │ - dune/grid/io/file/vtk/common.hh │ │ │ │ │ │ + a00815.html │ │ │ │ │ │ + dune/grid/io/file/vtk/common.hh │ │ │ │ │ │ Dune::VTK::PVTUWriter │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::VTK │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ skeletonfunction.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/io/file/vtk/ │ │ │ │ │ │ - a00959.html │ │ │ │ │ │ - dune/grid/io/file/vtk/functionwriter.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/pvtuwriter.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/vtuwriter.hh │ │ │ │ │ │ + a00809.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.10.0/dune/grid/io/file/vtk/ │ │ │ │ │ │ - a00923.html │ │ │ │ │ │ - dune/grid/io/file/vtk/b64enc.hh │ │ │ │ │ │ + a00791.html │ │ │ │ │ │ + dune/grid/io/file/vtk/b64enc.hh │ │ │ │ │ │ Dune::Base64Stream │ │ │ │ │ │ Dune::RawStream │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ subsamplingvtkwriter.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/io/file/vtk/ │ │ │ │ │ │ - a00947.html │ │ │ │ │ │ - dune/grid/io/file/vtk/vtkwriter.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/vtuwriter.hh │ │ │ │ │ │ + a00767.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.10.0/dune/grid/io/file/vtk/ │ │ │ │ │ │ - a00914.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 │ │ │ │ │ │ + a00764.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.10.0/dune/grid/io/file/vtk/ │ │ │ │ │ │ - a00926.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 │ │ │ │ │ │ + a00806.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.10.0/dune/grid/io/file/vtk/ │ │ │ │ │ │ - a00905.html │ │ │ │ │ │ - dune/grid/io/file/vtk/vtksequencewriterbase.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/vtkwriter.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/subsamplingvtkwriter.hh │ │ │ │ │ │ + a00788.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.10.0/dune/grid/io/file/vtk/ │ │ │ │ │ │ - a00953.html │ │ │ │ │ │ - dune/grid/io/file/vtk/common.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/vtkwriter.hh │ │ │ │ │ │ + a00797.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.10.0/dune/grid/io/file/vtk/ │ │ │ │ │ │ - a00920.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 │ │ │ │ │ │ + a00794.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.10.0/dune/grid/io/file/vtk/ │ │ │ │ │ │ - a00917.html │ │ │ │ │ │ - dune/grid/io/file/vtk/common.hh │ │ │ │ │ │ - dune/grid/io/file/vtk/dataarraywriter.hh │ │ │ │ │ │ + a00782.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.10.0/dune/grid/ │ │ │ │ │ │ @@ -2438,15 +2438,15 @@ │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Capabilities │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ uggrid.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/ │ │ │ │ │ │ a00977.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 > │ │ │ │ │ │ @@ -2522,69 +2522,69 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ uggridfactory.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/uggrid/ │ │ │ │ │ │ a00980.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.10.0/dune/grid/utility/ │ │ │ │ │ │ - a00995.html │ │ │ │ │ │ - dune/grid/common/gridenums.hh │ │ │ │ │ │ + a01022.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.10.0/dune/grid/utility/ │ │ │ │ │ │ a00998.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.10.0/dune/grid/utility/ │ │ │ │ │ │ a01019.html │ │ │ │ │ │ - dune/grid/io/file/gmshreader.hh │ │ │ │ │ │ + dune/grid/io/file/gmshreader.hh │ │ │ │ │ │ dune/grid/utility/gridinfo.hh │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ gridtype.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/utility/ │ │ │ │ │ │ - a00989.html │ │ │ │ │ │ + a01010.html │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ hierarchicsearch.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/utility/ │ │ │ │ │ │ - a01007.html │ │ │ │ │ │ + a01013.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.10.0/dune/grid/utility/ │ │ │ │ │ │ - a01016.html │ │ │ │ │ │ + a00989.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 │ │ │ │ │ │ │ │ │ │ │ │ @@ -2595,224 +2595,224 @@ │ │ │ │ │ │ Dune::FactoryUtilities::MultiIndex │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::FactoryUtilities │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ parmetisgridpartitioner.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/utility/ │ │ │ │ │ │ - a01010.html │ │ │ │ │ │ + a01007.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.10.0/dune/grid/utility/ │ │ │ │ │ │ - a00983.html │ │ │ │ │ │ + a01016.html │ │ │ │ │ │ Dune::PersistentContainerInterface │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ persistentcontainermap.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/utility/ │ │ │ │ │ │ - a01001.html │ │ │ │ │ │ + a00983.html │ │ │ │ │ │ dune/grid/common/capabilities.hh │ │ │ │ │ │ Dune::PersistentContainerMap │ │ │ │ │ │ Dune::PersistentContainerMap::IteratorWrapper │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ persistentcontainervector.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/utility/ │ │ │ │ │ │ - a00992.html │ │ │ │ │ │ + a01001.html │ │ │ │ │ │ Dune::PersistentContainerVector │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ persistentcontainerwrapper.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/utility/ │ │ │ │ │ │ - a01022.html │ │ │ │ │ │ - dune/grid/utility/hostgridaccess.hh │ │ │ │ │ │ + a00995.html │ │ │ │ │ │ + dune/grid/utility/hostgridaccess.hh │ │ │ │ │ │ dune/grid/utility/persistentcontainer.hh │ │ │ │ │ │ Dune::PersistentContainerWrapper │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ tensorgridfactory.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/utility/ │ │ │ │ │ │ - a01004.html │ │ │ │ │ │ + a00992.html │ │ │ │ │ │ dune/grid/common/gridfactory.hh │ │ │ │ │ │ dune/grid/yaspgrid.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.10.0/dune/grid/utility/ │ │ │ │ │ │ - a01013.html │ │ │ │ │ │ + a01004.html │ │ │ │ │ │ Dune::VertexOrderByIdFactory │ │ │ │ │ │ Dune::VertexOrderByIdFactory::VertexOrder │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ yaspgrid.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/ │ │ │ │ │ │ a01025.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/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/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/backuprestore.hh │ │ │ │ │ │ Dune::YaspGridFamily │ │ │ │ │ │ Dune::YaspGrid │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Capabilities │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ coordinates.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/yaspgrid/ │ │ │ │ │ │ - a00176.html │ │ │ │ │ │ + a00218.html │ │ │ │ │ │ Dune::EquidistantCoordinates │ │ │ │ │ │ Dune::EquidistantOffsetCoordinates │ │ │ │ │ │ Dune::TensorProductCoordinates │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Yasp │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ partitioning.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/yaspgrid/ │ │ │ │ │ │ - a00218.html │ │ │ │ │ │ + a00173.html │ │ │ │ │ │ Dune::Yasp::Partitioning │ │ │ │ │ │ Dune::Yasp::DefaultPartitioning │ │ │ │ │ │ Dune::Yasp::PowerDPartitioning │ │ │ │ │ │ Dune::Yasp::FixedSizePartitioning │ │ │ │ │ │ Dune │ │ │ │ │ │ Dune::Yasp │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ structuredyaspgridfactory.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/yaspgrid/ │ │ │ │ │ │ - a00224.html │ │ │ │ │ │ + a00167.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.10.0/dune/grid/yaspgrid/ │ │ │ │ │ │ - a00230.html │ │ │ │ │ │ - dune/grid/common/exceptions.hh │ │ │ │ │ │ - partitioning.hh │ │ │ │ │ │ + a00227.html │ │ │ │ │ │ + dune/grid/common/exceptions.hh │ │ │ │ │ │ + partitioning.hh │ │ │ │ │ │ Dune::Torus │ │ │ │ │ │ Dune::Torus::ProcListIterator │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ yaspgridentity.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/yaspgrid/ │ │ │ │ │ │ - a00215.html │ │ │ │ │ │ + a00170.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.10.0/dune/grid/yaspgrid/ │ │ │ │ │ │ - a00173.html │ │ │ │ │ │ + a00233.html │ │ │ │ │ │ Dune::YaspEntitySeed │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ yaspgridgeometry.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/yaspgrid/ │ │ │ │ │ │ - a00158.html │ │ │ │ │ │ + a00176.html │ │ │ │ │ │ Dune::YaspGeometry │ │ │ │ │ │ Dune::YaspGeometry< mydim, mydim, GridImp > │ │ │ │ │ │ Dune::YaspGeometry< 0, cdim, GridImp > │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ yaspgridhierarchiciterator.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/yaspgrid/ │ │ │ │ │ │ - a00167.html │ │ │ │ │ │ + a00185.html │ │ │ │ │ │ Dune::YaspHierarchicIterator │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ yaspgrididset.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/yaspgrid/ │ │ │ │ │ │ - a00188.html │ │ │ │ │ │ + a00182.html │ │ │ │ │ │ Dune::YaspGlobalIdSet │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ yaspgridindexsets.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/yaspgrid/ │ │ │ │ │ │ - a00200.html │ │ │ │ │ │ + a00230.html │ │ │ │ │ │ Dune::YaspIndexSet │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ yaspgridintersection.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/yaspgrid/ │ │ │ │ │ │ - a00164.html │ │ │ │ │ │ + a00191.html │ │ │ │ │ │ Dune::YaspIntersection │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ yaspgridintersectioniterator.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/yaspgrid/ │ │ │ │ │ │ - a00194.html │ │ │ │ │ │ + a00155.html │ │ │ │ │ │ Dune::YaspIntersectionIterator │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ yaspgridleveliterator.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/yaspgrid/ │ │ │ │ │ │ - a00197.html │ │ │ │ │ │ + a00200.html │ │ │ │ │ │ Dune::YaspLevelIterator │ │ │ │ │ │ Dune │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ yaspgridpersistentcontainer.hh │ │ │ │ │ │ /build/reproducible-path/dune-grid-2.10.0/dune/grid/yaspgrid/ │ │ │ │ │ │ - a00170.html │ │ │ │ │ │ + a00224.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.10.0/dune/grid/yaspgrid/ │ │ │ │ │ │ - a00191.html │ │ │ │ │ │ + a00209.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 │ │ │ │ @@ -74,94 +74,94 @@ │ │ │ │
│ │ │ │
Here is a list of all files with brief descriptions:
│ │ │ │
[detail level 1234567]
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -172,164 +172,164 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
  doc
 doxygen
  recipes
 recipe-integration.cc
 recipe-iterate-over-grid.cc
 recipe-iterate-over-grid.cc
  dune
  grid
  albertagrid
  common
  concepts
  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,29 +69,29 @@ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
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:
│ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/globals_func.html │ │ │ │ @@ -66,15 +66,15 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
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 99% similar despite different names │ │ │ │ @@ -83,15 +83,15 @@ │ │ │ │ #include <dune/common/parallel/mpihelper.hh>
│ │ │ │ #include <dune/common/parametertreeparser.hh>
│ │ │ │ #include <dune/common/timer.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/a00158.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00323.html │ │ │ │┄ Files 90% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: yaspgridgeometry.hh File Reference │ │ │ │ +dune-grid: boundaryprojection.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,53 +65,52 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
yaspgridgeometry.hh File Reference
│ │ │ │ +
boundaryprojection.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ -

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

│ │ │ │ - │ │ │ │ -

Go to the source code of this file.

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

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

│ │ │ │ Classes

class  Dune::YaspGeometry< mydim, cdim, GridImp >
 The general version that handles all codimensions but 0 and dim. More...
struct  Dune::DuneBoundaryProjection< dimworld >
 Interface class for vertex projection at the boundary. More...
 
class  Dune::BoundaryProjectionWrapper< dimworld >
 
class  Dune::YaspGeometry< mydim, mydim, GridImp >
 specialize for dim=dimworld, i.e. a volume element More...
class  Dune::BoundarySegmentWrapper< dim, dimworld >
 
class  Dune::YaspGeometry< 0, cdim, GridImp >
 specialization for dim=0, this is a vertex More...
struct  Dune::CircleBoundaryProjection< dimworld >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

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

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,33 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ - * _y_a_s_p_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 │ │ │ │ │ -yaspgridgeometry.hh File Reference │ │ │ │ │ -The YaspGeometry class and its specializations. _M_o_r_e_._._. │ │ │ │ │ +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_:_:_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_._._. │ │ │ │ │ +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_:_:_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_:_:_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_:_:_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_:_:_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 ********** │ │ │ │ │ -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/a00158_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00155_source.html │ │ │ │┄ Files 83% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: yaspgridgeometry.hh Source File │ │ │ │ +dune-grid: yaspgridintersectioniterator.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,97 +74,107 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
yaspgridgeometry.hh
│ │ │ │ +
yaspgridintersectioniterator.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_GRID_YASPGRIDINTERSECTIONITERATOR_HH
│ │ │ │ +
6#define DUNE_GRID_YASPGRIDINTERSECTIONITERATOR_HH
│ │ │ │
7
│ │ │ │ -
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
│ │ │ │ -
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;
│ │ │ │ +
15namespace Dune {
│ │ │ │ +
16
│ │ │ │ +
20 template<class GridImp>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
22 {
│ │ │ │ +
23 constexpr static int dim = GridImp::dimension;
│ │ │ │ +
24 public:
│ │ │ │ +
25 // types used from grids
│ │ │ │ + │ │ │ │ + │ │ │ │ +
28
│ │ │ │ +
│ │ │ │ +
30 void increment()
│ │ │ │ +
31 {
│ │ │ │ +
32 intersection_.impl()._count += (intersection_.impl()._count < 2*dim);
│ │ │ │ +
33 }
│ │ │ │ +
│ │ │ │ +
34
│ │ │ │ +
│ │ │ │ +
36 bool equals (const YaspIntersectionIterator& other) const
│ │ │ │ +
37 {
│ │ │ │ +
38 return intersection_ == other.intersection_;
│ │ │ │ +
39 }
│ │ │ │ +
│ │ │ │ +
40
│ │ │ │ +
│ │ │ │ +
42 const Intersection & dereference() const
│ │ │ │ +
43 {
│ │ │ │ +
44 intersection_.impl().update();
│ │ │ │ +
45 return intersection_;
│ │ │ │ +
46 }
│ │ │ │ +
│ │ │ │ +
47
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
49 {}
│ │ │ │ +
│ │ │ │
50
│ │ │ │
│ │ │ │ -
52 YaspGeometry (const FieldVector<ctype, mydim>& ll, const FieldVector<ctype, mydim>& ur)
│ │ │ │ -
53 : AxisAlignedCubeGeometry<ctype,mydim,mydim>(ll,ur)
│ │ │ │ + │ │ │ │ +
53 : intersection_(IntersectionImp(myself, toend))
│ │ │ │
54 {}
│ │ │ │
│ │ │ │
55
│ │ │ │
│ │ │ │ - │ │ │ │ -
58 : AxisAlignedCubeGeometry<ctype,mydim,mydim>(other)
│ │ │ │ + │ │ │ │ +
58 : intersection_(other.intersection_)
│ │ │ │
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
│ │ │ │ +
60
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
63 {
│ │ │ │ +
64 intersection_ = other.intersection_;
│ │ │ │ +
65 return *this;
│ │ │ │ +
66 }
│ │ │ │ +
│ │ │ │ +
67
│ │ │ │ +
68 private:
│ │ │ │ +
69 // The intersection this iterator points to
│ │ │ │ +
70 mutable Intersection intersection_;
│ │ │ │ +
71 };
│ │ │ │ +
│ │ │ │ +
72
│ │ │ │ +
73} // namespace Dune
│ │ │ │ +
74
│ │ │ │ +
75#endif // DUNE_GRID_YASPGRIDINTERSECTIONITERATOR_HH
│ │ │ │
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
│ │ │ │ +
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
│ │ │ │ +
Definition yaspgridentity.hh:242
│ │ │ │ +
YaspIntersectionIterator enables iteration over intersections with neighboring codim 0 entities.
Definition yaspgridintersectioniterator.hh:22
│ │ │ │ +
const Intersection & dereference() const
dereferencing
Definition yaspgridintersectioniterator.hh:42
│ │ │ │ +
YaspIntersectionIterator(const YaspIntersectionIterator &other)
copy constructor
Definition yaspgridintersectioniterator.hh:57
│ │ │ │ +
Dune::YaspIntersection< GridImp > IntersectionImp
Definition yaspgridintersectioniterator.hh:26
│ │ │ │ +
Dune::Intersection< GridImp, IntersectionImp > Intersection
Definition yaspgridintersectioniterator.hh:27
│ │ │ │ +
void increment()
increment
Definition yaspgridintersectioniterator.hh:30
│ │ │ │ +
YaspIntersectionIterator & operator=(const YaspIntersectionIterator &other)
assignment
Definition yaspgridintersectioniterator.hh:62
│ │ │ │ +
YaspIntersectionIterator(const YaspEntity< 0, dim, GridImp > &myself, bool toend)
make intersection iterator from entity
Definition yaspgridintersectioniterator.hh:52
│ │ │ │ +
bool equals(const YaspIntersectionIterator &other) const
equality
Definition yaspgridintersectioniterator.hh:36
│ │ │ │ +
YaspIntersectionIterator()
Definition yaspgridintersectioniterator.hh:48
│ │ │ │ +
YaspIntersection provides data about intersection with neighboring codim 0 entities.
Definition yaspgridintersection.hh:22
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,111 +1,128 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _y_a_s_p_g_r_i_d │ │ │ │ │ -yaspgridgeometry.hh │ │ │ │ │ +yaspgridintersectioniterator.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 © 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_GRID_YASPGRIDINTERSECTIONITERATOR_HH │ │ │ │ │ +6#define DUNE_GRID_YASPGRIDINTERSECTIONITERATOR_HH │ │ │ │ │ 7 │ │ │ │ │ -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 │ │ │ │ │ +15namespace _D_u_n_e { │ │ │ │ │ +16 │ │ │ │ │ +20 template │ │ │ │ │ +_2_1 class _Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ +22 { │ │ │ │ │ +23 constexpr static int dim = GridImp::dimension; │ │ │ │ │ +24 public: │ │ │ │ │ +25 // types used from grids │ │ │ │ │ +_2_6 typedef _D_u_n_e_:_:_Y_a_s_p_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; │ │ │ │ │ +_2_7 typedef _D_u_n_e_:_:_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_ _> _I_n_t_e_r_s_e_c_t_i_o_n; │ │ │ │ │ +28 │ │ │ │ │ +_3_0 void _i_n_c_r_e_m_e_n_t() │ │ │ │ │ 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 │ │ │ │ │ -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; │ │ │ │ │ +32 intersection_._i_m_p_l()._count += (intersection_._i_m_p_l()._count < 2*dim); │ │ │ │ │ +33 } │ │ │ │ │ +34 │ │ │ │ │ +_3_6 bool _e_q_u_a_l_s (const _Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r& other) const │ │ │ │ │ +37 { │ │ │ │ │ +38 return intersection_ == other.intersection_; │ │ │ │ │ +39 } │ │ │ │ │ +40 │ │ │ │ │ +_4_2 const _I_n_t_e_r_s_e_c_t_i_o_n & _d_e_r_e_f_e_r_e_n_c_e() const │ │ │ │ │ +43 { │ │ │ │ │ +44 intersection_._i_m_p_l().update(); │ │ │ │ │ +45 return intersection_; │ │ │ │ │ +46 } │ │ │ │ │ +47 │ │ │ │ │ +_4_8 _Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r() │ │ │ │ │ +49 {} │ │ │ │ │ 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) │ │ │ │ │ +_5_2 _Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r (const _Y_a_s_p_E_n_t_i_t_y_<_0_,_d_i_m_,_G_r_i_d_I_m_p_>& myself, bool │ │ │ │ │ +toend) │ │ │ │ │ +53 : intersection_(_I_n_t_e_r_s_e_c_t_i_o_n_I_m_p(myself, toend)) │ │ │ │ │ 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) │ │ │ │ │ +_5_7 _Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r (const _Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r& other) │ │ │ │ │ +58 : intersection_(other.intersection_) │ │ │ │ │ 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 │ │ │ │ │ +60 │ │ │ │ │ +_6_2 _Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r & _o_p_e_r_a_t_o_r_ _=_ (const _Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r& │ │ │ │ │ +other) │ │ │ │ │ +63 { │ │ │ │ │ +64 intersection_ = other.intersection_; │ │ │ │ │ +65 return *this; │ │ │ │ │ +66 } │ │ │ │ │ +67 │ │ │ │ │ +68 private: │ │ │ │ │ +69 // The intersection this iterator points to │ │ │ │ │ +70 mutable _I_n_t_e_r_s_e_c_t_i_o_n intersection_; │ │ │ │ │ +71 }; │ │ │ │ │ +72 │ │ │ │ │ +73} // namespace Dune │ │ │ │ │ +74 │ │ │ │ │ +75#endif // DUNE_GRID_YASPGRIDINTERSECTIONITERATOR_HH │ │ │ │ │ _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_:_:_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_:_:_Y_a_s_p_E_n_t_i_t_y │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:242 │ │ │ │ │ +_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_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 │ │ │ │ │ +const Intersection & dereference() const │ │ │ │ │ +dereferencing │ │ │ │ │ +DDeeffiinniittiioonn yaspgridintersectioniterator.hh:42 │ │ │ │ │ +_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_:_:_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(const YaspIntersectionIterator &other) │ │ │ │ │ +copy constructor │ │ │ │ │ +DDeeffiinniittiioonn yaspgridintersectioniterator.hh:57 │ │ │ │ │ +_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_:_:_I_n_t_e_r_s_e_c_t_i_o_n_I_m_p │ │ │ │ │ +Dune::YaspIntersection< GridImp > IntersectionImp │ │ │ │ │ +DDeeffiinniittiioonn yaspgridintersectioniterator.hh:26 │ │ │ │ │ +_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_:_:_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +Dune::Intersection< GridImp, IntersectionImp > Intersection │ │ │ │ │ +DDeeffiinniittiioonn yaspgridintersectioniterator.hh:27 │ │ │ │ │ +_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_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ +void increment() │ │ │ │ │ +increment │ │ │ │ │ +DDeeffiinniittiioonn yaspgridintersectioniterator.hh:30 │ │ │ │ │ +_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_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ +YaspIntersectionIterator & operator=(const YaspIntersectionIterator &other) │ │ │ │ │ +assignment │ │ │ │ │ +DDeeffiinniittiioonn yaspgridintersectioniterator.hh:62 │ │ │ │ │ +_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_:_:_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(const YaspEntity< 0, dim, GridImp > &myself, bool │ │ │ │ │ +toend) │ │ │ │ │ +make intersection iterator from entity │ │ │ │ │ +DDeeffiinniittiioonn yaspgridintersectioniterator.hh:52 │ │ │ │ │ +_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_:_:_e_q_u_a_l_s │ │ │ │ │ +bool equals(const YaspIntersectionIterator &other) const │ │ │ │ │ +equality │ │ │ │ │ +DDeeffiinniittiioonn yaspgridintersectioniterator.hh:36 │ │ │ │ │ +_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_:_:_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() │ │ │ │ │ +DDeeffiinniittiioonn yaspgridintersectioniterator.hh:48 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ +YaspIntersection provides data about intersection with neighboring codim 0 │ │ │ │ │ +entities. │ │ │ │ │ +DDeeffiinniittiioonn yaspgridintersection.hh:22 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00164.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00155.html │ │ │ │┄ Files 95% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: yaspgridintersection.hh File Reference │ │ │ │ +dune-grid: yaspgridintersectioniterator.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,38 +72,38 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
yaspgridintersection.hh File Reference
│ │ │ │ +
yaspgridintersectioniterator.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

The YaspIntersection class. │ │ │ │ +

The YaspIntersectionIterator 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...
class  Dune::YaspIntersectionIterator< GridImp >
 YaspIntersectionIterator enables iteration over intersections with neighboring codim 0 entities. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │

Detailed Description

│ │ │ │ -

The YaspIntersection class.

│ │ │ │ -

YaspIntersection provides data about intersection with neighboring codim 0 entities.

│ │ │ │ +

The YaspIntersectionIterator class.

│ │ │ │ +

YaspIntersectionIterator enables iteration over intersections with neighboring codim 0 entities.

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,25 +2,25 @@ │ │ │ │ │ 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 │ │ │ │ │ -yaspgridintersection.hh File Reference │ │ │ │ │ -The YaspIntersection class. _M_o_r_e_._._. │ │ │ │ │ +yaspgridintersectioniterator.hh File Reference │ │ │ │ │ +The YaspIntersectionIterator 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_t_e_r_s_e_c_t_i_o_n_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ -  _Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n provides data about intersection with neighboring │ │ │ │ │ - codim 0 entities. _M_o_r_e_._._. │ │ │ │ │ +class   _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_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ │ +  _Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r enables iteration over intersections with │ │ │ │ │ + neighboring codim 0 entities. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -The YaspIntersection class. │ │ │ │ │ -YaspIntersection provides data about intersection with neighboring codim 0 │ │ │ │ │ -entities. │ │ │ │ │ +The YaspIntersectionIterator class. │ │ │ │ │ +YaspIntersectionIterator enables iteration over intersections with neighboring │ │ │ │ │ +codim 0 entities. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00164_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00695_source.html │ │ │ │┄ Files 95% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: yaspgridintersection.hh Source File │ │ │ │ +dune-grid: refinement.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,405 +70,458 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
yaspgridintersection.hh
│ │ │ │ +
refinement.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │ +
5#ifndef DUNE_ALBERTA_REFINEMENT_HH
│ │ │ │ +
6#define DUNE_ALBERTA_REFINEMENT_HH
│ │ │ │
7
│ │ │ │ -
15namespace Dune {
│ │ │ │ -
16
│ │ │ │ -
20 template<class GridImp>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
22 {
│ │ │ │ -
23 constexpr static int dim = GridImp::dimension;
│ │ │ │ -
24 constexpr static int dimworld = GridImp::dimensionworld;
│ │ │ │ -
25 typedef typename GridImp::ctype ctype;
│ │ │ │ +
14#include <cassert>
│ │ │ │ +
15
│ │ │ │ + │ │ │ │ + │ │ │ │ +
18
│ │ │ │ +
19#if HAVE_ALBERTA
│ │ │ │ +
20
│ │ │ │ +
21namespace Dune
│ │ │ │ +
22{
│ │ │ │ +
23
│ │ │ │ +
24 namespace Alberta
│ │ │ │ +
25 {
│ │ │ │
26
│ │ │ │ -
27 typedef typename GridImp::Traits::template Codim< 1 >::GeometryImpl GeometryImpl;
│ │ │ │ -
28 typedef typename GridImp::Traits::template Codim< 1 >::LocalGeometryImpl LocalGeometryImpl;
│ │ │ │ +
27 // Internal Forward Declarations
│ │ │ │ +
28 // -----------------------------
│ │ │ │
29
│ │ │ │ -
30 friend class YaspIntersectionIterator<GridImp>;
│ │ │ │ -
31
│ │ │ │ -
32 public:
│ │ │ │ -
33 // types used from grids
│ │ │ │ -
34 typedef typename GridImp::YGridLevelIterator YGLI;
│ │ │ │ -
35 typedef typename GridImp::YGrid::Iterator I;
│ │ │ │ -
36 typedef typename GridImp::template Codim<0>::Entity Entity;
│ │ │ │ -
37 typedef typename GridImp::template Codim<1>::Geometry Geometry;
│ │ │ │ -
38 typedef typename GridImp::template Codim<1>::LocalGeometry LocalGeometry;
│ │ │ │ -
39
│ │ │ │ -
│ │ │ │ -
40 void update() {
│ │ │ │ -
41
│ │ │ │ -
42 // vector with per-direction movements
│ │ │ │ -
43 std::array<int,dim> dist{{0}};
│ │ │ │ -
44
│ │ │ │ -
45 // first move: back to center
│ │ │ │ -
46 dist[_dir] = 1 - 2*_face;
│ │ │ │ -
47
│ │ │ │ -
48 // update face info
│ │ │ │ -
49 _dir = _count / 2;
│ │ │ │ -
50 _face = _count % 2;
│ │ │ │ -
51
│ │ │ │ -
52 // second move: to new neighbor
│ │ │ │ -
53 dist[_dir] += -1 + 2*_face;
│ │ │ │ -
54
│ │ │ │ -
55 // move transforming iterator
│ │ │ │ -
56 _outside.transformingsubiterator().move(dist);
│ │ │ │ -
57 }
│ │ │ │ -
│ │ │ │ -
58
│ │ │ │ -
│ │ │ │ -
62 bool boundary () const
│ │ │ │ -
63 {
│ │ │ │ -
64 // Coordinate of intersection in its direction
│ │ │ │ -
65 int coord = _inside.transformingsubiterator().coord(_dir) + _face;
│ │ │ │ -
66 if (_inside.gridlevel()->mg->isPeriodic(_dir))
│ │ │ │ -
67 return false;
│ │ │ │ -
68 else
│ │ │ │ -
69 return coord == 0
│ │ │ │ -
70 ||
│ │ │ │ -
71 coord == _inside.gridlevel()->mg->levelSize(_inside.gridlevel()->level(),_dir);
│ │ │ │ -
72 }
│ │ │ │ -
│ │ │ │ -
73
│ │ │ │ -
│ │ │ │ -
75 bool neighbor () const
│ │ │ │ -
76 {
│ │ │ │ -
77 // Coordinate of intersection in its direction
│ │ │ │ -
78 int coord = _inside.transformingsubiterator().coord(_dir) + _face;
│ │ │ │ -
79 return coord > _inside.gridlevel()->overlap[0].dataBegin()->min(_dir)
│ │ │ │ -
80 &&
│ │ │ │ -
81 coord <= _inside.gridlevel()->overlap[0].dataBegin()->max(_dir);
│ │ │ │ -
82 }
│ │ │ │ -
│ │ │ │ -
83
│ │ │ │ -
│ │ │ │ -
85 bool conforming () const
│ │ │ │ -
86 {
│ │ │ │ -
87 return true;
│ │ │ │ -
88 }
│ │ │ │ -
│ │ │ │ -
89
│ │ │ │ -
│ │ │ │ -
92 Entity inside() const
│ │ │ │ -
93 {
│ │ │ │ -
94 return Entity(_inside);
│ │ │ │ -
95 }
│ │ │ │ -
│ │ │ │ -
96
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
99 {
│ │ │ │ -
100 return Entity(_outside);
│ │ │ │ -
101 }
│ │ │ │ -
│ │ │ │ -
102
│ │ │ │ +
30 template< int dim, int codim >
│ │ │ │ + │ │ │ │ +
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;
│ │ │ │ +
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 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 if(! boundary())
│ │ │ │ -
108 DUNE_THROW(GridError, "called boundarySegmentIndex while boundary() == false");
│ │ │ │ -
109 // size of local macro grid
│ │ │ │ -
110 const std::array<int, dim> & size = _inside.gridlevel()->mg->begin()->overlap[0].dataBegin()->size();
│ │ │ │ -
111 const std::array<int, dim> & origin = _inside.gridlevel()->mg->begin()->overlap[0].dataBegin()->origin();
│ │ │ │ -
112 std::array<int, dim> sides;
│ │ │ │ -
113 {
│ │ │ │ -
114 for (int i=0; i<dim; i++)
│ │ │ │ -
115 {
│ │ │ │ -
116 sides[i] =
│ │ │ │ -
117 ((_inside.gridlevel()->mg->begin()->overlap[0].dataBegin()->origin(i)
│ │ │ │ -
118 == 0)+
│ │ │ │ -
119 (_inside.gridlevel()->mg->begin()->overlap[0].dataBegin()->origin(i) +
│ │ │ │ -
120 _inside.gridlevel()->mg->begin()->overlap[0].dataBegin()->size(i)
│ │ │ │ -
121 ==
│ │ │ │ -
122 _inside.gridlevel()->mg->levelSize(0,i)));
│ │ │ │ -
123
│ │ │ │ -
124 }
│ │ │ │ -
125 }
│ │ │ │ -
126 // global position of the cell on macro grid
│ │ │ │ -
127 std::array<int, dim> pos = _inside.transformingsubiterator().coord();
│ │ │ │ -
128 for(int i=0; i<dim; i++)
│ │ │ │ -
129 {
│ │ │ │ -
130 pos[i] = pos[i] / (1<<_inside.level());
│ │ │ │ -
131 pos[i] = pos[i] - origin[i];
│ │ │ │ -
132 }
│ │ │ │ -
133 // compute unit-cube-face-sizes
│ │ │ │ -
134 std::array<int, dim> fsize;
│ │ │ │ -
135 {
│ │ │ │ -
136 int vol = 1;
│ │ │ │ -
137 for (int k=0; k<dim; k++)
│ │ │ │ -
138 vol *= size[k];
│ │ │ │ -
139 for (int k=0; k<dim; k++)
│ │ │ │ -
140 fsize[k] = vol/size[k];
│ │ │ │ -
141 }
│ │ │ │ -
142 // compute index in the unit-cube-face
│ │ │ │ -
143 int index = 0;
│ │ │ │ -
144 {
│ │ │ │ -
145 int localoffset = 1;
│ │ │ │ -
146 for (int k=dim-1; k>=0; k--)
│ │ │ │ -
147 {
│ │ │ │ -
148 if (k == _dir) continue;
│ │ │ │ -
149 index += (pos[k]) * localoffset;
│ │ │ │ -
150 localoffset *= size[k];
│ │ │ │ -
151 }
│ │ │ │ -
152 }
│ │ │ │ -
153 // add unit-cube-face-offsets
│ │ │ │ -
154 {
│ │ │ │ -
155 for (int k=0; k<_dir; k++)
│ │ │ │ -
156 index += sides[k] * fsize[k];
│ │ │ │ -
157 // add fsize if we are on the right face and there is a left-face-boundary on this processor
│ │ │ │ -
158 index += _face * (sides[_dir]>1) * fsize[_dir];
│ │ │ │ -
159 }
│ │ │ │ -
160
│ │ │ │ -
161 return index;
│ │ │ │ -
162 }
│ │ │ │ -
│ │ │ │ -
163
│ │ │ │ -
│ │ │ │ -
165 FieldVector<ctype, dimworld> outerNormal (const FieldVector<ctype, dim-1>& /* local */) const
│ │ │ │ -
166 {
│ │ │ │ -
167 return centerUnitOuterNormal();
│ │ │ │ -
168 }
│ │ │ │ -
│ │ │ │ -
169
│ │ │ │ -
│ │ │ │ -
171 FieldVector<ctype, dimworld> unitOuterNormal (const FieldVector<ctype, dim-1>& /* local */) const
│ │ │ │ -
172 {
│ │ │ │ -
173 return centerUnitOuterNormal();
│ │ │ │ -
174 }
│ │ │ │ -
│ │ │ │ -
175
│ │ │ │ -
│ │ │ │ -
177 FieldVector<ctype, dimworld> centerUnitOuterNormal () const
│ │ │ │ -
178 {
│ │ │ │ -
179 FieldVector<ctype, dimworld> normal(0);
│ │ │ │ -
180 normal[_dir] = (_face==0) ? -1.0 : 1.0;
│ │ │ │ -
181 return normal;
│ │ │ │ -
182 }
│ │ │ │ +
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
│ │ │ │ -
│ │ │ │ -
187 FieldVector<ctype, dimworld> integrationOuterNormal ([[maybe_unused]] const FieldVector<ctype, dim-1>& local) const
│ │ │ │ -
188 {
│ │ │ │ -
189 return geometry().volume() * centerUnitOuterNormal();
│ │ │ │ -
190 }
│ │ │ │ -
│ │ │ │ -
191
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
196 {
│ │ │ │ -
197 // set of dimensions that span the intersection
│ │ │ │ -
198 std::bitset<dim> s;
│ │ │ │ -
199 s.set();
│ │ │ │ -
200 s[_dir] = false;
│ │ │ │ -
201
│ │ │ │ -
202 // lower-left and upper-right corners
│ │ │ │ -
203 Dune::FieldVector<ctype, dim> ll(0.0);
│ │ │ │ -
204 Dune::FieldVector<ctype, dim> ur(1.0);
│ │ │ │ -
205
│ │ │ │ -
206 ll[_dir] = ur[_dir] = (_face==0) ? 0.0 : 1.0;
│ │ │ │ -
207
│ │ │ │ -
208 return LocalGeometry(LocalGeometryImpl(ll,ur,s));
│ │ │ │ -
209 }
│ │ │ │ -
│ │ │ │ -
210
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
215 {
│ │ │ │ -
216 // set of dimensions that span the intersection
│ │ │ │ -
217 std::bitset<dim> s;
│ │ │ │ -
218 s.set();
│ │ │ │ -
219 s[_dir] = false;
│ │ │ │ +
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 // lower-left and upper-right corners
│ │ │ │ -
222 Dune::FieldVector<ctype, dim> ll(0.0);
│ │ │ │ -
223 Dune::FieldVector<ctype, dim> ur(1.0);
│ │ │ │ -
224
│ │ │ │ -
225 ll[_dir] = ur[_dir] = (_face==1) ? 0.0 : 1.0;
│ │ │ │ -
226
│ │ │ │ -
227 return LocalGeometry(LocalGeometryImpl(ll,ur,s));
│ │ │ │ -
228 }
│ │ │ │ -
│ │ │ │ -
229
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
233 {
│ │ │ │ -
234
│ │ │ │ -
235 std::bitset<dim> shift;
│ │ │ │ -
236 shift.set();
│ │ │ │ -
237 shift[_dir] = false;
│ │ │ │ -
238
│ │ │ │ -
239 Dune::FieldVector<ctype,dimworld> ll, ur;
│ │ │ │ -
240 for (int i=0; i<dimworld; i++)
│ │ │ │ -
241 {
│ │ │ │ -
242 int coord = _inside.transformingsubiterator().coord(i);
│ │ │ │ -
243
│ │ │ │ -
244 if ((i == _dir) and (_face))
│ │ │ │ -
245 coord++;
│ │ │ │ -
246
│ │ │ │ -
247 ll[i] = _inside.transformingsubiterator().coordCont()->coordinate(i,coord);
│ │ │ │ -
248 if (i != _dir)
│ │ │ │ -
249 coord++;
│ │ │ │ -
250 ur[i] = _inside.transformingsubiterator().coordCont()->coordinate(i,coord);
│ │ │ │ -
251
│ │ │ │ -
252 // If on periodic overlap, transform coordinates by domain size
│ │ │ │ -
253 if (_inside.gridlevel()->mg->isPeriodic(i)) {
│ │ │ │ -
254 int coordPeriodic = _inside.transformingsubiterator().coord(i);
│ │ │ │ -
255 if (coordPeriodic < 0) {
│ │ │ │ -
256 auto size = _inside.gridlevel()->mg->domainSize()[i];
│ │ │ │ -
257 ll[i] += size;
│ │ │ │ -
258 ur[i] += size;
│ │ │ │ -
259 } else if (coordPeriodic + 1 > _inside.gridlevel()->mg->levelSize(_inside.gridlevel()->level(),i)) {
│ │ │ │ -
260 auto size = _inside.gridlevel()->mg->domainSize()[i];
│ │ │ │ -
261 ll[i] -= size;
│ │ │ │ -
262 ur[i] -= size;
│ │ │ │ -
263 }
│ │ │ │ -
264 }
│ │ │ │ -
265 }
│ │ │ │ -
266
│ │ │ │ -
267 GeometryImpl _is_global(ll,ur,shift);
│ │ │ │ -
268 return Geometry( _is_global );
│ │ │ │ -
269 }
│ │ │ │ -
│ │ │ │ -
270
│ │ │ │ -
│ │ │ │ -
272 GeometryType type () const
│ │ │ │ -
273 {
│ │ │ │ -
274 return GeometryTypes::cube(dim-1);
│ │ │ │ -
275 }
│ │ │ │ -
│ │ │ │ -
276
│ │ │ │ -
│ │ │ │ -
278 int indexInInside () const
│ │ │ │ -
279 {
│ │ │ │ -
280 return _count;
│ │ │ │ -
281 }
│ │ │ │ -
│ │ │ │ -
282
│ │ │ │ -
│ │ │ │ -
284 int indexInOutside () const
│ │ │ │ -
285 {
│ │ │ │ -
286 // flip the last bit
│ │ │ │ -
287 return _count^1;
│ │ │ │ -
288 }
│ │ │ │ -
│ │ │ │ -
289
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
291 : _count(~std::uint8_t(0)) // Use as marker for invalid intersection
│ │ │ │ -
292 , _dir(0)
│ │ │ │ -
293 , _face(0)
│ │ │ │ -
294 {}
│ │ │ │ -
│ │ │ │ -
295
│ │ │ │ -
│ │ │ │ -
297 YaspIntersection (const YaspEntity<0,dim,GridImp>& myself, bool toend) :
│ │ │ │ -
298 _inside(myself.gridlevel(),
│ │ │ │ -
299 myself.transformingsubiterator()),
│ │ │ │ -
300 _outside(myself.gridlevel(),
│ │ │ │ -
301 myself.transformingsubiterator()),
│ │ │ │ -
302 // initialize to first neighbor
│ │ │ │ -
303 _count(0),
│ │ │ │ -
304 _dir(0),
│ │ │ │ -
305 _face(0)
│ │ │ │ -
306 {
│ │ │ │ -
307 if (toend)
│ │ │ │ -
308 {
│ │ │ │ -
309 // initialize end iterator
│ │ │ │ -
310 _count = 2*dim;
│ │ │ │ -
311 return;
│ │ │ │ -
312 }
│ │ │ │ -
313 _count = 0;
│ │ │ │ -
314
│ │ │ │ -
315 // move transforming iterator
│ │ │ │ -
316 _outside.transformingsubiterator().move(_dir,-1);
│ │ │ │ -
317 }
│ │ │ │ -
│ │ │ │ -
318
│ │ │ │ -
320
│ │ │ │ -
│ │ │ │ -
322 void assign (const YaspIntersection& it)
│ │ │ │ -
323 {
│ │ │ │ -
324 *this = it;
│ │ │ │ -
325 }
│ │ │ │ -
│ │ │ │ -
326
│ │ │ │ -
│ │ │ │ -
327 bool equals(const YaspIntersection& other) const
│ │ │ │ -
328 {
│ │ │ │ -
329 // compare counts first -- that's cheaper if the test fails
│ │ │ │ -
330 return _count == other._count && _inside.equals(other._inside);
│ │ │ │ -
331 }
│ │ │ │ -
│ │ │ │ -
332
│ │ │ │ -
333 private:
│ │ │ │ -
334 /* The two entities that make up the intersection */
│ │ │ │ - │ │ │ │ - │ │ │ │ -
337 /* current position */
│ │ │ │ -
338 std::uint8_t _count;
│ │ │ │ -
339 std::uint8_t _dir;
│ │ │ │ -
340 std::uint8_t _face;
│ │ │ │ -
341 };
│ │ │ │ -
│ │ │ │ -
342} // namespace Dune
│ │ │ │ -
343
│ │ │ │ -
344#endif // DUNE_GRID_YASPGRIDINTERSECTION_HH
│ │ │ │ -
STL namespace.
│ │ │ │ +
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
│ │ │ │ +
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ │ + │ │ │ │ +
provides a wrapper for ALBERTA's el_info structure
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Base class for exceptions in Dune grid modules.
Definition exceptions.hh:20
│ │ │ │ -
Definition yaspgridentity.hh:242
│ │ │ │ -
int level() const
level of this element
Definition yaspgridentity.hh:256
│ │ │ │ -
const YGLI & gridlevel() const
Definition yaspgridentity.hh:394
│ │ │ │ -
const I & transformingsubiterator() const
Definition yaspgridentity.hh:393
│ │ │ │ -
bool equals(const YaspEntity &e) const
Return true when two iterators over the same grid are equal (!).
Definition yaspgridentity.hh:321
│ │ │ │ -
YaspIntersectionIterator enables iteration over intersections with neighboring codim 0 entities.
Definition yaspgridintersectioniterator.hh:22
│ │ │ │ -
YaspIntersection provides data about intersection with neighboring codim 0 entities.
Definition yaspgridintersection.hh:22
│ │ │ │ -
FieldVector< ctype, dimworld > centerUnitOuterNormal() const
return unit outer normal at center of intersection geometry
Definition yaspgridintersection.hh:177
│ │ │ │ -
bool equals(const YaspIntersection &other) const
Definition yaspgridintersection.hh:327
│ │ │ │ -
Entity inside() const
Definition yaspgridintersection.hh:92
│ │ │ │ -
Geometry geometry() const
Definition yaspgridintersection.hh:232
│ │ │ │ -
GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
Definition yaspgridintersection.hh:38
│ │ │ │ -
YaspIntersection()
Definition yaspgridintersection.hh:290
│ │ │ │ -
int indexInOutside() const
local index of codim 1 entity in neighbor where intersection is contained in
Definition yaspgridintersection.hh:284
│ │ │ │ -
LocalGeometry geometryInInside() const
Definition yaspgridintersection.hh:195
│ │ │ │ -
int boundarySegmentIndex() const
Definition yaspgridintersection.hh:105
│ │ │ │ -
GridImp::template Codim< 1 >::Geometry Geometry
Definition yaspgridintersection.hh:37
│ │ │ │ -
bool conforming() const
Yasp is always conform.
Definition yaspgridintersection.hh:85
│ │ │ │ -
GridImp::template Codim< 0 >::Entity Entity
Definition yaspgridintersection.hh:36
│ │ │ │ -
bool neighbor() const
return true if neighbor across intersection exists in this processor
Definition yaspgridintersection.hh:75
│ │ │ │ -
FieldVector< ctype, dimworld > outerNormal(const FieldVector< ctype, dim-1 > &) const
return unit outer normal, this should be dependent on local coordinates for higher order boundary
Definition yaspgridintersection.hh:165
│ │ │ │ -
YaspIntersection(const YaspEntity< 0, dim, GridImp > &myself, bool toend)
make intersection iterator from entity, initialize to first neighbor
Definition yaspgridintersection.hh:297
│ │ │ │ -
GeometryType type() const
obtain the type of reference element for this intersection
Definition yaspgridintersection.hh:272
│ │ │ │ -
void assign(const YaspIntersection &it)
copy constructor – use default
Definition yaspgridintersection.hh:322
│ │ │ │ -
int indexInInside() const
local index of codim 1 entity in self where intersection is contained in
Definition yaspgridintersection.hh:278
│ │ │ │ -
FieldVector< ctype, dimworld > integrationOuterNormal(const FieldVector< ctype, dim-1 > &local) const
Definition yaspgridintersection.hh:187
│ │ │ │ -
GridImp::YGrid::Iterator I
Definition yaspgridintersection.hh:35
│ │ │ │ -
LocalGeometry geometryInOutside() const
Definition yaspgridintersection.hh:214
│ │ │ │ -
GridImp::YGridLevelIterator YGLI
Definition yaspgridintersection.hh:34
│ │ │ │ -
Entity outside() const
return Entity on the outside of this intersection
Definition yaspgridintersection.hh:98
│ │ │ │ -
bool boundary() const
Definition yaspgridintersection.hh:62
│ │ │ │ -
FieldVector< ctype, dimworld > unitOuterNormal(const FieldVector< ctype, dim-1 > &) const
return unit outer normal, this should be dependent on local coordinates for higher order boundary
Definition yaspgridintersection.hh:171
│ │ │ │ -
void update()
Definition yaspgridintersection.hh:40
│ │ │ │ +
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
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,453 +1,454 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ - * _y_a_s_p_g_r_i_d │ │ │ │ │ -yaspgridintersection.hh │ │ │ │ │ + * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ +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 © 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 │ │ │ │ │ +5#ifndef DUNE_ALBERTA_REFINEMENT_HH │ │ │ │ │ +6#define DUNE_ALBERTA_REFINEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ -15namespace _D_u_n_e { │ │ │ │ │ -16 │ │ │ │ │ -20 template │ │ │ │ │ -_2_1 class _Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -22 { │ │ │ │ │ -23 constexpr static int dim = GridImp::dimension; │ │ │ │ │ -24 constexpr static int dimworld = GridImp::dimensionworld; │ │ │ │ │ -25 typedef typename GridImp::ctype ctype; │ │ │ │ │ +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 typedef typename GridImp::Traits::template Codim< 1 >::GeometryImpl │ │ │ │ │ -GeometryImpl; │ │ │ │ │ -_2_8 typedef typename GridImp::Traits::template Codim< 1 >::LocalGeometryImpl │ │ │ │ │ -LocalGeometryImpl; │ │ │ │ │ +27 // Internal Forward Declarations │ │ │ │ │ +28 // ----------------------------- │ │ │ │ │ 29 │ │ │ │ │ -30 friend class _Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r; │ │ │ │ │ -31 │ │ │ │ │ -32 public: │ │ │ │ │ -33 // types used from grids │ │ │ │ │ -_3_4 typedef typename GridImp::YGridLevelIterator _Y_G_L_I; │ │ │ │ │ -_3_5 typedef typename GridImp::YGrid::Iterator _I; │ │ │ │ │ -_3_6 typedef typename GridImp::template Codim<0>::Entity _E_n_t_i_t_y; │ │ │ │ │ -_3_7 typedef typename GridImp::template Codim<1>::Geometry _G_e_o_m_e_t_r_y; │ │ │ │ │ -_3_8 typedef typename GridImp::template Codim<1>::LocalGeometry _L_o_c_a_l_G_e_o_m_e_t_r_y; │ │ │ │ │ -39 │ │ │ │ │ -_4_0 void _u_p_d_a_t_e() { │ │ │ │ │ -41 │ │ │ │ │ -42 // vector with per-direction movements │ │ │ │ │ -43 std::array dist{{0}}; │ │ │ │ │ -44 │ │ │ │ │ -45 // first move: back to center │ │ │ │ │ -46 dist[_dir] = 1 - 2*_face; │ │ │ │ │ -47 │ │ │ │ │ -48 // update face info │ │ │ │ │ -49 _dir = _count / 2; │ │ │ │ │ -50 _face = _count % 2; │ │ │ │ │ -51 │ │ │ │ │ -52 // second move: to new neighbor │ │ │ │ │ -53 dist[_dir] += -1 + 2*_face; │ │ │ │ │ -54 │ │ │ │ │ -55 // move transforming iterator │ │ │ │ │ -56 _outside._t_r_a_n_s_f_o_r_m_i_n_g_s_u_b_i_t_e_r_a_t_o_r().move(dist); │ │ │ │ │ -57 } │ │ │ │ │ -58 │ │ │ │ │ -_6_2 bool _b_o_u_n_d_a_r_y () const │ │ │ │ │ -63 { │ │ │ │ │ -64 // Coordinate of intersection in its direction │ │ │ │ │ -65 int coord = _inside._t_r_a_n_s_f_o_r_m_i_n_g_s_u_b_i_t_e_r_a_t_o_r().coord(_dir) + _face; │ │ │ │ │ -66 if (_inside._g_r_i_d_l_e_v_e_l()->mg->isPeriodic(_dir)) │ │ │ │ │ -67 return false; │ │ │ │ │ -68 else │ │ │ │ │ -69 return coord == 0 │ │ │ │ │ -70 || │ │ │ │ │ -71 coord == _inside._g_r_i_d_l_e_v_e_l()->mg->levelSize(_inside._g_r_i_d_l_e_v_e_l()->level │ │ │ │ │ -(),_dir); │ │ │ │ │ -72 } │ │ │ │ │ -73 │ │ │ │ │ -_7_5 bool _n_e_i_g_h_b_o_r () const │ │ │ │ │ -76 { │ │ │ │ │ -77 // Coordinate of intersection in its direction │ │ │ │ │ -78 int coord = _inside._t_r_a_n_s_f_o_r_m_i_n_g_s_u_b_i_t_e_r_a_t_o_r().coord(_dir) + _face; │ │ │ │ │ -79 return coord > _inside._g_r_i_d_l_e_v_e_l()->overlap[0].dataBegin()->min(_dir) │ │ │ │ │ -80 && │ │ │ │ │ -81 coord <= _inside._g_r_i_d_l_e_v_e_l()->overlap[0].dataBegin()->max(_dir); │ │ │ │ │ -82 } │ │ │ │ │ -83 │ │ │ │ │ -_8_5 bool _c_o_n_f_o_r_m_i_n_g () const │ │ │ │ │ -86 { │ │ │ │ │ -87 return true; │ │ │ │ │ -88 } │ │ │ │ │ -89 │ │ │ │ │ -_9_2 _E_n_t_i_t_y _i_n_s_i_d_e() const │ │ │ │ │ -93 { │ │ │ │ │ -94 return _E_n_t_i_t_y(_inside); │ │ │ │ │ -95 } │ │ │ │ │ -96 │ │ │ │ │ -_9_8 _E_n_t_i_t_y _o_u_t_s_i_d_e() const │ │ │ │ │ -99 { │ │ │ │ │ -100 return _E_n_t_i_t_y(_outside); │ │ │ │ │ -101 } │ │ │ │ │ -102 │ │ │ │ │ -_1_0_5 int _b_o_u_n_d_a_r_y_S_e_g_m_e_n_t_I_n_d_e_x() const │ │ │ │ │ +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 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 │ │ │ │ │ +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 if(! _b_o_u_n_d_a_r_y()) │ │ │ │ │ -108 DUNE_THROW(_G_r_i_d_E_r_r_o_r, "called boundarySegmentIndex while boundary() == │ │ │ │ │ -false"); │ │ │ │ │ -109 // size of local macro grid │ │ │ │ │ -110 const std::array & size = _inside._g_r_i_d_l_e_v_e_l()->mg->begin()- │ │ │ │ │ ->overlap[0].dataBegin()->size(); │ │ │ │ │ -111 const std::array & origin = _inside._g_r_i_d_l_e_v_e_l()->mg->begin()- │ │ │ │ │ ->overlap[0].dataBegin()->origin(); │ │ │ │ │ -112 std::array sides; │ │ │ │ │ -113 { │ │ │ │ │ -114 for (int i=0; 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 sides[i] = │ │ │ │ │ -117 ((_inside._g_r_i_d_l_e_v_e_l()->mg->begin()->overlap[0].dataBegin()->origin(i) │ │ │ │ │ -118 == 0)+ │ │ │ │ │ -119 (_inside._g_r_i_d_l_e_v_e_l()->mg->begin()->overlap[0].dataBegin()->origin(i) + │ │ │ │ │ -120 _inside._g_r_i_d_l_e_v_e_l()->mg->begin()->overlap[0].dataBegin()->size(i) │ │ │ │ │ -121 == │ │ │ │ │ -122 _inside._g_r_i_d_l_e_v_e_l()->mg->levelSize(0,i))); │ │ │ │ │ +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 } │ │ │ │ │ -125 } │ │ │ │ │ -126 // global position of the cell on macro grid │ │ │ │ │ -127 std::array pos = _inside._t_r_a_n_s_f_o_r_m_i_n_g_s_u_b_i_t_e_r_a_t_o_r().coord(); │ │ │ │ │ -128 for(int i=0; i fsize; │ │ │ │ │ -135 { │ │ │ │ │ -136 int vol = 1; │ │ │ │ │ -137 for (int k=0; k=0; k--) │ │ │ │ │ -147 { │ │ │ │ │ -148 if (k == _dir) continue; │ │ │ │ │ -149 index += (pos[k]) * localoffset; │ │ │ │ │ -150 localoffset *= size[k]; │ │ │ │ │ -151 } │ │ │ │ │ -152 } │ │ │ │ │ -153 // add unit-cube-face-offsets │ │ │ │ │ -154 { │ │ │ │ │ -155 for (int k=0; k<_dir; k++) │ │ │ │ │ -156 index += sides[k] * fsize[k]; │ │ │ │ │ -157 // add fsize if we are on the right face and there is a left-face-boundary │ │ │ │ │ -on this processor │ │ │ │ │ -158 index += _face * (sides[_dir]>1) * fsize[_dir]; │ │ │ │ │ -159 } │ │ │ │ │ -160 │ │ │ │ │ -161 return index; │ │ │ │ │ +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 │ │ │ │ │ -_1_6_5 FieldVector _o_u_t_e_r_N_o_r_m_a_l (const FieldVector& │ │ │ │ │ -/* local */) const │ │ │ │ │ -166 { │ │ │ │ │ -167 return _c_e_n_t_e_r_U_n_i_t_O_u_t_e_r_N_o_r_m_a_l(); │ │ │ │ │ -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 { │ │ │ │ │ -173 return _c_e_n_t_e_r_U_n_i_t_O_u_t_e_r_N_o_r_m_a_l(); │ │ │ │ │ -174 } │ │ │ │ │ -175 │ │ │ │ │ -_1_7_7 FieldVector _c_e_n_t_e_r_U_n_i_t_O_u_t_e_r_N_o_r_m_a_l () const │ │ │ │ │ -178 { │ │ │ │ │ -179 FieldVector normal(0); │ │ │ │ │ -180 normal[_dir] = (_face==0) ? -1.0 : 1.0; │ │ │ │ │ -181 return normal; │ │ │ │ │ -182 } │ │ │ │ │ +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 │ │ │ │ │ -_1_8_7 FieldVector _i_n_t_e_g_r_a_t_i_o_n_O_u_t_e_r_N_o_r_m_a_l ([[maybe_unused]] const │ │ │ │ │ -FieldVector& local) const │ │ │ │ │ -188 { │ │ │ │ │ -189 return _g_e_o_m_e_t_r_y().volume() * _c_e_n_t_e_r_U_n_i_t_O_u_t_e_r_N_o_r_m_a_l(); │ │ │ │ │ -190 } │ │ │ │ │ -191 │ │ │ │ │ -_1_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_I_n_s_i_d_e () const │ │ │ │ │ -196 { │ │ │ │ │ -197 // set of dimensions that span the intersection │ │ │ │ │ -198 std::bitset s; │ │ │ │ │ -199 s.set(); │ │ │ │ │ -200 s[_dir] = false; │ │ │ │ │ -201 │ │ │ │ │ -202 // lower-left and upper-right corners │ │ │ │ │ -203 Dune::FieldVector ll(0.0); │ │ │ │ │ -204 Dune::FieldVector ur(1.0); │ │ │ │ │ -205 │ │ │ │ │ -206 ll[_dir] = ur[_dir] = (_face==0) ? 0.0 : 1.0; │ │ │ │ │ -207 │ │ │ │ │ -208 return _L_o_c_a_l_G_e_o_m_e_t_r_y(LocalGeometryImpl(ll,ur,s)); │ │ │ │ │ -209 } │ │ │ │ │ -210 │ │ │ │ │ -_2_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_O_u_t_s_i_d_e () const │ │ │ │ │ -215 { │ │ │ │ │ -216 // set of dimensions that span the intersection │ │ │ │ │ -217 std::bitset s; │ │ │ │ │ -218 s.set(); │ │ │ │ │ -219 s[_dir] = false; │ │ │ │ │ +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 // lower-left and upper-right corners │ │ │ │ │ -222 Dune::FieldVector ll(0.0); │ │ │ │ │ -223 Dune::FieldVector ur(1.0); │ │ │ │ │ -224 │ │ │ │ │ -225 ll[_dir] = ur[_dir] = (_face==1) ? 0.0 : 1.0; │ │ │ │ │ -226 │ │ │ │ │ -227 return _L_o_c_a_l_G_e_o_m_e_t_r_y(LocalGeometryImpl(ll,ur,s)); │ │ │ │ │ -228 } │ │ │ │ │ -229 │ │ │ │ │ -_2_3_2 _G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y () const │ │ │ │ │ -233 { │ │ │ │ │ -234 │ │ │ │ │ -235 std::bitset shift; │ │ │ │ │ -236 shift.set(); │ │ │ │ │ -237 shift[_dir] = false; │ │ │ │ │ -238 │ │ │ │ │ -239 Dune::FieldVector ll, ur; │ │ │ │ │ -240 for (int i=0; icoordinate(i,coord); │ │ │ │ │ -248 if (i != _dir) │ │ │ │ │ -249 coord++; │ │ │ │ │ -250 ur[i] = _inside._t_r_a_n_s_f_o_r_m_i_n_g_s_u_b_i_t_e_r_a_t_o_r().coordCont()->coordinate(i,coord); │ │ │ │ │ -251 │ │ │ │ │ -252 // If on periodic overlap, transform coordinates by domain size │ │ │ │ │ -253 if (_inside._g_r_i_d_l_e_v_e_l()->mg->isPeriodic(i)) { │ │ │ │ │ -254 int coordPeriodic = _inside._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); │ │ │ │ │ -255 if (coordPeriodic < 0) { │ │ │ │ │ -256 auto size = _inside._g_r_i_d_l_e_v_e_l()->mg->domainSize()[i]; │ │ │ │ │ -257 ll[i] += size; │ │ │ │ │ -258 ur[i] += size; │ │ │ │ │ -259 } else if (coordPeriodic + 1 > _inside._g_r_i_d_l_e_v_e_l()->mg->levelSize │ │ │ │ │ -(_inside._g_r_i_d_l_e_v_e_l()->level(),i)) { │ │ │ │ │ -260 auto size = _inside._g_r_i_d_l_e_v_e_l()->mg->domainSize()[i]; │ │ │ │ │ -261 ll[i] -= size; │ │ │ │ │ -262 ur[i] -= size; │ │ │ │ │ -263 } │ │ │ │ │ -264 } │ │ │ │ │ -265 } │ │ │ │ │ -266 │ │ │ │ │ -267 GeometryImpl _is_global(ll,ur,shift); │ │ │ │ │ -268 return _G_e_o_m_e_t_r_y( _is_global ); │ │ │ │ │ -269 } │ │ │ │ │ -270 │ │ │ │ │ -_2_7_2 GeometryType _t_y_p_e () const │ │ │ │ │ +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 return GeometryTypes::cube(dim-1); │ │ │ │ │ -275 } │ │ │ │ │ -276 │ │ │ │ │ -_2_7_8 int _i_n_d_e_x_I_n_I_n_s_i_d_e () const │ │ │ │ │ -279 { │ │ │ │ │ -280 return _count; │ │ │ │ │ +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 │ │ │ │ │ -_2_8_4 int _i_n_d_e_x_I_n_O_u_t_s_i_d_e () const │ │ │ │ │ -285 { │ │ │ │ │ -286 // flip the last bit │ │ │ │ │ -287 return _count^1; │ │ │ │ │ -288 } │ │ │ │ │ -289 │ │ │ │ │ -_2_9_0 _Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n() │ │ │ │ │ -291 : _count(~_s_t_d::uint8_t(0)) // Use as marker for invalid intersection │ │ │ │ │ -292 , _dir(0) │ │ │ │ │ -293 , _face(0) │ │ │ │ │ -294 {} │ │ │ │ │ -295 │ │ │ │ │ -_2_9_7 _Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n (const _Y_a_s_p_E_n_t_i_t_y_<_0_,_d_i_m_,_G_r_i_d_I_m_p_>& myself, bool toend) : │ │ │ │ │ -298 _inside(myself.gridlevel(), │ │ │ │ │ -299 myself.transformingsubiterator()), │ │ │ │ │ -300 _outside(myself.gridlevel(), │ │ │ │ │ -301 myself.transformingsubiterator()), │ │ │ │ │ -302 // initialize to first neighbor │ │ │ │ │ -303 _count(0), │ │ │ │ │ -304 _dir(0), │ │ │ │ │ -305 _face(0) │ │ │ │ │ -306 { │ │ │ │ │ -307 if (toend) │ │ │ │ │ -308 { │ │ │ │ │ -309 // initialize end iterator │ │ │ │ │ -310 _count = 2*dim; │ │ │ │ │ -311 return; │ │ │ │ │ -312 } │ │ │ │ │ -313 _count = 0; │ │ │ │ │ -314 │ │ │ │ │ -315 // move transforming iterator │ │ │ │ │ -316 _outside._t_r_a_n_s_f_o_r_m_i_n_g_s_u_b_i_t_e_r_a_t_o_r().move(_dir,-1); │ │ │ │ │ -317 } │ │ │ │ │ -318 │ │ │ │ │ -320 │ │ │ │ │ -_3_2_2 void _a_s_s_i_g_n (const _Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n& it) │ │ │ │ │ -323 { │ │ │ │ │ -324 *this = it; │ │ │ │ │ -325 } │ │ │ │ │ -326 │ │ │ │ │ -_3_2_7 bool _e_q_u_a_l_s(const _Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n& other) const │ │ │ │ │ -328 { │ │ │ │ │ -329 // compare counts first -- that's cheaper if the test fails │ │ │ │ │ -330 return _count == other._count && _inside._e_q_u_a_l_s(other._inside); │ │ │ │ │ -331 } │ │ │ │ │ -332 │ │ │ │ │ -333 private: │ │ │ │ │ -334 /* The two entities that make up the intersection */ │ │ │ │ │ -335 _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_> _inside; │ │ │ │ │ -336 _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_> _outside; │ │ │ │ │ -337 /* current position */ │ │ │ │ │ -338 std::uint8_t _count; │ │ │ │ │ -339 std::uint8_t _dir; │ │ │ │ │ -340 std::uint8_t _face; │ │ │ │ │ -341 }; │ │ │ │ │ -342} // namespace Dune │ │ │ │ │ -343 │ │ │ │ │ -344#endif // DUNE_GRID_YASPGRIDINTERSECTION_HH │ │ │ │ │ -_s_t_d │ │ │ │ │ -STL namespace. │ │ │ │ │ +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 │ │ │ │ │ +_A_L_B_E_R_T_A │ │ │ │ │ +#define ALBERTA │ │ │ │ │ +DDeeffiinniittiioonn albertaheader.hh:29 │ │ │ │ │ +_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 │ │ │ │ │ _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_E_n_t_i_t_y │ │ │ │ │ -DDeeffiinniittiioonn yaspgridentity.hh:242 │ │ │ │ │ -_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:256 │ │ │ │ │ -_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:394 │ │ │ │ │ -_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:393 │ │ │ │ │ -_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:321 │ │ │ │ │ -_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_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -YaspIntersection provides data about intersection with neighboring codim 0 │ │ │ │ │ -entities. │ │ │ │ │ -DDeeffiinniittiioonn yaspgridintersection.hh:22 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_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 │ │ │ │ │ -FieldVector< ctype, dimworld > centerUnitOuterNormal() const │ │ │ │ │ -return unit outer normal at center of intersection geometry │ │ │ │ │ -DDeeffiinniittiioonn yaspgridintersection.hh:177 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_:_:_e_q_u_a_l_s │ │ │ │ │ -bool equals(const YaspIntersection &other) const │ │ │ │ │ -DDeeffiinniittiioonn yaspgridintersection.hh:327 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_:_:_i_n_s_i_d_e │ │ │ │ │ -Entity inside() const │ │ │ │ │ -DDeeffiinniittiioonn yaspgridintersection.hh:92 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_:_:_g_e_o_m_e_t_r_y │ │ │ │ │ -Geometry geometry() const │ │ │ │ │ -DDeeffiinniittiioonn yaspgridintersection.hh:232 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_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 yaspgridintersection.hh:38 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_:_:_Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -YaspIntersection() │ │ │ │ │ -DDeeffiinniittiioonn yaspgridintersection.hh:290 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_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 index of codim 1 entity in neighbor where intersection is contained in │ │ │ │ │ -DDeeffiinniittiioonn yaspgridintersection.hh:284 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_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 yaspgridintersection.hh:195 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_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 │ │ │ │ │ -int boundarySegmentIndex() const │ │ │ │ │ -DDeeffiinniittiioonn yaspgridintersection.hh:105 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_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 yaspgridintersection.hh:37 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_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 │ │ │ │ │ -Yasp is always conform. │ │ │ │ │ -DDeeffiinniittiioonn yaspgridintersection.hh:85 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_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 yaspgridintersection.hh:36 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_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 neighbor across intersection exists in this processor │ │ │ │ │ -DDeeffiinniittiioonn yaspgridintersection.hh:75 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_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 > &) │ │ │ │ │ -const │ │ │ │ │ -return unit outer normal, this should be dependent on local coordinates for │ │ │ │ │ -higher order boundary │ │ │ │ │ -DDeeffiinniittiioonn yaspgridintersection.hh:165 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_:_:_Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -YaspIntersection(const YaspEntity< 0, dim, GridImp > &myself, bool toend) │ │ │ │ │ -make intersection iterator from entity, initialize to first neighbor │ │ │ │ │ -DDeeffiinniittiioonn yaspgridintersection.hh:297 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_:_:_t_y_p_e │ │ │ │ │ -GeometryType type() const │ │ │ │ │ -obtain the type of reference element for this intersection │ │ │ │ │ -DDeeffiinniittiioonn yaspgridintersection.hh:272 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_:_:_a_s_s_i_g_n │ │ │ │ │ -void assign(const YaspIntersection &it) │ │ │ │ │ -copy constructor – use default │ │ │ │ │ -DDeeffiinniittiioonn yaspgridintersection.hh:322 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_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 self where intersection is contained in │ │ │ │ │ -DDeeffiinniittiioonn yaspgridintersection.hh:278 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_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 │ │ │ │ │ -DDeeffiinniittiioonn yaspgridintersection.hh:187 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_:_:_I │ │ │ │ │ -GridImp::YGrid::Iterator I │ │ │ │ │ -DDeeffiinniittiioonn yaspgridintersection.hh:35 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_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 yaspgridintersection.hh:214 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_:_:_Y_G_L_I │ │ │ │ │ -GridImp::YGridLevelIterator YGLI │ │ │ │ │ -DDeeffiinniittiioonn yaspgridintersection.hh:34 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_:_:_o_u_t_s_i_d_e │ │ │ │ │ -Entity outside() const │ │ │ │ │ -return Entity on the outside of this intersection │ │ │ │ │ -DDeeffiinniittiioonn yaspgridintersection.hh:98 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_:_:_b_o_u_n_d_a_r_y │ │ │ │ │ -bool boundary() const │ │ │ │ │ -DDeeffiinniittiioonn yaspgridintersection.hh:62 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_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 > &) const │ │ │ │ │ -return unit outer normal, this should be dependent on local coordinates for │ │ │ │ │ -higher order boundary │ │ │ │ │ -DDeeffiinniittiioonn yaspgridintersection.hh:171 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_:_:_u_p_d_a_t_e │ │ │ │ │ -void update() │ │ │ │ │ -DDeeffiinniittiioonn yaspgridintersection.hh:40 │ │ │ │ │ +_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 │ │ │ │ │ +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 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00188.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00182.html │ │ │ │┄ Files 99% similar despite different names │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │
yaspgrididset.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Go to the source code of this file.

│ │ │ │ +

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::YaspGlobalIdSet< GridImp >
 persistent, globally unique Ids More...
 
│ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00188_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00182_source.html │ │ │ │┄ Files 99% similar despite different names │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
yaspgrididset.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │
7
│ │ │ │
8
│ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00194.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00233.html │ │ │ │┄ Files 92% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: yaspgridintersectioniterator.hh File Reference │ │ │ │ +dune-grid: yaspgridentityseed.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,38 +72,37 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
yaspgridintersectioniterator.hh File Reference
│ │ │ │ +
yaspgridentityseed.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

The YaspIntersectionIterator class. │ │ │ │ +

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

│ │ │ │ │ │ │ │ -

Go to the source code of this file.

│ │ │ │ +

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::YaspIntersectionIterator< GridImp >
 YaspIntersectionIterator enables iteration over intersections with neighboring codim 0 entities. 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 YaspIntersectionIterator class.

│ │ │ │ -

YaspIntersectionIterator enables iteration over intersections with neighboring codim 0 entities.

│ │ │ │ +

The YaspEntitySeed class.

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,25 +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 │ │ │ │ │ -yaspgridintersectioniterator.hh File Reference │ │ │ │ │ -The YaspIntersectionIterator 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_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_ _> │ │ │ │ │ -  _Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r enables iteration over intersections with │ │ │ │ │ - neighboring codim 0 entities. _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 YaspIntersectionIterator class. │ │ │ │ │ -YaspIntersectionIterator enables iteration over intersections with neighboring │ │ │ │ │ -codim 0 entities. │ │ │ │ │ +The YaspEntitySeed class. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00194_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00233_source.html │ │ │ │┄ Files 78% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: yaspgridintersectioniterator.hh Source File │ │ │ │ +dune-grid: yaspgridentityseed.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,107 +74,82 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
yaspgridintersectioniterator.hh
│ │ │ │ +
yaspgridentityseed.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_YASPGRIDINTERSECTIONITERATOR_HH
│ │ │ │ -
6#define DUNE_GRID_YASPGRIDINTERSECTIONITERATOR_HH
│ │ │ │ +
5#ifndef DUNE_GRID_YASPGRIDENTITYSEED_HH
│ │ │ │ +
6#define DUNE_GRID_YASPGRIDENTITYSEED_HH
│ │ │ │
7
│ │ │ │ -
15namespace Dune {
│ │ │ │ -
16
│ │ │ │ -
20 template<class GridImp>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
22 {
│ │ │ │ -
23 constexpr static int dim = GridImp::dimension;
│ │ │ │ -
24 public:
│ │ │ │ -
25 // types used from grids
│ │ │ │ - │ │ │ │ - │ │ │ │ -
28
│ │ │ │ -
│ │ │ │ -
30 void increment()
│ │ │ │ -
31 {
│ │ │ │ -
32 intersection_.impl()._count += (intersection_.impl()._count < 2*dim);
│ │ │ │ -
33 }
│ │ │ │ -
│ │ │ │ -
34
│ │ │ │ -
│ │ │ │ -
36 bool equals (const YaspIntersectionIterator& other) const
│ │ │ │ -
37 {
│ │ │ │ -
38 return intersection_ == other.intersection_;
│ │ │ │ -
39 }
│ │ │ │ -
│ │ │ │ -
40
│ │ │ │ -
│ │ │ │ -
42 const Intersection & dereference() const
│ │ │ │ -
43 {
│ │ │ │ -
44 intersection_.impl().update();
│ │ │ │ -
45 return intersection_;
│ │ │ │ -
46 }
│ │ │ │ -
│ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ +
43
│ │ │ │ +
44 int level () const { return _l; }
│ │ │ │ +
45 const std::array<int, dim> & coord() const { return _c; }
│ │ │ │ +
46 int offset () const { return _o; }
│ │ │ │
47
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
49 {}
│ │ │ │ -
│ │ │ │ -
50
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
53 : intersection_(IntersectionImp(myself, toend))
│ │ │ │ -
54 {}
│ │ │ │ +
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
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
58 : intersection_(other.intersection_)
│ │ │ │ -
59 {}
│ │ │ │ -
│ │ │ │ -
60
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
63 {
│ │ │ │ -
64 intersection_ = other.intersection_;
│ │ │ │ -
65 return *this;
│ │ │ │ -
66 }
│ │ │ │ -
│ │ │ │ -
67
│ │ │ │ -
68 private:
│ │ │ │ -
69 // The intersection this iterator points to
│ │ │ │ -
70 mutable Intersection intersection_;
│ │ │ │ -
71 };
│ │ │ │ -
│ │ │ │ -
72
│ │ │ │ -
73} // namespace Dune
│ │ │ │ -
74
│ │ │ │ -
75#endif // DUNE_GRID_YASPGRIDINTERSECTIONITERATOR_HH
│ │ │ │ +
56#endif // DUNE_GRID_YASPGRIDENTITYSEED_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
│ │ │ │ -
Implementation & impl()
access to the underlying implementation
Definition common/intersection.hh:178
│ │ │ │ -
Definition yaspgridentity.hh:242
│ │ │ │ -
YaspIntersectionIterator enables iteration over intersections with neighboring codim 0 entities.
Definition yaspgridintersectioniterator.hh:22
│ │ │ │ -
const Intersection & dereference() const
dereferencing
Definition yaspgridintersectioniterator.hh:42
│ │ │ │ -
YaspIntersectionIterator(const YaspIntersectionIterator &other)
copy constructor
Definition yaspgridintersectioniterator.hh:57
│ │ │ │ -
Dune::YaspIntersection< GridImp > IntersectionImp
Definition yaspgridintersectioniterator.hh:26
│ │ │ │ -
Dune::Intersection< GridImp, IntersectionImp > Intersection
Definition yaspgridintersectioniterator.hh:27
│ │ │ │ -
void increment()
increment
Definition yaspgridintersectioniterator.hh:30
│ │ │ │ -
YaspIntersectionIterator & operator=(const YaspIntersectionIterator &other)
assignment
Definition yaspgridintersectioniterator.hh:62
│ │ │ │ -
YaspIntersectionIterator(const YaspEntity< 0, dim, GridImp > &myself, bool toend)
make intersection iterator from entity
Definition yaspgridintersectioniterator.hh:52
│ │ │ │ -
bool equals(const YaspIntersectionIterator &other) const
equality
Definition yaspgridintersectioniterator.hh:36
│ │ │ │ -
YaspIntersectionIterator()
Definition yaspgridintersectioniterator.hh:48
│ │ │ │ -
YaspIntersection provides data about intersection with neighboring codim 0 entities.
Definition yaspgridintersection.hh:22
│ │ │ │ +
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,128 +1,98 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _y_a_s_p_g_r_i_d │ │ │ │ │ -yaspgridintersectioniterator.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 © 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_YASPGRIDINTERSECTIONITERATOR_HH │ │ │ │ │ -6#define DUNE_GRID_YASPGRIDINTERSECTIONITERATOR_HH │ │ │ │ │ +5#ifndef DUNE_GRID_YASPGRIDENTITYSEED_HH │ │ │ │ │ +6#define DUNE_GRID_YASPGRIDENTITYSEED_HH │ │ │ │ │ 7 │ │ │ │ │ -15namespace _D_u_n_e { │ │ │ │ │ -16 │ │ │ │ │ -20 template │ │ │ │ │ -_2_1 class _Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ │ -22 { │ │ │ │ │ -23 constexpr static int dim = GridImp::dimension; │ │ │ │ │ -24 public: │ │ │ │ │ -25 // types used from grids │ │ │ │ │ -_2_6 typedef _D_u_n_e_:_:_Y_a_s_p_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; │ │ │ │ │ -_2_7 typedef _D_u_n_e_:_:_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_ _> _I_n_t_e_r_s_e_c_t_i_o_n; │ │ │ │ │ -28 │ │ │ │ │ -_3_0 void _i_n_c_r_e_m_e_n_t() │ │ │ │ │ -31 { │ │ │ │ │ -32 intersection_._i_m_p_l()._count += (intersection_._i_m_p_l()._count < 2*dim); │ │ │ │ │ -33 } │ │ │ │ │ -34 │ │ │ │ │ -_3_6 bool _e_q_u_a_l_s (const _Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r& other) const │ │ │ │ │ -37 { │ │ │ │ │ -38 return intersection_ == other.intersection_; │ │ │ │ │ -39 } │ │ │ │ │ -40 │ │ │ │ │ -_4_2 const _I_n_t_e_r_s_e_c_t_i_o_n & _d_e_r_e_f_e_r_e_n_c_e() const │ │ │ │ │ -43 { │ │ │ │ │ -44 intersection_._i_m_p_l().update(); │ │ │ │ │ -45 return intersection_; │ │ │ │ │ -46 } │ │ │ │ │ +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 } │ │ │ │ │ +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 │ │ │ │ │ -_4_8 _Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r() │ │ │ │ │ -49 {} │ │ │ │ │ -50 │ │ │ │ │ -_5_2 _Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r (const _Y_a_s_p_E_n_t_i_t_y_<_0_,_d_i_m_,_G_r_i_d_I_m_p_>& myself, bool │ │ │ │ │ -toend) │ │ │ │ │ -53 : intersection_(_I_n_t_e_r_s_e_c_t_i_o_n_I_m_p(myself, toend)) │ │ │ │ │ -54 {} │ │ │ │ │ +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 │ │ │ │ │ -_5_7 _Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r (const _Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r& other) │ │ │ │ │ -58 : intersection_(other.intersection_) │ │ │ │ │ -59 {} │ │ │ │ │ -60 │ │ │ │ │ -_6_2 _Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r & _o_p_e_r_a_t_o_r_ _=_ (const _Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r& │ │ │ │ │ -other) │ │ │ │ │ -63 { │ │ │ │ │ -64 intersection_ = other.intersection_; │ │ │ │ │ -65 return *this; │ │ │ │ │ -66 } │ │ │ │ │ -67 │ │ │ │ │ -68 private: │ │ │ │ │ -69 // The intersection this iterator points to │ │ │ │ │ -70 mutable _I_n_t_e_r_s_e_c_t_i_o_n intersection_; │ │ │ │ │ -71 }; │ │ │ │ │ -72 │ │ │ │ │ -73} // namespace Dune │ │ │ │ │ -74 │ │ │ │ │ -75#endif // DUNE_GRID_YASPGRIDINTERSECTIONITERATOR_HH │ │ │ │ │ +56#endif // DUNE_GRID_YASPGRIDENTITYSEED_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_:_:_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_:_:_Y_a_s_p_E_n_t_i_t_y │ │ │ │ │ -DDeeffiinniittiioonn yaspgridentity.hh:242 │ │ │ │ │ -_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_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 │ │ │ │ │ -const Intersection & dereference() const │ │ │ │ │ -dereferencing │ │ │ │ │ -DDeeffiinniittiioonn yaspgridintersectioniterator.hh:42 │ │ │ │ │ -_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_:_:_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(const YaspIntersectionIterator &other) │ │ │ │ │ -copy constructor │ │ │ │ │ -DDeeffiinniittiioonn yaspgridintersectioniterator.hh:57 │ │ │ │ │ -_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_:_:_I_n_t_e_r_s_e_c_t_i_o_n_I_m_p │ │ │ │ │ -Dune::YaspIntersection< GridImp > IntersectionImp │ │ │ │ │ -DDeeffiinniittiioonn yaspgridintersectioniterator.hh:26 │ │ │ │ │ -_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_:_:_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -Dune::Intersection< GridImp, IntersectionImp > Intersection │ │ │ │ │ -DDeeffiinniittiioonn yaspgridintersectioniterator.hh:27 │ │ │ │ │ -_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_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ │ -void increment() │ │ │ │ │ -increment │ │ │ │ │ -DDeeffiinniittiioonn yaspgridintersectioniterator.hh:30 │ │ │ │ │ -_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_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ -YaspIntersectionIterator & operator=(const YaspIntersectionIterator &other) │ │ │ │ │ -assignment │ │ │ │ │ -DDeeffiinniittiioonn yaspgridintersectioniterator.hh:62 │ │ │ │ │ -_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_:_:_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(const YaspEntity< 0, dim, GridImp > &myself, bool │ │ │ │ │ -toend) │ │ │ │ │ -make intersection iterator from entity │ │ │ │ │ -DDeeffiinniittiioonn yaspgridintersectioniterator.hh:52 │ │ │ │ │ -_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_:_:_e_q_u_a_l_s │ │ │ │ │ -bool equals(const YaspIntersectionIterator &other) const │ │ │ │ │ -equality │ │ │ │ │ -DDeeffiinniittiioonn yaspgridintersectioniterator.hh:36 │ │ │ │ │ -_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_:_:_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() │ │ │ │ │ -DDeeffiinniittiioonn yaspgridintersectioniterator.hh:48 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ │ -YaspIntersection provides data about intersection with neighboring codim 0 │ │ │ │ │ -entities. │ │ │ │ │ -DDeeffiinniittiioonn yaspgridintersection.hh:22 │ │ │ │ │ +_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 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/a00197.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00287.html │ │ │ │┄ Files 95% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: yaspgridleveliterator.hh File Reference │ │ │ │ +dune-grid: exceptions.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,44 +65,40 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
yaspgridleveliterator.hh File Reference
│ │ │ │ +
exceptions.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ -

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

│ │ │ │ - │ │ │ │ -

Go to the source code of this file.

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

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::GridError
 Base class for exceptions in Dune grid modules. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

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

Detailed Description

│ │ │ │ -

The YaspLevelIterator class.

│ │ │ │ -
│ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,23 +1,21 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ - * _y_a_s_p_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 │ │ │ │ │ -yaspgridleveliterator.hh File Reference │ │ │ │ │ -The YaspLevelIterator class. _M_o_r_e_._._. │ │ │ │ │ +exceptions.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_:_:_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_:_:_G_r_i_d_E_r_r_o_r │ │ │ │ │ +  Base class for exceptions in _D_u_n_e grid modules. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -The YaspLevelIterator class. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00197_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00608_source.html │ │ │ │┄ Files 78% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: yaspgridleveliterator.hh Source File │ │ │ │ +dune-grid: identity.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,95 +70,73 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
yaspgridleveliterator.hh
│ │ │ │ +
identity.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_GEOGRID_IDENTITY_HH
│ │ │ │ +
6#define DUNE_GEOGRID_IDENTITY_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 {}
│ │ │ │ + │ │ │ │ +
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
│ │ │ │ +
25 template< typename... Args >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
27 {}
│ │ │ │ +
│ │ │ │ +
28
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
30 {
│ │ │ │ +
31 return x;
│ │ │ │ +
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
│ │ │ │ +
34 };
│ │ │ │ +
│ │ │ │ +
35
│ │ │ │ +
36}
│ │ │ │ +
37
│ │ │ │ +
38#endif
│ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Definition yaspgridentity.hh:242
│ │ │ │ -
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
│ │ │ │ +
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,103 +1,71 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ - * _y_a_s_p_g_r_i_d │ │ │ │ │ -yaspgridleveliterator.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 © 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_GEOGRID_IDENTITY_HH │ │ │ │ │ +6#define DUNE_GEOGRID_IDENTITY_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 {} │ │ │ │ │ +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 │ │ │ │ │ +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 │ │ │ │ │ -_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 │ │ │ │ │ +34 }; │ │ │ │ │ +35 │ │ │ │ │ +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_E_n_t_i_t_y │ │ │ │ │ -DDeeffiinniittiioonn yaspgridentity.hh:242 │ │ │ │ │ -_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 │ │ │ │ │ +_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/a00215.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00614.html │ │ │ │┄ Files 91% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: yaspgridentity.hh File Reference │ │ │ │ +dune-grid: geometry.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,59 +65,64 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces
│ │ │ │ -
yaspgridentity.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Macros
│ │ │ │ +
geometry.cc File Reference
│ │ │ │ │ │ │ │
│ │ │ │ - │ │ │ │ -

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

│ │ │ │ -
#include <dune/common/math.hh>
│ │ │ │ -#include <dune/geometry/type.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.

│ │ │ │ +

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::YaspEntity< codim, dim, GridImp >
 
class  Dune::YaspEntity< 0, dim, GridImp >
 
struct  Dune::YaspEntity< 0, dim, GridImp >::Codim< cd >
struct  Dune::AlbertaGridLocalGeometryProvider< Grid >::GeoInFatherCoordReader< Grid >
 
class  Dune::YaspEntity< dim, dim, GridImp >
struct  Dune::AlbertaGridLocalGeometryProvider< Grid >::FaceCoordReader< Grid >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ +

│ │ │ │ Namespaces

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

│ │ │ │ +Macros

#define DUNE_ALBERTA_GEOMETRY_CC
 
│ │ │ │ -

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.

│ │ │ │ -
│ │ │ │ +

Macro Definition Documentation

│ │ │ │ + │ │ │ │ +

◆ DUNE_ALBERTA_GEOMETRY_CC

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
#define DUNE_ALBERTA_GEOMETRY_CC
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,39 +1,32 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ + * _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> │ │ │ │ │ _G_o_ _t_o_ _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_ _> │ │ │ │ │ +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_:_:_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_ _> │ │ │ │ │ +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. │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_Y_a_s_p │ │ │ │ │ +MMaaccrrooss │ │ │ │ │ +#define  _D_U_N_E___A_L_B_E_R_T_A___G_E_O_M_E_T_R_Y___C_C │ │ │ │ │   │ │ │ │ │ -********** 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. │ │ │ │ │ +********** 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/a00215_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00209_source.html │ │ │ │┄ Files 95% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: yaspgridentity.hh Source File │ │ │ │ +dune-grid: ygrid.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,1064 +74,1171 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
yaspgridentity.hh
│ │ │ │ +
ygrid.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_YASPGRIDENTITY_HH
│ │ │ │ -
6#define DUNE_GRID_YASPGRIDENTITY_HH
│ │ │ │ +
5#ifndef DUNE_GRID_YASPGRID_YGRID_HH
│ │ │ │ +
6#define DUNE_GRID_YASPGRID_YGRID_HH
│ │ │ │
7
│ │ │ │ -
8#include <dune/common/math.hh>
│ │ │ │ -
9#include <dune/geometry/type.hh>
│ │ │ │ -
10
│ │ │ │ -
24//========================================================================
│ │ │ │ -
25
│ │ │ │ -
26
│ │ │ │ -
27
│ │ │ │ -
28
│ │ │ │ -
29namespace Dune {
│ │ │ │ -
30
│ │ │ │ -
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 private:
│ │ │ │ -
47 // prevent construction
│ │ │ │ -
48 BinomialTable() = delete;
│ │ │ │ -
49
│ │ │ │ -
50 // compute binomial(r, c) and advance row `r` and column `c`
│ │ │ │ -
51 static constexpr int nextValue(int& r, int& c)
│ │ │ │ -
52 {
│ │ │ │ -
53 const auto result = Dune::binomial(r, c);
│ │ │ │ -
54
│ │ │ │ -
55 c += 1;
│ │ │ │ -
56 if (c > r) {
│ │ │ │ -
57 r += 1;
│ │ │ │ -
58 c = 0;
│ │ │ │ -
59 }
│ │ │ │ -
60
│ │ │ │ -
61 return result;
│ │ │ │ -
62 }
│ │ │ │ -
63
│ │ │ │ -
64 template<std::size_t... I>
│ │ │ │ -
65 static constexpr std::array<int, sizeof...(I)> computeValues(std::index_sequence<I...>)
│ │ │ │ -
66 {
│ │ │ │ -
67 int r = 0, c = 0;
│ │ │ │ -
68 return {{ ((void)I, nextValue(r, c))... }};
│ │ │ │ -
69 }
│ │ │ │ -
70
│ │ │ │ -
71 template<std::size_t... I>
│ │ │ │ -
72 static constexpr std::array<int, sizeof...(I)> computeOffsets(std::index_sequence<I...>)
│ │ │ │ -
73 { return {{ (I*(I+1)/2)... }}; }
│ │ │ │ -
74
│ │ │ │ -
75 static constexpr std::array<int,(n+1)*(n+2)/2> _values = computeValues(std::make_index_sequence<(n+1)*(n+2)/2>{});
│ │ │ │ -
76 static constexpr std::array<int,n+1> _offsets = computeOffsets(std::make_index_sequence<n+1>{});
│ │ │ │ -
77 };
│ │ │ │ -
78
│ │ │ │ -
85 template<int dimworld>
│ │ │ │ -
86 constexpr int subEnt(int d, int c)
│ │ │ │ -
87 {
│ │ │ │ -
88 return (d < c ? 0 : BinomialTable<dimworld>::evaluate(d,c) << c);
│ │ │ │ -
89 }
│ │ │ │ -
90
│ │ │ │ -
91 // Make a table mapping all subentities of a codim 0 entity to a value.
│ │ │ │ -
92 // F is the functor to be evaluated.
│ │ │ │ -
93 template<typename F, int dim>
│ │ │ │ -
94 struct EntityShiftTable
│ │ │ │ -
95 {
│ │ │ │ -
96 typedef std::bitset<dim> value_type;
│ │ │ │ -
97
│ │ │ │ -
98 static value_type evaluate(int i, int codim)
│ │ │ │ -
99 {
│ │ │ │ -
100 return {_values[_offsets[codim] + i]};
│ │ │ │ -
101 }
│ │ │ │ +
8#include <array>
│ │ │ │ +
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
│ │ │ │ -
103 private:
│ │ │ │ -
104
│ │ │ │ -
105 // prevent construction
│ │ │ │ -
106 EntityShiftTable() = delete;
│ │ │ │ -
107
│ │ │ │ -
108 // compute offset of codimension `codim` entities and advance `offset`
│ │ │ │ -
109 static constexpr int nextOffset(int& offset, int codim)
│ │ │ │ -
110 {
│ │ │ │ -
111 if (codim == 0) {
│ │ │ │ -
112 offset = 0;
│ │ │ │ -
113 return 0;
│ │ │ │ -
114 }
│ │ │ │ -
115
│ │ │ │ -
116 offset += subEnt<dim>(dim, codim-1);
│ │ │ │ -
117 return offset;
│ │ │ │ -
118 }
│ │ │ │ -
119
│ │ │ │ -
120 template<std::size_t... I>
│ │ │ │ -
121 static constexpr std::array<int, sizeof...(I)> computeOffsets(std::index_sequence<I...>)
│ │ │ │ -
122 {
│ │ │ │ -
123 int offset = 0;
│ │ │ │ -
124 return {{ (nextOffset(offset, I))... }};
│ │ │ │ -
125 }
│ │ │ │ -
126
│ │ │ │ -
127 // compute shift table entry for (`codim`, `i`) and advance `codim`, `i`
│ │ │ │ -
128 static constexpr unsigned char nextValue(int& codim, int& i)
│ │ │ │ -
129 {
│ │ │ │ -
130 const auto result = F::evaluate(i, codim);
│ │ │ │ -
131
│ │ │ │ -
132 i += 1;
│ │ │ │ -
133 if (i >= subEnt<dim>(dim, codim)) {
│ │ │ │ -
134 codim += 1;
│ │ │ │ -
135 i = 0;
│ │ │ │ -
136 }
│ │ │ │ -
137
│ │ │ │ -
138 return result;
│ │ │ │ -
139 }
│ │ │ │ -
140
│ │ │ │ -
141 template<std::size_t... I>
│ │ │ │ -
142 static constexpr std::array<unsigned char, sizeof...(I)> computeValues(std::index_sequence<I...>)
│ │ │ │ -
143 {
│ │ │ │ -
144 int codim = 0, i = 0;
│ │ │ │ -
145 return {{ ((void)I, nextValue(codim, i))... }};
│ │ │ │ -
146 }
│ │ │ │ -
147
│ │ │ │ -
148 static constexpr std::array<int,dim+1> _offsets = computeOffsets(std::make_index_sequence<dim+1>{});
│ │ │ │ -
149 static constexpr std::array<unsigned char,Dune::power(3,dim)> _values = computeValues(std::make_index_sequence<Dune::power(3,dim)>{});
│ │ │ │ -
150
│ │ │ │ -
151 };
│ │ │ │ -
152
│ │ │ │ -
153 // functor for doing the actual entity shift calculation
│ │ │ │ -
154 template<int dim>
│ │ │ │ -
155 struct calculate_entity_shift
│ │ │ │ -
156 {
│ │ │ │ -
157 static constexpr unsigned long long evaluate(int index, int cc)
│ │ │ │ -
158 {
│ │ │ │ -
159 auto result = 0ull;
│ │ │ │ -
160 for (int d = dim; d>0; d--)
│ │ │ │ -
161 {
│ │ │ │ -
162 if (cc == d)
│ │ │ │ -
163 return result;
│ │ │ │ -
164 if (index < subEnt<dim>(d-1,cc))
│ │ │ │ -
165 result |= 1ull << (d-1);
│ │ │ │ -
166 else
│ │ │ │ -
167 {
│ │ │ │ -
168 index = (index - subEnt<dim>(d-1, cc)) % subEnt<dim>(d-1,cc-1);
│ │ │ │ -
169 cc--;
│ │ │ │ -
170 }
│ │ │ │ -
171 }
│ │ │ │ -
172 return result;
│ │ │ │ -
173 }
│ │ │ │ -
174 };
│ │ │ │ -
175
│ │ │ │ -
184 template<int dim>
│ │ │ │ -
185 std::bitset<dim> entityShift(int index, int cc)
│ │ │ │ -
186 {
│ │ │ │ -
187 return EntityShiftTable<calculate_entity_shift<dim>,dim>::evaluate(index,cc);
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ +
183
│ │ │ │ +
│ │ │ │ +
185 int supersize (int i) const
│ │ │ │ +
186 {
│ │ │ │ +
187 return _supersize[i];
│ │ │ │
188 }
│ │ │ │ +
│ │ │ │
189
│ │ │ │ -
190 // functor for doing the actual entity move calculation
│ │ │ │ -
191 template<int dim>
│ │ │ │ -
192 struct calculate_entity_move
│ │ │ │ -
193 {
│ │ │ │ -
194 static constexpr unsigned long long evaluate(int index, int cc)
│ │ │ │ -
195 {
│ │ │ │ -
196 auto result = 0ull;
│ │ │ │ -
197 for (int d = dim; d>0; d--)
│ │ │ │ -
198 {
│ │ │ │ -
199 if (d == cc)
│ │ │ │ -
200 {
│ │ │ │ -
201 // result[d-1] = index & (1<<(d-1));
│ │ │ │ -
202 result &= ~(1ull << (d-1));
│ │ │ │ -
203 result |= index & (1ull << (d-1));
│ │ │ │ -
204
│ │ │ │ -
205 index &= ~(1<<(d-1));
│ │ │ │ -
206 }
│ │ │ │ -
207 if (index >= subEnt<dim>(d-1,cc))
│ │ │ │ -
208 {
│ │ │ │ -
209 if ((index - subEnt<dim>(d-1,cc)) / subEnt<dim>(d-1,cc-1) == 1)
│ │ │ │ -
210 {
│ │ │ │ -
211 result |= 1ull << (d-1);
│ │ │ │ -
212 }
│ │ │ │ -
213 index = (index - subEnt<dim>(d-1, cc)) % subEnt<dim>(d-1,cc-1);
│ │ │ │ -
214 cc--;
│ │ │ │ -
215 }
│ │ │ │ -
216 }
│ │ │ │ -
217 return result;
│ │ │ │ -
218 }
│ │ │ │ -
219
│ │ │ │ -
220 };
│ │ │ │ -
221
│ │ │ │ -
229 template<int dim>
│ │ │ │ -
230 std::bitset<dim> entityMove(int index, int cc)
│ │ │ │ -
231 {
│ │ │ │ -
232 return EntityShiftTable<calculate_entity_move<dim>,dim>::evaluate(index,cc);
│ │ │ │ -
233 }
│ │ │ │ -
234
│ │ │ │ -
235#endif //DOXYGEN
│ │ │ │ -
236
│ │ │ │ -
237 } // namespace Yasp.
│ │ │ │ -
238
│ │ │ │ -
239 template<int codim, int dim, class GridImp>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
241 : public EntityDefaultImplementation <codim,dim,GridImp,YaspEntity>
│ │ │ │ -
242 {
│ │ │ │ -
243
│ │ │ │ -
244 template<int, PartitionIteratorType, typename>
│ │ │ │ -
245 friend class YaspLevelIterator;
│ │ │ │ -
246
│ │ │ │ -
247 public:
│ │ │ │ -
248 typedef typename GridImp::ctype ctype;
│ │ │ │ -
249
│ │ │ │ -
250 typedef typename GridImp::template Codim<codim>::Geometry Geometry;
│ │ │ │ -
251 typedef typename GridImp::Traits::template Codim<codim>::GeometryImpl GeometryImpl;
│ │ │ │ -
252
│ │ │ │ -
253 typedef typename GridImp::template Codim<codim>::EntitySeed EntitySeed;
│ │ │ │ -
254
│ │ │ │ -
│ │ │ │ -
256 int level () const
│ │ │ │ -
257 {
│ │ │ │ -
258 return _g->level();
│ │ │ │ -
259 }
│ │ │ │ -
│ │ │ │ -
260
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
265 {
│ │ │ │ -
266 return EntitySeed(YaspEntitySeed<codim,GridImp>(_g->level(), _it.coord(), _it.which()));
│ │ │ │ -
267 }
│ │ │ │ -
│ │ │ │ -
268
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
271 {
│ │ │ │ -
272 GeometryImpl _geometry(_it.lowerleft(),_it.upperright(),_it.shift());
│ │ │ │ -
273 return Geometry(_geometry);
│ │ │ │ -
274 }
│ │ │ │ -
│ │ │ │ -
275
│ │ │ │ -
│ │ │ │ -
279 constexpr GeometryType type () const
│ │ │ │ -
280 {
│ │ │ │ -
281 return GeometryTypes::cube(Geometry::mydimension);
│ │ │ │ -
282 }
│ │ │ │ -
│ │ │ │ -
283
│ │ │ │ -
│ │ │ │ -
288 unsigned int subEntities (unsigned int cc) const
│ │ │ │ -
289 {
│ │ │ │ -
290 return Dune::Yasp::subEnt<dim>(dim-codim,cc-codim);
│ │ │ │ -
291 }
│ │ │ │ -
│ │ │ │ -
292
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
295 {
│ │ │ │ -
296 if (_g->interior[codim].inside(_it.coord(),_it.shift()))
│ │ │ │ -
297 return InteriorEntity;
│ │ │ │ -
298 if (_g->interiorborder[codim].inside(_it.coord(),_it.shift()))
│ │ │ │ -
299 return BorderEntity;
│ │ │ │ -
300 if (_g->overlap[codim].inside(_it.coord(),_it.shift()))
│ │ │ │ -
301 return OverlapEntity;
│ │ │ │ -
302 if (_g->overlapfront[codim].inside(_it.coord(),_it.shift()))
│ │ │ │ -
303 return FrontEntity;
│ │ │ │ -
304 return GhostEntity;
│ │ │ │ -
305 }
│ │ │ │ -
│ │ │ │ -
306
│ │ │ │ -
307 typedef typename GridImp::YGridLevelIterator YGLI;
│ │ │ │ -
308 typedef typename GridImp::YGrid::Iterator I;
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
310 {}
│ │ │ │ -
│ │ │ │ -
311
│ │ │ │ -
│ │ │ │ -
312 YaspEntity (const YGLI& g, const I& it)
│ │ │ │ -
313 : _it(it), _g(g)
│ │ │ │ -
314 {}
│ │ │ │ +
│ │ │ │ +
191 const iTupel & supersize () const
│ │ │ │ +
192 {
│ │ │ │ +
193 return _supersize;
│ │ │ │ +
194 }
│ │ │ │ +
│ │ │ │ +
195
│ │ │ │ +
│ │ │ │ +
197 int size (int i) const
│ │ │ │ +
198 {
│ │ │ │ +
199 return _size[i];
│ │ │ │ +
200 }
│ │ │ │ +
│ │ │ │ +
201
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ +
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
│ │ │ │ -
│ │ │ │ -
316 YaspEntity (YGLI&& g, const I&& it)
│ │ │ │ -
317 : _it(std::move(it)), _g(std::move(g))
│ │ │ │ -
318 {}
│ │ │ │ -
│ │ │ │ -
319
│ │ │ │ -
321 bool equals (const YaspEntity& e) const
│ │ │ │ -
322 {
│ │ │ │ -
323 return _it == e._it && _g == e._g;
│ │ │ │ -
324 }
│ │ │ │ -
325
│ │ │ │ -
326 // IndexSets needs access to the private index methods
│ │ │ │ -
327 friend class Dune::YaspIndexSet<GridImp,true>;
│ │ │ │ -
328 friend class Dune::YaspIndexSet<GridImp,false>;
│ │ │ │ -
329 friend class Dune::YaspGlobalIdSet<GridImp>;
│ │ │ │ -
330 typedef typename GridImp::PersistentIndexType PersistentIndexType;
│ │ │ │ -
331
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
334 {
│ │ │ │ -
335 // get size of global grid (in elements)
│ │ │ │ -
336 std::array<int,dim> size;
│ │ │ │ -
337
│ │ │ │ -
338 for (int i=0; i<dim; i++)
│ │ │ │ -
339 {
│ │ │ │ -
340 // correct size according to shift
│ │ │ │ -
341 size[i] = _g->mg->levelSize(_g->level(), i);
│ │ │ │ -
342 if (!_it.shift(i))
│ │ │ │ -
343 size[i]++;
│ │ │ │ -
344 }
│ │ │ │ -
345
│ │ │ │ -
346 // encode codim
│ │ │ │ -
347 PersistentIndexType id(_it.shift().to_ulong());
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
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
│ │ │ │ -
349 // encode level
│ │ │ │ -
350 id = id << yaspgrid_level_bits;
│ │ │ │ -
351 id = id+PersistentIndexType(_g->level());
│ │ │ │ -
352
│ │ │ │ -
353 // encode coordinates
│ │ │ │ -
354 for (int i=dim-1; i>=0; i--)
│ │ │ │ -
355 {
│ │ │ │ -
356 id = id << yaspgrid_dim_bits;
│ │ │ │ -
357 id = id+PersistentIndexType(_it.coord(i));
│ │ │ │ -
358 }
│ │ │ │ -
359
│ │ │ │ -
360 return id;
│ │ │ │ -
361 }
│ │ │ │ -
│ │ │ │ -
362
│ │ │ │ -
│ │ │ │ -
364 int compressedIndex () const
│ │ │ │ -
365 {
│ │ │ │ -
366 return _it.superindex();
│ │ │ │ -
367 }
│ │ │ │ -
│ │ │ │ -
368
│ │ │ │ -
│ │ │ │ -
370 int subCompressedIndex (int i, unsigned int cc) const
│ │ │ │ -
371 {
│ │ │ │ -
372 // get the shift of the entity and the subentity
│ │ │ │ -
373 // the subentity shift is only available in the space spanned by the entity
│ │ │ │ -
374 std::bitset<dim-codim> subent_shift = Dune::Yasp::entityShift<dim-codim>(i,cc-codim);
│ │ │ │ -
375 std::bitset<dim-codim> subent_move = Dune::Yasp::entityMove<dim-codim>(i,cc-codim);
│ │ │ │ -
376
│ │ │ │ -
377 std::bitset<dim> shift = _it.shift();
│ │ │ │ -
378 std::array<int, dim> coord = _it.coord();
│ │ │ │ -
379 for (int j=0, k=0; j<dim; j++)
│ │ │ │ +
│ │ │ │ +
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 if (!shift[j])
│ │ │ │ -
382 continue;
│ │ │ │ -
383
│ │ │ │ -
384 coord[j] += subent_move[k];
│ │ │ │ -
385 shift[j] = subent_shift[k];
│ │ │ │ -
386 k++;
│ │ │ │ -
387 }
│ │ │ │ -
388
│ │ │ │ -
389 int which = _g->overlapfront[cc].shiftmapping(shift);
│ │ │ │ -
390 return _g->overlapfront[cc].superindex(coord,which);
│ │ │ │ -
391 }
│ │ │ │ -
│ │ │ │ -
392 public:
│ │ │ │ -
393 const I& transformingsubiterator() const { return _it; }
│ │ │ │ -
394 const YGLI& gridlevel() const { return _g; }
│ │ │ │ - │ │ │ │ -
396 YGLI& gridlevel() { return _g; }
│ │ │ │ -
397 const GridImp * yaspgrid() const { return _g->mg; }
│ │ │ │ -
398 protected:
│ │ │ │ -
399 I _it = {}; // position in the grid level
│ │ │ │ -
400 YGLI _g = {}; // access to grid level
│ │ │ │ -
401 };
│ │ │ │ -
│ │ │ │ -
402
│ │ │ │ -
403
│ │ │ │ -
404 // specialization for codim=0
│ │ │ │ -
405 template<int dim, class GridImp>
│ │ │ │ -
│ │ │ │ -
406 class YaspEntity<0,dim,GridImp>
│ │ │ │ -
407 : public EntityDefaultImplementation <0,dim,GridImp,YaspEntity>
│ │ │ │ -
408 {
│ │ │ │ -
409 constexpr static int dimworld = GridImp::dimensionworld;
│ │ │ │ -
410
│ │ │ │ -
411 typedef typename GridImp::Traits::template Codim< 0 >::GeometryImpl GeometryImpl;
│ │ │ │ -
412
│ │ │ │ -
413 template<int, PartitionIteratorType, typename>
│ │ │ │ -
414 friend class YaspLevelIterator;
│ │ │ │ -
415
│ │ │ │ -
416 template<typename>
│ │ │ │ - │ │ │ │ -
418
│ │ │ │ -
419 public:
│ │ │ │ -
420 typedef typename GridImp::ctype ctype;
│ │ │ │ -
421
│ │ │ │ -
422 typedef typename GridImp::YGridLevelIterator YGLI;
│ │ │ │ -
423 typedef typename GridImp::YGrid::Iterator I;
│ │ │ │ -
424
│ │ │ │ -
425 typedef typename GridImp::template Codim< 0 >::Geometry Geometry;
│ │ │ │ -
426 typedef typename GridImp::template Codim< 0 >::LocalGeometry LocalGeometry;
│ │ │ │ -
427
│ │ │ │ -
428 template <int cd>
│ │ │ │ -
│ │ │ │ -
429 struct Codim
│ │ │ │ -
430 {
│ │ │ │ -
431 typedef typename GridImp::template Codim<cd>::Entity Entity;
│ │ │ │ -
432 };
│ │ │ │ -
│ │ │ │ -
433
│ │ │ │ -
434 typedef typename GridImp::template Codim<0>::Entity Entity;
│ │ │ │ -
435 typedef typename GridImp::template Codim<0>::EntitySeed EntitySeed;
│ │ │ │ -
436 typedef typename GridImp::LevelIntersectionIterator IntersectionIterator;
│ │ │ │ -
437 typedef typename GridImp::LevelIntersectionIterator LevelIntersectionIterator;
│ │ │ │ -
438 typedef typename GridImp::LeafIntersectionIterator LeafIntersectionIterator;
│ │ │ │ -
439 typedef typename GridImp::HierarchicIterator HierarchicIterator;
│ │ │ │ +
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
│ │ │ │ -
442 typedef typename GridImp::PersistentIndexType PersistentIndexType;
│ │ │ │ -
443
│ │ │ │ -
445 typedef typename GridImp::YGrid::iTupel iTupel;
│ │ │ │ -
446
│ │ │ │ -
447 // constructor
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
449 {}
│ │ │ │ -
│ │ │ │ -
450
│ │ │ │ -
│ │ │ │ -
451 YaspEntity (const YGLI& g, const I& it)
│ │ │ │ -
452 : _it(it), _g(g)
│ │ │ │ -
453 {}
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
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 YaspEntity (const YGLI& g, I&& it)
│ │ │ │ -
456 : _it(std::move(it)), _g(g)
│ │ │ │ -
457 {}
│ │ │ │ -
│ │ │ │ -
458
│ │ │ │ -
│ │ │ │ -
459 YaspEntity (YGLI&& g, I&& it)
│ │ │ │ -
460 : _it(std::move(it)), _g(std::move(g))
│ │ │ │ -
461 {}
│ │ │ │ -
│ │ │ │ -
462
│ │ │ │ -
│ │ │ │ -
464 bool equals (const YaspEntity& e) const
│ │ │ │ -
465 {
│ │ │ │ -
466 return _it == e._it && _g == e._g;
│ │ │ │ -
467 }
│ │ │ │ +
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 };
│ │ │ │
│ │ │ │ -
468
│ │ │ │ -
470 int level () const { return _g->level(); }
│ │ │ │ +
470
│ │ │ │
471
│ │ │ │ -
│ │ │ │ -
475 EntitySeed seed () const {
│ │ │ │ -
476 return EntitySeed(YaspEntitySeed<0,GridImp>(_g->level(), _it.coord()));
│ │ │ │ -
477 }
│ │ │ │ -
│ │ │ │ -
478
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
481 {
│ │ │ │ -
482 if (_g->interior[0].inside(_it.coord(),_it.shift()))
│ │ │ │ -
483 return InteriorEntity;
│ │ │ │ -
484 if (_g->overlap[0].inside(_it.coord(),_it.shift()))
│ │ │ │ -
485 return OverlapEntity;
│ │ │ │ -
486 DUNE_THROW(GridError, "Impossible GhostEntity");
│ │ │ │ -
487 return GhostEntity;
│ │ │ │ -
488 }
│ │ │ │ -
│ │ │ │ -
489
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
492 // the element geometry
│ │ │ │ -
493 auto ll = _it.lowerleft();
│ │ │ │ -
494 auto ur = _it.upperright();
│ │ │ │ -
495
│ │ │ │ -
496 // If on periodic overlap, transform coordinates by domain size
│ │ │ │ -
497 for (int i=0; i<dimworld; i++) {
│ │ │ │ -
498 if (gridlevel()->mg->isPeriodic(i)) {
│ │ │ │ -
499 int coord = transformingsubiterator().coord(i);
│ │ │ │ -
500 if (coord < 0) {
│ │ │ │ -
501 auto size = _g->mg->domainSize()[i];
│ │ │ │ -
502 ll[i] += size;
│ │ │ │ -
503 ur[i] += size;
│ │ │ │ -
504 } else if (coord + 1 > gridlevel()->mg->levelSize(gridlevel()->level(),i)) {
│ │ │ │ -
505 auto size = _g->mg->domainSize()[i];
│ │ │ │ -
506 ll[i] -= size;
│ │ │ │ -
507 ur[i] -= size;
│ │ │ │ -
508 }
│ │ │ │ -
509 }
│ │ │ │ -
510 }
│ │ │ │ -
511
│ │ │ │ -
512 GeometryImpl _geometry(ll,ur);
│ │ │ │ -
513 return Geometry( _geometry );
│ │ │ │ -
514 }
│ │ │ │ -
│ │ │ │ -
515
│ │ │ │ -
│ │ │ │ -
519 constexpr GeometryType type () const
│ │ │ │ -
520 {
│ │ │ │ -
521 return GeometryTypes::cube(Geometry::mydimension);
│ │ │ │ -
522 }
│ │ │ │ -
│ │ │ │ -
523
│ │ │ │ -
│ │ │ │ -
528 template<int cc> int count () const
│ │ │ │ -
529 {
│ │ │ │ -
530 return Dune::Yasp::subEnt<dim>(dim,cc);
│ │ │ │ -
531 }
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
│ │ │ │ -
537 unsigned int subEntities (unsigned int codim) const
│ │ │ │ -
538 {
│ │ │ │ -
539 return Dune::Yasp::subEnt<dim>(dim,codim);
│ │ │ │ -
540 }
│ │ │ │ +
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
│ │ │ │ -
544 template<int cc>
│ │ │ │ -
│ │ │ │ -
545 typename Codim<cc>::Entity subEntity (int i) const
│ │ │ │ -
546 {
│ │ │ │ -
547 // calculate move bitset
│ │ │ │ -
548 std::bitset<dim> move = Dune::Yasp::entityMove<dim>(i,cc);
│ │ │ │ -
549
│ │ │ │ -
550 // get the coordinate and modify it
│ │ │ │ -
551 iTupel coord = _it.coord();
│ │ │ │ -
552 for (int j=0; j<dim; j++)
│ │ │ │ -
553 if (move[j])
│ │ │ │ -
554 coord[j]++;
│ │ │ │ -
555
│ │ │ │ -
556 int which = _g->overlapfront[cc].shiftmapping(Dune::Yasp::entityShift<dim>(i,cc));
│ │ │ │ -
557 return typename Codim<cc>::Entity(YaspEntity<cc,GridImp::dimension,GridImp>(_g,_g->overlapfront[cc].begin(coord, which)));
│ │ │ │ -
558 }
│ │ │ │ -
│ │ │ │ +
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
│ │ │ │
│ │ │ │ -
561 Entity father () const
│ │ │ │ -
562 {
│ │ │ │ -
563 // check if coarse level exists
│ │ │ │ -
564 if (_g->level()<=0)
│ │ │ │ -
565 DUNE_THROW(GridError, "tried to call father on level 0");
│ │ │ │ -
566
│ │ │ │ -
567 // yes, get iterator to it
│ │ │ │ -
568 YGLI cg(_g);
│ │ │ │ -
569 --cg;
│ │ │ │ -
570
│ │ │ │ -
571 // coordinates of the cell
│ │ │ │ -
572 iTupel coord = _it.coord();
│ │ │ │ -
573
│ │ │ │ -
574 // get coordinates on next coarser level
│ │ │ │ -
575 for (int k=0; k<dim; k++) coord[k] = coord[k]/2;
│ │ │ │ -
576
│ │ │ │ -
577 return Entity(YaspEntity<0,GridImp::dimension,GridImp>(cg,cg->overlap[0].begin(coord)));
│ │ │ │ -
578 }
│ │ │ │ -
│ │ │ │ -
579
│ │ │ │ -
│ │ │ │ -
581 bool hasFather () const
│ │ │ │ -
582 {
│ │ │ │ -
583 return (_g->level()>0);
│ │ │ │ -
584 }
│ │ │ │ -
│ │ │ │ -
585
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
589 {
│ │ │ │ -
590 // configure one of the 2^dim transformations
│ │ │ │ -
591 FieldVector<ctype,dim> ll(0.0),ur(0.5);
│ │ │ │ -
592
│ │ │ │ -
593 for (int k=0; k<dim; k++)
│ │ │ │ -
594 {
│ │ │ │ -
595 if (_it.coord(k)%2)
│ │ │ │ -
596 {
│ │ │ │ -
597 ll[k] = 0.5;
│ │ │ │ -
598 ur[k] = 1.0;
│ │ │ │ -
599 }
│ │ │ │ -
600 }
│ │ │ │ -
601
│ │ │ │ - │ │ │ │ -
603 }
│ │ │ │ -
│ │ │ │ -
604
│ │ │ │ -
605 const I& transformingsubiterator () const { return _it; }
│ │ │ │ -
606 const YGLI& gridlevel () const { return _g; }
│ │ │ │ - │ │ │ │ -
608 YGLI& gridlevel() { return _g; }
│ │ │ │ -
609 const GridImp* yaspgrid () const { return _g->mg; }
│ │ │ │ -
610
│ │ │ │ -
│ │ │ │ -
611 bool isLeaf() const
│ │ │ │ -
612 {
│ │ │ │ -
613 return (_g->level() == yaspgrid()->maxLevel());
│ │ │ │ -
614 }
│ │ │ │ -
│ │ │ │ -
615
│ │ │ │ -
618 bool isNew () const { return yaspgrid()->adaptRefCount > 0 && yaspgrid()->maxLevel() < _g->level() + yaspgrid()->adaptRefCount; }
│ │ │ │ -
619
│ │ │ │ -
622 bool mightVanish () const { return false; }
│ │ │ │ -
623
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
626 {
│ │ │ │ -
627 return YaspIntersectionIterator<GridImp>(*this,false);
│ │ │ │ -
628 }
│ │ │ │ + │ │ │ │ +
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
│ │ │ │
│ │ │ │ - │ │ │ │ -
632 {
│ │ │ │ -
633 // only if entity is leaf this iterator delivers intersections
│ │ │ │ -
634 return YaspIntersectionIterator<GridImp>(*this, ! isLeaf() );
│ │ │ │ -
635 }
│ │ │ │ -
│ │ │ │ -
636
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
639 {
│ │ │ │ -
640 return ibegin();
│ │ │ │ -
641 }
│ │ │ │ -
│ │ │ │ -
642
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
645 {
│ │ │ │ -
646 return YaspIntersectionIterator<GridImp>(*this,true);
│ │ │ │ -
647 }
│ │ │ │ -
│ │ │ │ -
648
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
651 {
│ │ │ │ -
652 return iend();
│ │ │ │ -
653 }
│ │ │ │ -
│ │ │ │ -
654
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
657 {
│ │ │ │ -
658 return iend();
│ │ │ │ -
659 }
│ │ │ │ -
│ │ │ │ -
660
│ │ │ │ -
│ │ │ │ -
665 HierarchicIterator hbegin (int maxlevel) const
│ │ │ │ -
666 {
│ │ │ │ -
667 return YaspHierarchicIterator<GridImp>(_g,_it,maxlevel);
│ │ │ │ -
668 }
│ │ │ │ -
│ │ │ │ -
669
│ │ │ │ -
671 HierarchicIterator hend (int /* maxlevel */) const
│ │ │ │ -
672 {
│ │ │ │ -
673 return YaspHierarchicIterator<GridImp>(_g,_it,_g->level());
│ │ │ │ -
674 }
│ │ │ │ -
675
│ │ │ │ -
676 private:
│ │ │ │ -
677 // IndexSets needs access to the private index methods
│ │ │ │ -
678 friend class Dune::YaspIndexSet<GridImp,true>;
│ │ │ │ -
679 friend class Dune::YaspIndexSet<GridImp,false>;
│ │ │ │ -
680 friend class Dune::YaspGlobalIdSet<GridImp>;
│ │ │ │ -
681
│ │ │ │ - │ │ │ │ -
684 {
│ │ │ │ -
685 // encode codim
│ │ │ │ -
686 PersistentIndexType id(_it.shift().to_ulong());
│ │ │ │ -
687
│ │ │ │ -
688 // encode level
│ │ │ │ -
689 id = id << yaspgrid_level_bits;
│ │ │ │ -
690 id = id+PersistentIndexType(_g->level());
│ │ │ │ -
691
│ │ │ │ +
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
│ │ │ │ -
693 // encode coordinates
│ │ │ │ -
694 for (int i=dim-1; i>=0; i--)
│ │ │ │ +
│ │ │ │ + │ │ │ │
695 {
│ │ │ │ -
696 id = id << yaspgrid_dim_bits;
│ │ │ │ -
697 id = id+PersistentIndexType(_it.coord(i));
│ │ │ │ -
698 }
│ │ │ │ -
699
│ │ │ │ -
700 return id;
│ │ │ │ -
701 }
│ │ │ │ -
702
│ │ │ │ -
704 int compressedIndex () const
│ │ │ │ -
705 {
│ │ │ │ -
706 return _it.superindex();
│ │ │ │ -
707 }
│ │ │ │ +
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 PersistentIndexType subPersistentIndex (int i, int cc) const
│ │ │ │ -
711 {
│ │ │ │ -
712 // calculate shift and move bitsets
│ │ │ │ -
713 std::bitset<dim> shift = Dune::Yasp::entityShift<dim>(i,cc);
│ │ │ │ -
714 std::bitset<dim> move = Dune::Yasp::entityMove<dim>(i,cc);
│ │ │ │ -
715
│ │ │ │ -
716 int trailing = (cc == dim) ? 1000 : 0;
│ │ │ │ -
717
│ │ │ │ -
718 std::array<int,dim> size = _g->mg->levelSize(_g->level());
│ │ │ │ -
719 std::array<int, dim> coord = _it.coord();
│ │ │ │ -
720 for (int j=0; j<dim; j++)
│ │ │ │ -
721 {
│ │ │ │ -
722 // correct size according to shift
│ │ │ │ -
723 if (!shift[j])
│ │ │ │ -
724 size[j]++;
│ │ │ │ -
725
│ │ │ │ -
726 // move the coordinates to the cell on which the entity lives
│ │ │ │ -
727 if (move[j])
│ │ │ │ -
728 coord[j]++;
│ │ │ │ -
729 }
│ │ │ │ -
730
│ │ │ │ -
731 for (int j=0; j<dim; j++)
│ │ │ │ -
732 {
│ │ │ │ -
733 // in the codim==dim case, count trailing zeroes.
│ │ │ │ -
734 if (cc == dim)
│ │ │ │ -
735 {
│ │ │ │ -
736 int zeroes = 0;
│ │ │ │ -
737 for (int k=0; k<_g->level(); k++)
│ │ │ │ -
738 if (coord[j] & (1<<k))
│ │ │ │ -
739 break;
│ │ │ │ -
740 else
│ │ │ │ -
741 zeroes++;
│ │ │ │ -
742 trailing = std::min(trailing,zeroes);
│ │ │ │ -
743 }
│ │ │ │ -
744 }
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
746 // encode codim
│ │ │ │ -
747 PersistentIndexType id(shift.to_ulong());
│ │ │ │ -
748
│ │ │ │ -
749 // encode level
│ │ │ │ -
750 id = id << yaspgrid_level_bits;
│ │ │ │ -
751 id = id+PersistentIndexType(_g->level()-trailing);
│ │ │ │ -
752
│ │ │ │ -
753 // encode coordinates
│ │ │ │ -
754 for (int j=dim-1; j>=0; j--)
│ │ │ │ -
755 {
│ │ │ │ -
756 id = id << yaspgrid_dim_bits;
│ │ │ │ -
757 id = id+PersistentIndexType(coord[j]>>trailing);
│ │ │ │ -
758 }
│ │ │ │ -
759
│ │ │ │ -
760 return id;
│ │ │ │ -
761 }
│ │ │ │ -
762
│ │ │ │ -
764 int subCompressedIndex (int i, int cc) const
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
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 // get shift and move of the subentity in question
│ │ │ │ -
767 std::bitset<dim> shift = Dune::Yasp::entityShift<dim>(i,cc);
│ │ │ │ -
768 std::bitset<dim> move = Dune::Yasp::entityMove<dim>(i,cc);
│ │ │ │ +
766 return _indexOffset[which] + (dataBegin()+which)->superindex(coord);
│ │ │ │ +
767 }
│ │ │ │ +
│ │ │ │ +
768
│ │ │ │
769
│ │ │ │ -
770 std::array<int, dim> coord = _it.coord();
│ │ │ │ -
771 for (int j=0; j<dim; j++)
│ │ │ │ -
772 coord[j] += move[j];
│ │ │ │ -
773
│ │ │ │ -
774 int which = _g->overlapfront[cc].shiftmapping(shift);
│ │ │ │ -
775 return _g->overlapfront[cc].superindex(coord,which);
│ │ │ │ -
776 }
│ │ │ │ -
777
│ │ │ │ -
778 I _it = {}; // position in the grid level
│ │ │ │ -
779 YGLI _g = {}; // access to grid level
│ │ │ │ -
780 };
│ │ │ │ -
│ │ │ │ -
781
│ │ │ │ -
782
│ │ │ │ -
783 // specialization for codim=dim (vertex)
│ │ │ │ -
784 template<int dim, class GridImp>
│ │ │ │ -
│ │ │ │ -
785 class YaspEntity<dim,dim,GridImp>
│ │ │ │ -
786 : public EntityDefaultImplementation <dim,dim,GridImp,YaspEntity>
│ │ │ │ -
787 {
│ │ │ │ -
788 constexpr static int dimworld = GridImp::dimensionworld;
│ │ │ │ -
789
│ │ │ │ -
790 template<int, PartitionIteratorType, typename>
│ │ │ │ -
791 friend class YaspLevelIterator;
│ │ │ │ +
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 typedef typename GridImp::Traits::template Codim<dim>::GeometryImpl GeometryImpl;
│ │ │ │ +
793 private:
│ │ │ │
794
│ │ │ │ -
795 public:
│ │ │ │ -
796 typedef typename GridImp::ctype ctype;
│ │ │ │ -
797
│ │ │ │ -
798 typedef typename GridImp::YGridLevelIterator YGLI;
│ │ │ │ -
799 typedef typename GridImp::YGrid::Iterator I;
│ │ │ │ -
800
│ │ │ │ -
801 typedef typename GridImp::template Codim<dim>::Geometry Geometry;
│ │ │ │ -
802
│ │ │ │ -
803 typedef typename GridImp::template Codim<dim>::EntitySeed EntitySeed;
│ │ │ │ -
804
│ │ │ │ -
806 typedef typename GridImp::PersistentIndexType PersistentIndexType;
│ │ │ │ -
807
│ │ │ │ -
809 typedef typename GridImp::YGrid::iTupel iTupel;
│ │ │ │ -
810
│ │ │ │ -
811 // constructor
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
813 {}
│ │ │ │ -
│ │ │ │ -
814
│ │ │ │ -
│ │ │ │ -
815 YaspEntity (const YGLI& g, const I& it)
│ │ │ │ -
816 : _it(it), _g(g)
│ │ │ │ -
817 {}
│ │ │ │ -
│ │ │ │ -
818
│ │ │ │ -
│ │ │ │ -
819 YaspEntity (YGLI&& g, I&& it)
│ │ │ │ -
820 : _it(std::move(it)), _g(std::move(g))
│ │ │ │ -
821 {}
│ │ │ │ -
│ │ │ │ -
822
│ │ │ │ -
│ │ │ │ -
824 bool equals (const YaspEntity& e) const
│ │ │ │ -
825 {
│ │ │ │ -
826 return _it == e._it && _g == e._g;
│ │ │ │ -
827 }
│ │ │ │ -
│ │ │ │ -
828
│ │ │ │ -
830 int level () const {return _g->level();}
│ │ │ │ -
831
│ │ │ │ -
│ │ │ │ -
835 EntitySeed seed () const {
│ │ │ │ -
836 return EntitySeed(YaspEntitySeed<dim,GridImp>(_g->level(), _it.coord(), _it.which()));
│ │ │ │ -
837 }
│ │ │ │ -
│ │ │ │ -
838
│ │ │ │ -
│ │ │ │ -
843 unsigned int subEntities (unsigned int cc) const
│ │ │ │ -
844 {
│ │ │ │ -
845 return Dune::Yasp::subEnt<dim>(dim-dim,cc-dim);
│ │ │ │ -
846 }
│ │ │ │ -
│ │ │ │ -
847
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
850 GeometryImpl _geometry((_it).lowerleft());
│ │ │ │ -
851 return Geometry( _geometry );
│ │ │ │ -
852 }
│ │ │ │ -
│ │ │ │ +
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
│ │ │ │ -
│ │ │ │ -
857 constexpr GeometryType type () const
│ │ │ │ -
858 {
│ │ │ │ -
859 return GeometryTypes::cube(Geometry::mydimension);
│ │ │ │ -
860 }
│ │ │ │ -
│ │ │ │ -
861
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
864 {
│ │ │ │ -
865 if (_g->interior[dim].inside(_it.coord(),_it.shift()))
│ │ │ │ -
866 return InteriorEntity;
│ │ │ │ -
867 if (_g->interiorborder[dim].inside(_it.coord(),_it.shift()))
│ │ │ │ -
868 return BorderEntity;
│ │ │ │ -
869 if (_g->overlap[dim].inside(_it.coord(),_it.shift()))
│ │ │ │ -
870 return OverlapEntity;
│ │ │ │ -
871 if (_g->overlapfront[dim].inside(_it.coord(),_it.shift()))
│ │ │ │ -
872 return FrontEntity;
│ │ │ │ -
873 return GhostEntity;
│ │ │ │ -
874 }
│ │ │ │ -
│ │ │ │ -
875
│ │ │ │ -
877 int subCompressedIndex (int, unsigned int ) const
│ │ │ │ -
878 {
│ │ │ │ -
879 return compressedIndex();
│ │ │ │ -
880 }
│ │ │ │ -
881
│ │ │ │ -
882 private:
│ │ │ │ -
883 // IndexSets needs access to the private index methods
│ │ │ │ -
884 friend class Dune::YaspIndexSet<GridImp,true>;
│ │ │ │ -
885 friend class Dune::YaspIndexSet<GridImp,false>;
│ │ │ │ -
886 friend class Dune::YaspGlobalIdSet<GridImp>;
│ │ │ │ -
887
│ │ │ │ - │ │ │ │ -
890 {
│ │ │ │ -
891 // get coordinate and size of global grid
│ │ │ │ -
892 iTupel size = _g->mg->levelSize(_g->level());
│ │ │ │ -
893
│ │ │ │ -
894 for (int i=0; i<dim; i++)
│ │ │ │ -
895 {
│ │ │ │ -
896 // we have vertices, add 1 size to all directions
│ │ │ │ -
897 size[i]++;
│ │ │ │ -
898 }
│ │ │ │ -
899
│ │ │ │ -
900 // determine min number of trailing zeroes
│ │ │ │ -
901 int trailing = 1000;
│ │ │ │ -
902 for (int i=0; i<dim; i++)
│ │ │ │ -
903 {
│ │ │ │ -
904 // count trailing zeros
│ │ │ │ -
905 int zeros = 0;
│ │ │ │ -
906 for (int j=0; j<_g->level(); j++)
│ │ │ │ -
907 if (_it.coord(i)&(1<<j))
│ │ │ │ -
908 break;
│ │ │ │ -
909 else
│ │ │ │ -
910 zeros++;
│ │ │ │ -
911 trailing = std::min(trailing,zeros);
│ │ │ │ -
912 }
│ │ │ │ -
913
│ │ │ │ -
914 // determine the level of this vertex
│ │ │ │ -
915 int level = _g->level()-trailing;
│ │ │ │ -
916
│ │ │ │ -
917 // encode codim: shift vector of vertices is 0.
│ │ │ │ - │ │ │ │ -
919
│ │ │ │ -
920 // encode level
│ │ │ │ -
921 id = id << yaspgrid_level_bits;
│ │ │ │ -
922 id = id+PersistentIndexType(level);
│ │ │ │ -
923
│ │ │ │ -
924 // encode coordinates
│ │ │ │ -
925 for (int i=dim-1; i>=0; i--)
│ │ │ │ -
926 {
│ │ │ │ -
927 id = id << yaspgrid_dim_bits;
│ │ │ │ -
928 id = id+PersistentIndexType(_it.coord(i)>>trailing);
│ │ │ │ -
929 }
│ │ │ │ -
930
│ │ │ │ -
931 return id;
│ │ │ │ +
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 int compressedIndex () const { return _it.superindex();}
│ │ │ │ -
936
│ │ │ │ -
937 public:
│ │ │ │ -
938 const I& transformingsubiterator() const { return _it; }
│ │ │ │ -
939 const YGLI& gridlevel() const { return _g; }
│ │ │ │ - │ │ │ │ -
941 YGLI& gridlevel() { return _g; }
│ │ │ │ -
942
│ │ │ │ -
943 const GridImp * yaspgrid() const { return _g->mg; }
│ │ │ │ -
944 protected:
│ │ │ │ -
945 I _it = {}; // position in the grid level
│ │ │ │ -
946 YGLI _g = {}; // access to grid level
│ │ │ │ -
947 };
│ │ │ │ -
│ │ │ │ -
948
│ │ │ │ -
949} // namespace Dune
│ │ │ │ -
950
│ │ │ │ -
951#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.
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
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:242
│ │ │ │ -
int level() const
level of this element
Definition yaspgridentity.hh:256
│ │ │ │ -
Geometry geometry() const
geometry of this entity
Definition yaspgridentity.hh:270
│ │ │ │ -
GridImp::ctype ctype
Definition yaspgridentity.hh:248
│ │ │ │ -
constexpr GeometryType type() const
Return the name of the reference element. The type can be used to access the Dune::ReferenceElement.
Definition yaspgridentity.hh:279
│ │ │ │ -
PersistentIndexType persistentIndex() const
globally unique, persistent index
Definition yaspgridentity.hh:333
│ │ │ │ -
const YGLI & gridlevel() const
Definition yaspgridentity.hh:394
│ │ │ │ -
const I & transformingsubiterator() const
Definition yaspgridentity.hh:393
│ │ │ │ -
YGLI _g
Definition yaspgridentity.hh:400
│ │ │ │ -
bool equals(const YaspEntity &e) const
Return true when two iterators over the same grid are equal (!).
Definition yaspgridentity.hh:321
│ │ │ │ -
PartitionType partitionType() const
return partition type attribute
Definition yaspgridentity.hh:294
│ │ │ │ -
GridImp::Traits::template Codim< codim >::GeometryImpl GeometryImpl
Definition yaspgridentity.hh:251
│ │ │ │ -
YGLI & gridlevel()
Definition yaspgridentity.hh:396
│ │ │ │ -
int subCompressedIndex(int i, unsigned int cc) const
subentity compressed index
Definition yaspgridentity.hh:370
│ │ │ │ -
GridImp::YGridLevelIterator YGLI
Definition yaspgridentity.hh:307
│ │ │ │ -
GridImp::YGrid::Iterator I
Definition yaspgridentity.hh:308
│ │ │ │ -
const GridImp * yaspgrid() const
Definition yaspgridentity.hh:397
│ │ │ │ -
GridImp::template Codim< codim >::EntitySeed EntitySeed
Definition yaspgridentity.hh:253
│ │ │ │ -
YaspEntity(YGLI &&g, const I &&it)
Definition yaspgridentity.hh:316
│ │ │ │ -
EntitySeed seed() const
Return the entity seed which contains sufficient information to generate the entity again and uses as...
Definition yaspgridentity.hh:264
│ │ │ │ -
int compressedIndex() const
consecutive, codim-wise, level-wise index
Definition yaspgridentity.hh:364
│ │ │ │ -
YaspEntity(const YGLI &g, const I &it)
Definition yaspgridentity.hh:312
│ │ │ │ -
I _it
Definition yaspgridentity.hh:399
│ │ │ │ -
YaspEntity()
Definition yaspgridentity.hh:309
│ │ │ │ -
GridImp::template Codim< codim >::Geometry Geometry
Definition yaspgridentity.hh:250
│ │ │ │ -
GridImp::PersistentIndexType PersistentIndexType
Definition yaspgridentity.hh:330
│ │ │ │ -
unsigned int subEntities(unsigned int cc) const
Definition yaspgridentity.hh:288
│ │ │ │ -
I & transformingsubiterator()
Definition yaspgridentity.hh:395
│ │ │ │ -
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
│ │ │ │ -
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:631
│ │ │ │ -
GridImp::template Codim< 0 >::LocalGeometry LocalGeometry
Definition yaspgridentity.hh:426
│ │ │ │ -
Codim< cc >::Entity subEntity(int i) const
Definition yaspgridentity.hh:545
│ │ │ │ -
bool equals(const YaspEntity &e) const
Return true when two iterators over the same grid are equal (!).
Definition yaspgridentity.hh:464
│ │ │ │ -
YaspEntity(const YGLI &g, I &&it)
Definition yaspgridentity.hh:455
│ │ │ │ -
int count() const
Definition yaspgridentity.hh:528
│ │ │ │ -
GridImp::template Codim< 0 >::EntitySeed EntitySeed
Definition yaspgridentity.hh:435
│ │ │ │ -
GridImp::PersistentIndexType PersistentIndexType
define the type used for persistent indices
Definition yaspgridentity.hh:442
│ │ │ │ -
GridImp::YGrid::iTupel iTupel
define type used for coordinates in grid module
Definition yaspgridentity.hh:445
│ │ │ │ -
const YGLI & gridlevel() const
Definition yaspgridentity.hh:606
│ │ │ │ -
IntersectionIterator iend() const
Reference to one past the last neighbor.
Definition yaspgridentity.hh:644
│ │ │ │ -
const I & transformingsubiterator() const
Definition yaspgridentity.hh:605
│ │ │ │ -
GridImp::ctype ctype
Definition yaspgridentity.hh:420
│ │ │ │ -
YGLI & gridlevel()
Definition yaspgridentity.hh:608
│ │ │ │ -
YaspEntity(const YGLI &g, const I &it)
Definition yaspgridentity.hh:451
│ │ │ │ -
const GridImp * yaspgrid() const
Definition yaspgridentity.hh:609
│ │ │ │ -
int level() const
level of this element
Definition yaspgridentity.hh:470
│ │ │ │ -
GridImp::LeafIntersectionIterator LeafIntersectionIterator
Definition yaspgridentity.hh:438
│ │ │ │ -
YaspEntity(YGLI &&g, I &&it)
Definition yaspgridentity.hh:459
│ │ │ │ -
PartitionType partitionType() const
return partition type attribute
Definition yaspgridentity.hh:480
│ │ │ │ -
LevelIntersectionIterator ilevelend() const
Reference to one past the last neighbor.
Definition yaspgridentity.hh:656
│ │ │ │ -
bool mightVanish() const
Returns true, if entity might disappear during the next call to adapt()
Definition yaspgridentity.hh:622
│ │ │ │ -
GridImp::HierarchicIterator HierarchicIterator
Definition yaspgridentity.hh:439
│ │ │ │ -
GridImp::template Codim< 0 >::Entity Entity
Definition yaspgridentity.hh:434
│ │ │ │ -
LevelIntersectionIterator ilevelbegin() const
returns intersection iterator for first intersection
Definition yaspgridentity.hh:638
│ │ │ │ -
LeafIntersectionIterator ileafend() const
Reference to one past the last neighbor.
Definition yaspgridentity.hh:650
│ │ │ │ -
YaspEntity()
Definition yaspgridentity.hh:448
│ │ │ │ -
GridImp::YGrid::Iterator I
Definition yaspgridentity.hh:423
│ │ │ │ -
GridImp::template Codim< 0 >::Geometry Geometry
Definition yaspgridentity.hh:425
│ │ │ │ -
Geometry geometry() const
geometry of this entity
Definition yaspgridentity.hh:491
│ │ │ │ -
Entity father() const
Inter-level access to father element on coarser grid. Assumes that meshes are nested.
Definition yaspgridentity.hh:561
│ │ │ │ -
bool isNew() const
Returns true, if the entity has been created during the last call to adapt()
Definition yaspgridentity.hh:618
│ │ │ │ -
constexpr GeometryType type() const
Return the name of the reference element. The type can be used to access the Dune::ReferenceElement.
Definition yaspgridentity.hh:519
│ │ │ │ -
EntitySeed seed() const
Return the entity seed which contains sufficient information to generate the entity again and uses as...
Definition yaspgridentity.hh:475
│ │ │ │ -
HierarchicIterator hbegin(int maxlevel) const
Definition yaspgridentity.hh:665
│ │ │ │ -
IntersectionIterator ibegin() const
returns intersection iterator for first intersection
Definition yaspgridentity.hh:625
│ │ │ │ -
GridImp::YGridLevelIterator YGLI
Definition yaspgridentity.hh:422
│ │ │ │ -
unsigned int subEntities(unsigned int codim) const
Definition yaspgridentity.hh:537
│ │ │ │ -
LocalGeometry geometryInFather() const
Definition yaspgridentity.hh:588
│ │ │ │ -
GridImp::LevelIntersectionIterator IntersectionIterator
Definition yaspgridentity.hh:436
│ │ │ │ -
GridImp::LevelIntersectionIterator LevelIntersectionIterator
Definition yaspgridentity.hh:437
│ │ │ │ -
I & transformingsubiterator()
Definition yaspgridentity.hh:607
│ │ │ │ -
bool isLeaf() const
Definition yaspgridentity.hh:611
│ │ │ │ -
bool hasFather() const
returns true if father entity exists
Definition yaspgridentity.hh:581
│ │ │ │ -
GridImp::template Codim< cd >::Entity Entity
Definition yaspgridentity.hh:431
│ │ │ │ -
int level() const
level of this element
Definition yaspgridentity.hh:830
│ │ │ │ -
bool equals(const YaspEntity &e) const
Return true when two iterators over the same grid are equal (!).
Definition yaspgridentity.hh:824
│ │ │ │ -
YGLI & gridlevel()
Definition yaspgridentity.hh:941
│ │ │ │ -
Geometry geometry() const
geometry of this entity
Definition yaspgridentity.hh:849
│ │ │ │ -
YaspEntity(const YGLI &g, const I &it)
Definition yaspgridentity.hh:815
│ │ │ │ -
unsigned int subEntities(unsigned int cc) const
Definition yaspgridentity.hh:843
│ │ │ │ -
PartitionType partitionType() const
return partition type attribute
Definition yaspgridentity.hh:863
│ │ │ │ -
GridImp::ctype ctype
Definition yaspgridentity.hh:796
│ │ │ │ -
GridImp::YGridLevelIterator YGLI
Definition yaspgridentity.hh:798
│ │ │ │ -
GridImp::PersistentIndexType PersistentIndexType
define the type used for persistent indices
Definition yaspgridentity.hh:806
│ │ │ │ -
EntitySeed seed() const
Return the entity seed which contains sufficient information to generate the entity again and uses as...
Definition yaspgridentity.hh:835
│ │ │ │ -
const GridImp * yaspgrid() const
Definition yaspgridentity.hh:943
│ │ │ │ -
constexpr GeometryType type() const
Return the name of the reference element. The type can be used to access the Dune::ReferenceElement.
Definition yaspgridentity.hh:857
│ │ │ │ -
GridImp::YGrid::Iterator I
Definition yaspgridentity.hh:799
│ │ │ │ -
I & transformingsubiterator()
Definition yaspgridentity.hh:940
│ │ │ │ -
const I & transformingsubiterator() const
Definition yaspgridentity.hh:938
│ │ │ │ -
GridImp::YGrid::iTupel iTupel
define type used for coordinates in grid module
Definition yaspgridentity.hh:809
│ │ │ │ -
GridImp::template Codim< dim >::Geometry Geometry
Definition yaspgridentity.hh:801
│ │ │ │ -
const YGLI & gridlevel() const
Definition yaspgridentity.hh:939
│ │ │ │ -
YaspEntity(YGLI &&g, I &&it)
Definition yaspgridentity.hh:819
│ │ │ │ -
YaspEntity()
Definition yaspgridentity.hh:812
│ │ │ │ -
GridImp::template Codim< dim >::EntitySeed EntitySeed
Definition yaspgridentity.hh:803
│ │ │ │ +
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 tuple 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
return 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 tuple.
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,1266 +1,1253 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _y_a_s_p_g_r_i_d │ │ │ │ │ -yaspgridentity.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 © 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_YASPGRIDENTITY_HH │ │ │ │ │ -6#define DUNE_GRID_YASPGRIDENTITY_HH │ │ │ │ │ +5#ifndef DUNE_GRID_YASPGRID_YGRID_HH │ │ │ │ │ +6#define DUNE_GRID_YASPGRID_YGRID_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10 │ │ │ │ │ -24//======================================================================== │ │ │ │ │ -25 │ │ │ │ │ -26 │ │ │ │ │ -27 │ │ │ │ │ -28 │ │ │ │ │ -29namespace _D_u_n_e { │ │ │ │ │ -30 │ │ │ │ │ -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 private: │ │ │ │ │ -47 // prevent construction │ │ │ │ │ -48 BinomialTable() = delete; │ │ │ │ │ -49 │ │ │ │ │ -50 // compute binomial(r, c) and advance row `r` and column `c` │ │ │ │ │ -51 static constexpr int nextValue(int& r, int& c) │ │ │ │ │ -52 { │ │ │ │ │ -53 const auto result = Dune::binomial(r, c); │ │ │ │ │ -54 │ │ │ │ │ -55 c += 1; │ │ │ │ │ -56 if (c > r) { │ │ │ │ │ -57 r += 1; │ │ │ │ │ -58 c = 0; │ │ │ │ │ -59 } │ │ │ │ │ -60 │ │ │ │ │ -61 return result; │ │ │ │ │ -62 } │ │ │ │ │ -63 │ │ │ │ │ -64 template │ │ │ │ │ -65 static constexpr std::array computeValues(std:: │ │ │ │ │ -index_sequence) │ │ │ │ │ -66 { │ │ │ │ │ -67 int r = 0, c = 0; │ │ │ │ │ -68 return {{ ((void)I, nextValue(r, c))... }}; │ │ │ │ │ -69 } │ │ │ │ │ -70 │ │ │ │ │ -71 template │ │ │ │ │ -72 static constexpr std::array computeOffsets(std:: │ │ │ │ │ -index_sequence) │ │ │ │ │ -73 { return {{ (I*(I+1)/2)... }}; } │ │ │ │ │ -74 │ │ │ │ │ -75 static constexpr std::array _values = computeValues(std:: │ │ │ │ │ -make_index_sequence<(n+1)*(n+2)/2>{}); │ │ │ │ │ -76 static constexpr std::array _offsets = computeOffsets(std:: │ │ │ │ │ -make_index_sequence{}); │ │ │ │ │ -77 }; │ │ │ │ │ -78 │ │ │ │ │ -85 template │ │ │ │ │ -86 constexpr int subEnt(int d, int c) │ │ │ │ │ -87 { │ │ │ │ │ -88 return (d < c ? 0 : BinomialTable::evaluate(d,c) << c); │ │ │ │ │ -89 } │ │ │ │ │ -90 │ │ │ │ │ -91 // Make a table mapping all subentities of a codim 0 entity to a value. │ │ │ │ │ -92 // F is the functor to be evaluated. │ │ │ │ │ -93 template │ │ │ │ │ -94 struct EntityShiftTable │ │ │ │ │ -95 { │ │ │ │ │ -96 typedef std::bitset value_type; │ │ │ │ │ -97 │ │ │ │ │ -98 static value_type evaluate(int i, int codim) │ │ │ │ │ -99 { │ │ │ │ │ -100 return {_values[_offsets[codim] + i]}; │ │ │ │ │ -101 } │ │ │ │ │ +8#include │ │ │ │ │ +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 │ │ │ │ │ -103 private: │ │ │ │ │ -104 │ │ │ │ │ -105 // prevent construction │ │ │ │ │ -106 EntityShiftTable() = delete; │ │ │ │ │ -107 │ │ │ │ │ -108 // compute offset of codimension `codim` entities and advance `offset` │ │ │ │ │ -109 static constexpr int nextOffset(int& offset, int codim) │ │ │ │ │ +_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 if (codim == 0) { │ │ │ │ │ -112 offset = 0; │ │ │ │ │ -113 return 0; │ │ │ │ │ -114 } │ │ │ │ │ -115 │ │ │ │ │ -116 offset += subEnt(dim, codim-1); │ │ │ │ │ -117 return offset; │ │ │ │ │ -118 } │ │ │ │ │ -119 │ │ │ │ │ -120 template │ │ │ │ │ -121 static constexpr std::array computeOffsets(std:: │ │ │ │ │ -index_sequence) │ │ │ │ │ -122 { │ │ │ │ │ -123 int offset = 0; │ │ │ │ │ -124 return {{ (nextOffset(offset, I))... }}; │ │ │ │ │ -125 } │ │ │ │ │ -126 │ │ │ │ │ -127 // compute shift table entry for (`codim`, `i`) and advance `codim`, `i` │ │ │ │ │ -128 static constexpr unsigned char nextValue(int& codim, int& i) │ │ │ │ │ -129 { │ │ │ │ │ -130 const auto result = F::evaluate(i, codim); │ │ │ │ │ -131 │ │ │ │ │ -132 i += 1; │ │ │ │ │ -133 if (i >= subEnt(dim, codim)) { │ │ │ │ │ -134 codim += 1; │ │ │ │ │ -135 i = 0; │ │ │ │ │ -136 } │ │ │ │ │ -137 │ │ │ │ │ -138 return result; │ │ │ │ │ -139 } │ │ │ │ │ -140 │ │ │ │ │ -141 template │ │ │ │ │ -142 static constexpr std::array computeValues │ │ │ │ │ -(std::index_sequence) │ │ │ │ │ -143 { │ │ │ │ │ -144 int codim = 0, i = 0; │ │ │ │ │ -145 return {{ ((void)I, nextValue(codim, i))... }}; │ │ │ │ │ -146 } │ │ │ │ │ -147 │ │ │ │ │ -148 static constexpr std::array _offsets = computeOffsets(std:: │ │ │ │ │ -make_index_sequence{}); │ │ │ │ │ -149 static constexpr std::array _values = │ │ │ │ │ -computeValues(std::make_index_sequence{}); │ │ │ │ │ -150 │ │ │ │ │ -151 }; │ │ │ │ │ -152 │ │ │ │ │ -153 // functor for doing the actual entity shift calculation │ │ │ │ │ -154 template │ │ │ │ │ -155 struct calculate_entity_shift │ │ │ │ │ -156 { │ │ │ │ │ -157 static constexpr unsigned long long evaluate(int index, int cc) │ │ │ │ │ -158 { │ │ │ │ │ -159 auto result = 0ull; │ │ │ │ │ -160 for (int d = dim; d>0; d--) │ │ │ │ │ -161 { │ │ │ │ │ -162 if (cc == d) │ │ │ │ │ -163 return result; │ │ │ │ │ -164 if (index < subEnt(d-1,cc)) │ │ │ │ │ -165 result |= 1ull << (d-1); │ │ │ │ │ -166 else │ │ │ │ │ -167 { │ │ │ │ │ -168 index = (index - subEnt(d-1, cc)) % subEnt(d-1,cc-1); │ │ │ │ │ -169 cc--; │ │ │ │ │ +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 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 } │ │ │ │ │ -172 return result; │ │ │ │ │ -173 } │ │ │ │ │ -174 }; │ │ │ │ │ -175 │ │ │ │ │ -184 template │ │ │ │ │ -185 std::bitset entityShift(int index, int cc) │ │ │ │ │ +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 EntityShiftTable,dim>::evaluate │ │ │ │ │ -(index,cc); │ │ │ │ │ +187 return _supersize[i]; │ │ │ │ │ 188 } │ │ │ │ │ 189 │ │ │ │ │ -190 // functor for doing the actual entity move calculation │ │ │ │ │ -191 template │ │ │ │ │ -192 struct calculate_entity_move │ │ │ │ │ -193 { │ │ │ │ │ -194 static constexpr unsigned long long evaluate(int index, int cc) │ │ │ │ │ -195 { │ │ │ │ │ -196 auto result = 0ull; │ │ │ │ │ -197 for (int d = dim; d>0; d--) │ │ │ │ │ +_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 if (d == cc) │ │ │ │ │ -200 { │ │ │ │ │ -201 // result[d-1] = index & (1<<(d-1)); │ │ │ │ │ -202 result &= ~(1ull << (d-1)); │ │ │ │ │ -203 result |= index & (1ull << (d-1)); │ │ │ │ │ -204 │ │ │ │ │ -205 index &= ~(1<<(d-1)); │ │ │ │ │ +199 return _size[i]; │ │ │ │ │ +200 } │ │ │ │ │ +201 │ │ │ │ │ +_2_0_3 _i_T_u_p_e_l _s_i_z_e () const │ │ │ │ │ +204 { │ │ │ │ │ +205 return _size; │ │ │ │ │ 206 } │ │ │ │ │ -207 if (index >= subEnt(d-1,cc)) │ │ │ │ │ -208 { │ │ │ │ │ -209 if ((index - subEnt(d-1,cc)) / subEnt(d-1,cc-1) == 1) │ │ │ │ │ +207 │ │ │ │ │ +_2_0_9 int _t_o_t_a_l_s_i_z_e () const │ │ │ │ │ 210 { │ │ │ │ │ -211 result |= 1ull << (d-1); │ │ │ │ │ -212 } │ │ │ │ │ -213 index = (index - subEnt(d-1, cc)) % subEnt(d-1,cc-1); │ │ │ │ │ -214 cc--; │ │ │ │ │ +211 int s=1; │ │ │ │ │ +212 for (int i=0; i<_d; ++i) │ │ │ │ │ +213 s *= _s_i_z_e(i); │ │ │ │ │ +214 return s; │ │ │ │ │ 215 } │ │ │ │ │ -216 } │ │ │ │ │ -217 return result; │ │ │ │ │ -218 } │ │ │ │ │ -219 │ │ │ │ │ -220 }; │ │ │ │ │ -221 │ │ │ │ │ -229 template │ │ │ │ │ -230 std::bitset entityMove(int index, int cc) │ │ │ │ │ +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 return EntityShiftTable,dim>::evaluate │ │ │ │ │ -(index,cc); │ │ │ │ │ -233 } │ │ │ │ │ -234 │ │ │ │ │ -235#endif //DOXYGEN │ │ │ │ │ -236 │ │ │ │ │ -237 } // namespace Yasp. │ │ │ │ │ -238 │ │ │ │ │ -239 template │ │ │ │ │ -_2_4_0 class _Y_a_s_p_E_n_t_i_t_y │ │ │ │ │ -241 : 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 │ │ │ │ │ +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 │ │ │ │ │ -244 template │ │ │ │ │ -_2_4_5 friend class _Y_a_s_p_L_e_v_e_l_I_t_e_r_a_t_o_r; │ │ │ │ │ -246 │ │ │ │ │ -247 public: │ │ │ │ │ -_2_4_8 typedef typename GridImp::ctype _c_t_y_p_e; │ │ │ │ │ -249 │ │ │ │ │ -_2_5_0 typedef typename GridImp::template Codim::Geometry _G_e_o_m_e_t_r_y; │ │ │ │ │ -_2_5_1 typedef typename GridImp::Traits::template Codim::GeometryImpl │ │ │ │ │ -_G_e_o_m_e_t_r_y_I_m_p_l; │ │ │ │ │ -252 │ │ │ │ │ -_2_5_3 typedef typename GridImp::template Codim::EntitySeed _E_n_t_i_t_y_S_e_e_d; │ │ │ │ │ -254 │ │ │ │ │ -_2_5_6 int _l_e_v_e_l () const │ │ │ │ │ -257 { │ │ │ │ │ -258 return ___g->level(); │ │ │ │ │ -259 } │ │ │ │ │ -260 │ │ │ │ │ -_2_6_4 _E_n_t_i_t_y_S_e_e_d _s_e_e_d() const │ │ │ │ │ -265 { │ │ │ │ │ -266 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())); │ │ │ │ │ -267 } │ │ │ │ │ -268 │ │ │ │ │ -_2_7_0 _G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y () const │ │ │ │ │ -271 { │ │ │ │ │ -272 _G_e_o_m_e_t_r_y_I_m_p_l _geometry(___i_t.lowerleft(),___i_t.upperright(),___i_t.shift()); │ │ │ │ │ -273 return _G_e_o_m_e_t_r_y(_geometry); │ │ │ │ │ -274 } │ │ │ │ │ -275 │ │ │ │ │ -_2_7_9 constexpr GeometryType _t_y_p_e () const │ │ │ │ │ -280 { │ │ │ │ │ -281 return GeometryTypes::cube(_G_e_o_m_e_t_r_y_:_:_m_y_d_i_m_e_n_s_i_o_n); │ │ │ │ │ -282 } │ │ │ │ │ -283 │ │ │ │ │ -_2_8_8 unsigned int _s_u_b_E_n_t_i_t_i_e_s (unsigned int cc) const │ │ │ │ │ -289 { │ │ │ │ │ -290 return Dune::Yasp::subEnt(dim-codim,cc-codim); │ │ │ │ │ -291 } │ │ │ │ │ -292 │ │ │ │ │ -_2_9_4 _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 │ │ │ │ │ -295 { │ │ │ │ │ -296 if (___g->interior[codim].inside(___i_t.coord(),___i_t.shift())) │ │ │ │ │ -297 return _I_n_t_e_r_i_o_r_E_n_t_i_t_y; │ │ │ │ │ -298 if (___g->interiorborder[codim].inside(___i_t.coord(),___i_t.shift())) │ │ │ │ │ -299 return _B_o_r_d_e_r_E_n_t_i_t_y; │ │ │ │ │ -300 if (___g->overlap[codim].inside(___i_t.coord(),___i_t.shift())) │ │ │ │ │ -301 return _O_v_e_r_l_a_p_E_n_t_i_t_y; │ │ │ │ │ -302 if (___g->overlapfront[codim].inside(___i_t.coord(),___i_t.shift())) │ │ │ │ │ -303 return _F_r_o_n_t_E_n_t_i_t_y; │ │ │ │ │ -304 return _G_h_o_s_t_E_n_t_i_t_y; │ │ │ │ │ -305 } │ │ │ │ │ -306 │ │ │ │ │ -_3_0_7 typedef typename GridImp::YGridLevelIterator _Y_G_L_I; │ │ │ │ │ -_3_0_8 typedef typename GridImp::YGrid::Iterator _I; │ │ │ │ │ -_3_0_9 _Y_a_s_p_E_n_t_i_t_y () │ │ │ │ │ -310 {} │ │ │ │ │ -311 │ │ │ │ │ -_3_1_2 _Y_a_s_p_E_n_t_i_t_y (const _Y_G_L_I& g, const _I& it) │ │ │ │ │ -313 : ___i_t(it), ___g(g) │ │ │ │ │ -314 {} │ │ │ │ │ +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 │ │ │ │ │ +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_6 _Y_a_s_p_E_n_t_i_t_y (_Y_G_L_I&& g, const _I&& it) │ │ │ │ │ -317 : ___i_t(_s_t_d::move(it)), ___g(_s_t_d::move(g)) │ │ │ │ │ -318 {} │ │ │ │ │ -319 │ │ │ │ │ -_3_2_1 bool _e_q_u_a_l_s (const _Y_a_s_p_E_n_t_i_t_y& e) const │ │ │ │ │ -322 { │ │ │ │ │ -323 return ___i_t == e.___i_t && ___g == e.___g; │ │ │ │ │ -324 } │ │ │ │ │ -325 │ │ │ │ │ -326 // IndexSets needs access to the private index methods │ │ │ │ │ -327 friend class _D_u_n_e_:_:_Y_a_s_p_I_n_d_e_x_S_e_t; │ │ │ │ │ -328 friend class _D_u_n_e_:_:_Y_a_s_p_I_n_d_e_x_S_e_t; │ │ │ │ │ -329 friend class _D_u_n_e_:_:_Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t; │ │ │ │ │ -_3_3_0 typedef typename GridImp::PersistentIndexType _P_e_r_s_i_s_t_e_n_t_I_n_d_e_x_T_y_p_e; │ │ │ │ │ -331 │ │ │ │ │ -_3_3_3 _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 │ │ │ │ │ -334 { │ │ │ │ │ -335 // get size of global grid (in elements) │ │ │ │ │ -336 std::array size; │ │ │ │ │ -337 │ │ │ │ │ -338 for (int i=0; i& 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 // correct size according to shift │ │ │ │ │ -341 size[i] = ___g->mg->levelSize(___g->level(), i); │ │ │ │ │ -342 if (!___i_t.shift(i)) │ │ │ │ │ -343 size[i]++; │ │ │ │ │ -344 } │ │ │ │ │ -345 │ │ │ │ │ -346 // encode codim │ │ │ │ │ -347 _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()); │ │ │ │ │ +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 │ │ │ │ │ -349 // encode level │ │ │ │ │ -350 id = id << _y_a_s_p_g_r_i_d___l_e_v_e_l___b_i_t_s; │ │ │ │ │ -351 id = id+_P_e_r_s_i_s_t_e_n_t_I_n_d_e_x_T_y_p_e(___g->level()); │ │ │ │ │ -352 │ │ │ │ │ -353 // encode coordinates │ │ │ │ │ -354 for (int i=dim-1; i>=0; i--) │ │ │ │ │ -355 { │ │ │ │ │ -356 id = id << _y_a_s_p_g_r_i_d___d_i_m___b_i_t_s; │ │ │ │ │ -357 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)); │ │ │ │ │ -358 } │ │ │ │ │ -359 │ │ │ │ │ -360 return id; │ │ │ │ │ -361 } │ │ │ │ │ -362 │ │ │ │ │ -_3_6_4 int _c_o_m_p_r_e_s_s_e_d_I_n_d_e_x () const │ │ │ │ │ -365 { │ │ │ │ │ -366 return ___i_t.superindex(); │ │ │ │ │ -367 } │ │ │ │ │ -368 │ │ │ │ │ -_3_7_0 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 │ │ │ │ │ -371 { │ │ │ │ │ -372 // get the shift of the entity and the subentity │ │ │ │ │ -373 // the subentity shift is only available in the space spanned by the entity │ │ │ │ │ -374 std::bitset subent_shift = Dune::Yasp::entityShift │ │ │ │ │ -(i,cc-codim); │ │ │ │ │ -375 std::bitset subent_move = Dune::Yasp::entityMove │ │ │ │ │ -(i,cc-codim); │ │ │ │ │ -376 │ │ │ │ │ -377 std::bitset shift = ___i_t.shift(); │ │ │ │ │ -378 std::array coord = ___i_t.coord(); │ │ │ │ │ -379 for (int j=0, k=0; jsuperincrement(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 if (!shift[j]) │ │ │ │ │ -382 continue; │ │ │ │ │ -383 │ │ │ │ │ -384 coord[j] += subent_move[k]; │ │ │ │ │ -385 shift[j] = subent_shift[k]; │ │ │ │ │ -386 k++; │ │ │ │ │ -387 } │ │ │ │ │ -388 │ │ │ │ │ -389 int which = ___g->overlapfront[cc].shiftmapping(shift); │ │ │ │ │ -390 return ___g->overlapfront[cc].superindex(coord,which); │ │ │ │ │ +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 public: │ │ │ │ │ -_3_9_3 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; } │ │ │ │ │ -_3_9_4 const _Y_G_L_I& _g_r_i_d_l_e_v_e_l() const { return ___g; } │ │ │ │ │ -_3_9_5 _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; } │ │ │ │ │ -_3_9_6 _Y_G_L_I& _g_r_i_d_l_e_v_e_l() { return ___g; } │ │ │ │ │ -_3_9_7 const GridImp * _y_a_s_p_g_r_i_d() const { return ___g->mg; } │ │ │ │ │ -398 protected: │ │ │ │ │ -_3_9_9 _I ___i_t = {}; // position in the grid level │ │ │ │ │ -_4_0_0 _Y_G_L_I ___g = {}; // access to grid level │ │ │ │ │ -401 }; │ │ │ │ │ -402 │ │ │ │ │ -403 │ │ │ │ │ -404 // specialization for codim=0 │ │ │ │ │ -405 template │ │ │ │ │ -_4_0_6 class _Y_a_s_p_E_n_t_i_t_y<0,dim,GridImp> │ │ │ │ │ -407 : 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> │ │ │ │ │ -408 { │ │ │ │ │ -409 constexpr static int dimworld = GridImp::dimensionworld; │ │ │ │ │ -410 │ │ │ │ │ -411 typedef typename GridImp::Traits::template Codim< 0 >::GeometryImpl │ │ │ │ │ -_G_e_o_m_e_t_r_y_I_m_p_l; │ │ │ │ │ -412 │ │ │ │ │ -413 template │ │ │ │ │ -_4_1_4 friend class _Y_a_s_p_L_e_v_e_l_I_t_e_r_a_t_o_r; │ │ │ │ │ -415 │ │ │ │ │ -416 template │ │ │ │ │ -_4_1_7 friend class _Y_a_s_p_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r; │ │ │ │ │ -418 │ │ │ │ │ -419 public: │ │ │ │ │ -_4_2_0 typedef typename GridImp::ctype _c_t_y_p_e; │ │ │ │ │ -421 │ │ │ │ │ -_4_2_2 typedef typename GridImp::YGridLevelIterator _Y_G_L_I; │ │ │ │ │ -_4_2_3 typedef typename GridImp::YGrid::Iterator _I; │ │ │ │ │ -424 │ │ │ │ │ -_4_2_5 typedef typename GridImp::template Codim< 0 >::Geometry _G_e_o_m_e_t_r_y; │ │ │ │ │ -_4_2_6 typedef typename GridImp::template Codim< 0 >::LocalGeometry _L_o_c_a_l_G_e_o_m_e_t_r_y; │ │ │ │ │ -427 │ │ │ │ │ -428 template │ │ │ │ │ -_4_2_9 struct Codim │ │ │ │ │ -430 { │ │ │ │ │ -_4_3_1 typedef typename GridImp::template _C_o_d_i_m_<_c_d_>_:_:_E_n_t_i_t_y _E_n_t_i_t_y; │ │ │ │ │ -432 }; │ │ │ │ │ -433 │ │ │ │ │ -_4_3_4 typedef typename GridImp::template _C_o_d_i_m_<_0_>_:_:_E_n_t_i_t_y _E_n_t_i_t_y; │ │ │ │ │ -_4_3_5 typedef typename GridImp::template Codim<0>::EntitySeed _E_n_t_i_t_y_S_e_e_d; │ │ │ │ │ -_4_3_6 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_3_7 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_3_8 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_3_9 typedef typename GridImp::HierarchicIterator _H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r; │ │ │ │ │ +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 typedef typename GridImp::PersistentIndexType _P_e_r_s_i_s_t_e_n_t_I_n_d_e_x_T_y_p_e; │ │ │ │ │ -443 │ │ │ │ │ -_4_4_5 typedef typename GridImp::YGrid::iTupel _i_T_u_p_e_l; │ │ │ │ │ -446 │ │ │ │ │ -447 // constructor │ │ │ │ │ -_4_4_8 _Y_a_s_p_E_n_t_i_t_y () │ │ │ │ │ -449 {} │ │ │ │ │ -450 │ │ │ │ │ -_4_5_1 _Y_a_s_p_E_n_t_i_t_y (const _Y_G_L_I& g, const _I& it) │ │ │ │ │ -452 : ___i_t(it), ___g(g) │ │ │ │ │ -453 {} │ │ │ │ │ +_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 _Y_a_s_p_E_n_t_i_t_y (const _Y_G_L_I& g, _I&& it) │ │ │ │ │ -456 : ___i_t(_s_t_d::move(it)), ___g(g) │ │ │ │ │ -457 {} │ │ │ │ │ -458 │ │ │ │ │ -_4_5_9 _Y_a_s_p_E_n_t_i_t_y (_Y_G_L_I&& g, _I&& it) │ │ │ │ │ -460 : ___i_t(_s_t_d::move(it)), ___g(_s_t_d::move(g)) │ │ │ │ │ -461 {} │ │ │ │ │ -462 │ │ │ │ │ -_4_6_4 bool _e_q_u_a_l_s (const _Y_a_s_p_E_n_t_i_t_y& e) const │ │ │ │ │ -465 { │ │ │ │ │ -466 return ___i_t == e.___i_t && ___g == e.___g; │ │ │ │ │ -467 } │ │ │ │ │ -468 │ │ │ │ │ -_4_7_0 int _l_e_v_e_l () const { return ___g->level(); } │ │ │ │ │ +_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_5 _E_n_t_i_t_y_S_e_e_d _s_e_e_d () const { │ │ │ │ │ -476 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())); │ │ │ │ │ -477 } │ │ │ │ │ -478 │ │ │ │ │ -_4_8_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 │ │ │ │ │ -481 { │ │ │ │ │ -482 if (___g->interior[0].inside(___i_t.coord(),___i_t.shift())) │ │ │ │ │ -483 return _I_n_t_e_r_i_o_r_E_n_t_i_t_y; │ │ │ │ │ -484 if (___g->overlap[0].inside(___i_t.coord(),___i_t.shift())) │ │ │ │ │ -485 return _O_v_e_r_l_a_p_E_n_t_i_t_y; │ │ │ │ │ -486 DUNE_THROW(_G_r_i_d_E_r_r_o_r, "Impossible GhostEntity"); │ │ │ │ │ -487 return _G_h_o_s_t_E_n_t_i_t_y; │ │ │ │ │ -488 } │ │ │ │ │ -489 │ │ │ │ │ -_4_9_1 _G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y () const { │ │ │ │ │ -492 // the element geometry │ │ │ │ │ -493 auto ll = ___i_t.lowerleft(); │ │ │ │ │ -494 auto ur = ___i_t.upperright(); │ │ │ │ │ -495 │ │ │ │ │ -496 // If on periodic overlap, transform coordinates by domain size │ │ │ │ │ -497 for (int i=0; img->isPeriodic(i)) { │ │ │ │ │ -499 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); │ │ │ │ │ -500 if (coord < 0) { │ │ │ │ │ -501 auto size = ___g->mg->domainSize()[i]; │ │ │ │ │ -502 ll[i] += size; │ │ │ │ │ -503 ur[i] += size; │ │ │ │ │ -504 } 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)) │ │ │ │ │ -{ │ │ │ │ │ -505 auto size = ___g->mg->domainSize()[i]; │ │ │ │ │ -506 ll[i] -= size; │ │ │ │ │ -507 ur[i] -= size; │ │ │ │ │ -508 } │ │ │ │ │ -509 } │ │ │ │ │ -510 } │ │ │ │ │ -511 │ │ │ │ │ -512 GeometryImpl _geometry(ll,ur); │ │ │ │ │ -513 return _G_e_o_m_e_t_r_y( _geometry ); │ │ │ │ │ -514 } │ │ │ │ │ -515 │ │ │ │ │ -_5_1_9 constexpr GeometryType _t_y_p_e () const │ │ │ │ │ -520 { │ │ │ │ │ -521 return GeometryTypes::cube(_G_e_o_m_e_t_r_y_:_:_m_y_d_i_m_e_n_s_i_o_n); │ │ │ │ │ -522 } │ │ │ │ │ -523 │ │ │ │ │ -_5_2_8 template int _c_o_u_n_t () const │ │ │ │ │ -529 { │ │ │ │ │ -530 return Dune::Yasp::subEnt(dim,cc); │ │ │ │ │ +_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 │ │ │ │ │ -_5_3_7 unsigned int _s_u_b_E_n_t_i_t_i_e_s (unsigned int codim) const │ │ │ │ │ -538 { │ │ │ │ │ -539 return Dune::Yasp::subEnt(dim,codim); │ │ │ │ │ +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 │ │ │ │ │ -544 template │ │ │ │ │ -_5_4_5 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 │ │ │ │ │ -546 { │ │ │ │ │ -547 // calculate move bitset │ │ │ │ │ -548 std::bitset move = Dune::Yasp::entityMove(i,cc); │ │ │ │ │ -549 │ │ │ │ │ -550 // get the coordinate and modify it │ │ │ │ │ -551 _i_T_u_p_e_l coord = ___i_t.coord(); │ │ │ │ │ -552 for (int j=0; joverlapfront[cc].shiftmapping(Dune::Yasp::entityShift │ │ │ │ │ -(i,cc)); │ │ │ │ │ -557 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))); │ │ │ │ │ -558 } │ │ │ │ │ +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 _E_n_t_i_t_y _f_a_t_h_e_r () const │ │ │ │ │ +_5_6_1 void _s_e_t_B_e_g_i_n(_D_A_I _b_e_g_i_n) │ │ │ │ │ 562 { │ │ │ │ │ -563 // check if coarse level exists │ │ │ │ │ -564 if (___g->level()<=0) │ │ │ │ │ -565 DUNE_THROW(_G_r_i_d_E_r_r_o_r, "tried to call father on level 0"); │ │ │ │ │ -566 │ │ │ │ │ -567 // yes, get iterator to it │ │ │ │ │ -568 _Y_G_L_I cg(___g); │ │ │ │ │ -569 --cg; │ │ │ │ │ -570 │ │ │ │ │ -571 // coordinates of the cell │ │ │ │ │ -572 _i_T_u_p_e_l coord = ___i_t.coord(); │ │ │ │ │ -573 │ │ │ │ │ -574 // get coordinates on next coarser level │ │ │ │ │ -575 for (int k=0; k(cg,cg->overlap │ │ │ │ │ -[0].begin(coord))); │ │ │ │ │ -578 } │ │ │ │ │ -579 │ │ │ │ │ -_5_8_1 bool _h_a_s_F_a_t_h_e_r () const │ │ │ │ │ -582 { │ │ │ │ │ -583 return (___g->level()>0); │ │ │ │ │ -584 } │ │ │ │ │ -585 │ │ │ │ │ -_5_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 │ │ │ │ │ -589 { │ │ │ │ │ -590 // configure one of the 2^dim transformations │ │ │ │ │ -591 FieldVector ll(0.0),ur(0.5); │ │ │ │ │ -592 │ │ │ │ │ -593 for (int k=0; k& 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 if (___i_t.coord(k)%2) │ │ │ │ │ -596 { │ │ │ │ │ -597 ll[k] = 0.5; │ │ │ │ │ -598 ur[k] = 1.0; │ │ │ │ │ -599 } │ │ │ │ │ -600 } │ │ │ │ │ -601 │ │ │ │ │ -602 return _L_o_c_a_l_G_e_o_m_e_t_r_y( _Y_a_s_p_G_e_o_m_e_t_r_y_<_d_i_m_,_d_i_m_,_G_r_i_d_I_m_p_>(ll,ur) ); │ │ │ │ │ -603 } │ │ │ │ │ -604 │ │ │ │ │ -_6_0_5 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_0_6 const _Y_G_L_I& _g_r_i_d_l_e_v_e_l () const { return ___g; } │ │ │ │ │ -_6_0_7 _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_0_8 _Y_G_L_I& _g_r_i_d_l_e_v_e_l() { return ___g; } │ │ │ │ │ -_6_0_9 const GridImp* _y_a_s_p_g_r_i_d () const { return ___g->mg; } │ │ │ │ │ -610 │ │ │ │ │ -_6_1_1 bool _i_s_L_e_a_f() const │ │ │ │ │ -612 { │ │ │ │ │ -613 return (___g->level() == _y_a_s_p_g_r_i_d()->maxLevel()); │ │ │ │ │ +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 │ │ │ │ │ -_6_1_8 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; } │ │ │ │ │ -619 │ │ │ │ │ -_6_2_2 bool _m_i_g_h_t_V_a_n_i_s_h () const { return false; } │ │ │ │ │ -623 │ │ │ │ │ -_6_2_5 _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 │ │ │ │ │ -626 { │ │ │ │ │ -627 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); │ │ │ │ │ +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 _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 │ │ │ │ │ +_6_3_1 int _c_o_o_r_d (int i) const │ │ │ │ │ 632 { │ │ │ │ │ -633 // only if entity is leaf this iterator delivers intersections │ │ │ │ │ -634 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() ); │ │ │ │ │ -635 } │ │ │ │ │ -636 │ │ │ │ │ -_6_3_8 _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 │ │ │ │ │ -639 { │ │ │ │ │ -640 return ibegin(); │ │ │ │ │ -641 } │ │ │ │ │ -642 │ │ │ │ │ -_6_4_4 _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 │ │ │ │ │ -645 { │ │ │ │ │ -646 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); │ │ │ │ │ -647 } │ │ │ │ │ -648 │ │ │ │ │ -_6_5_0 _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 │ │ │ │ │ -651 { │ │ │ │ │ -652 return iend(); │ │ │ │ │ -653 } │ │ │ │ │ -654 │ │ │ │ │ -_6_5_6 _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 │ │ │ │ │ -657 { │ │ │ │ │ -658 return iend(); │ │ │ │ │ -659 } │ │ │ │ │ -660 │ │ │ │ │ -_6_6_5 _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 │ │ │ │ │ -666 { │ │ │ │ │ -667 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); │ │ │ │ │ -668 } │ │ │ │ │ -669 │ │ │ │ │ -_6_7_1 _H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r hend (int /* maxlevel */) const │ │ │ │ │ -672 { │ │ │ │ │ -673 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()); │ │ │ │ │ -674 } │ │ │ │ │ -675 │ │ │ │ │ -676 private: │ │ │ │ │ -677 // IndexSets needs access to the private index methods │ │ │ │ │ -678 friend class _D_u_n_e_:_:_Y_a_s_p_I_n_d_e_x_S_e_t; │ │ │ │ │ -679 friend class _D_u_n_e_:_:_Y_a_s_p_I_n_d_e_x_S_e_t; │ │ │ │ │ -680 friend class _D_u_n_e_:_:_Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t; │ │ │ │ │ -681 │ │ │ │ │ -683 _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 │ │ │ │ │ -684 { │ │ │ │ │ -685 // encode codim │ │ │ │ │ -686 _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()); │ │ │ │ │ -687 │ │ │ │ │ -688 // encode level │ │ │ │ │ -689 id = id << _y_a_s_p_g_r_i_d___l_e_v_e_l___b_i_t_s; │ │ │ │ │ -690 id = id+_P_e_r_s_i_s_t_e_n_t_I_n_d_e_x_T_y_p_e(___g->level()); │ │ │ │ │ -691 │ │ │ │ │ +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 │ │ │ │ │ -693 // encode coordinates │ │ │ │ │ -694 for (int i=dim-1; i>=0; i--) │ │ │ │ │ +_6_9_4 _I_t_e_r_a_t_o_r& _o_p_e_r_a_t_o_r_+_+_ () │ │ │ │ │ 695 { │ │ │ │ │ -696 id = id << _y_a_s_p_g_r_i_d___d_i_m___b_i_t_s; │ │ │ │ │ -697 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)); │ │ │ │ │ -698 } │ │ │ │ │ -699 │ │ │ │ │ -700 return id; │ │ │ │ │ -701 } │ │ │ │ │ -702 │ │ │ │ │ -704 int _c_o_m_p_r_e_s_s_e_d_I_n_d_e_x () const │ │ │ │ │ -705 { │ │ │ │ │ -706 return ___i_t.superindex(); │ │ │ │ │ +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 │ │ │ │ │ -710 _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 │ │ │ │ │ +_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 // calculate shift and move bitsets │ │ │ │ │ -713 std::bitset shift = Dune::Yasp::entityShift(i,cc); │ │ │ │ │ -714 std::bitset move = Dune::Yasp::entityMove(i,cc); │ │ │ │ │ -715 │ │ │ │ │ -716 int trailing = (cc == dim) ? 1000 : 0; │ │ │ │ │ -717 │ │ │ │ │ -718 std::array size = ___g->mg->levelSize(___g->level()); │ │ │ │ │ -719 std::array coord = ___i_t.coord(); │ │ │ │ │ -720 for (int j=0; jlevel(); k++) │ │ │ │ │ -738 if (coord[j] & (1<* _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 │ │ │ │ │ -746 // encode codim │ │ │ │ │ -747 _P_e_r_s_i_s_t_e_n_t_I_n_d_e_x_T_y_p_e id(shift.to_ulong()); │ │ │ │ │ -748 │ │ │ │ │ -749 // encode level │ │ │ │ │ -750 id = id << _y_a_s_p_g_r_i_d___l_e_v_e_l___b_i_t_s; │ │ │ │ │ -751 id = id+_P_e_r_s_i_s_t_e_n_t_I_n_d_e_x_T_y_p_e(___g->level()-trailing); │ │ │ │ │ -752 │ │ │ │ │ -753 // encode coordinates │ │ │ │ │ -754 for (int j=dim-1; j>=0; j--) │ │ │ │ │ -755 { │ │ │ │ │ -756 id = id << _y_a_s_p_g_r_i_d___d_i_m___b_i_t_s; │ │ │ │ │ -757 id = id+_P_e_r_s_i_s_t_e_n_t_I_n_d_e_x_T_y_p_e(coord[j]>>trailing); │ │ │ │ │ -758 } │ │ │ │ │ -759 │ │ │ │ │ -760 return id; │ │ │ │ │ -761 } │ │ │ │ │ -762 │ │ │ │ │ -764 int _s_u_b_C_o_m_p_r_e_s_s_e_d_I_n_d_e_x (int i, int cc) const │ │ │ │ │ +_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 // get shift and move of the subentity in question │ │ │ │ │ -767 std::bitset shift = Dune::Yasp::entityShift(i,cc); │ │ │ │ │ -768 std::bitset move = Dune::Yasp::entityMove(i,cc); │ │ │ │ │ +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 std::array coord = ___i_t.coord(); │ │ │ │ │ -771 for (int j=0; joverlapfront[cc].shiftmapping(shift); │ │ │ │ │ -775 return ___g->overlapfront[cc].superindex(coord,which); │ │ │ │ │ -776 } │ │ │ │ │ -777 │ │ │ │ │ -778 _I ___i_t = {}; // position in the grid level │ │ │ │ │ -779 _Y_G_L_I ___g = {}; // access to grid level │ │ │ │ │ -780 }; │ │ │ │ │ -781 │ │ │ │ │ -782 │ │ │ │ │ -783 // specialization for codim=dim (vertex) │ │ │ │ │ -784 template │ │ │ │ │ -_7_8_5 class _Y_a_s_p_E_n_t_i_t_y │ │ │ │ │ -786 : 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 │ │ │ │ │ -787 { │ │ │ │ │ -788 constexpr static int dimworld = GridImp::dimensionworld; │ │ │ │ │ -789 │ │ │ │ │ -790 template │ │ │ │ │ -_7_9_1 friend class _Y_a_s_p_L_e_v_e_l_I_t_e_r_a_t_o_r; │ │ │ │ │ +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 typedef typename GridImp::Traits::template Codim::GeometryImpl │ │ │ │ │ -_G_e_o_m_e_t_r_y_I_m_p_l; │ │ │ │ │ +793 private: │ │ │ │ │ 794 │ │ │ │ │ -795 public: │ │ │ │ │ -_7_9_6 typedef typename GridImp::ctype _c_t_y_p_e; │ │ │ │ │ -797 │ │ │ │ │ -_7_9_8 typedef typename GridImp::YGridLevelIterator _Y_G_L_I; │ │ │ │ │ -_7_9_9 typedef typename GridImp::YGrid::Iterator _I; │ │ │ │ │ -800 │ │ │ │ │ -_8_0_1 typedef typename GridImp::template Codim::Geometry _G_e_o_m_e_t_r_y; │ │ │ │ │ -802 │ │ │ │ │ -_8_0_3 typedef typename GridImp::template Codim::EntitySeed _E_n_t_i_t_y_S_e_e_d; │ │ │ │ │ -804 │ │ │ │ │ -_8_0_6 typedef typename GridImp::PersistentIndexType _P_e_r_s_i_s_t_e_n_t_I_n_d_e_x_T_y_p_e; │ │ │ │ │ -807 │ │ │ │ │ -_8_0_9 typedef typename GridImp::YGrid::iTupel _i_T_u_p_e_l; │ │ │ │ │ -810 │ │ │ │ │ -811 // constructor │ │ │ │ │ -_8_1_2 _Y_a_s_p_E_n_t_i_t_y () │ │ │ │ │ -813 {} │ │ │ │ │ -814 │ │ │ │ │ -_8_1_5 _Y_a_s_p_E_n_t_i_t_y (const _Y_G_L_I& g, const _I& it) │ │ │ │ │ -816 : ___i_t(it), ___g(g) │ │ │ │ │ -817 {} │ │ │ │ │ -818 │ │ │ │ │ -_8_1_9 _Y_a_s_p_E_n_t_i_t_y (_Y_G_L_I&& g, _I&& it) │ │ │ │ │ -820 : ___i_t(_s_t_d::move(it)), ___g(_s_t_d::move(g)) │ │ │ │ │ -821 {} │ │ │ │ │ -822 │ │ │ │ │ -_8_2_4 bool _e_q_u_a_l_s (const _Y_a_s_p_E_n_t_i_t_y& e) const │ │ │ │ │ -825 { │ │ │ │ │ -826 return ___i_t == e.___i_t && ___g == e.___g; │ │ │ │ │ -827 } │ │ │ │ │ -828 │ │ │ │ │ -_8_3_0 int _l_e_v_e_l () const {return ___g->level();} │ │ │ │ │ -831 │ │ │ │ │ -_8_3_5 _E_n_t_i_t_y_S_e_e_d _s_e_e_d () const { │ │ │ │ │ -836 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())); │ │ │ │ │ -837 } │ │ │ │ │ -838 │ │ │ │ │ -_8_4_3 unsigned int _s_u_b_E_n_t_i_t_i_e_s (unsigned int cc) const │ │ │ │ │ -844 { │ │ │ │ │ -845 return Dune::Yasp::subEnt(dim-dim,cc-dim); │ │ │ │ │ -846 } │ │ │ │ │ -847 │ │ │ │ │ -_8_4_9 _G_e_o_m_e_t_r_y _g_e_o_m_e_t_r_y () const { │ │ │ │ │ -850 GeometryImpl _geometry((___i_t).lowerleft()); │ │ │ │ │ -851 return _G_e_o_m_e_t_r_y( _geometry ); │ │ │ │ │ -852 } │ │ │ │ │ +_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 │ │ │ │ │ -_8_5_7 constexpr GeometryType _t_y_p_e () const │ │ │ │ │ -858 { │ │ │ │ │ -859 return GeometryTypes::cube(_G_e_o_m_e_t_r_y_:_:_m_y_d_i_m_e_n_s_i_o_n); │ │ │ │ │ -860 } │ │ │ │ │ -861 │ │ │ │ │ -_8_6_3 _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 │ │ │ │ │ +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 if (___g->interior[dim].inside(___i_t.coord(),___i_t.shift())) │ │ │ │ │ -866 return _I_n_t_e_r_i_o_r_E_n_t_i_t_y; │ │ │ │ │ -867 if (___g->interiorborder[dim].inside(___i_t.coord(),___i_t.shift())) │ │ │ │ │ -868 return _B_o_r_d_e_r_E_n_t_i_t_y; │ │ │ │ │ -869 if (___g->overlap[dim].inside(___i_t.coord(),___i_t.shift())) │ │ │ │ │ -870 return _O_v_e_r_l_a_p_E_n_t_i_t_y; │ │ │ │ │ -871 if (___g->overlapfront[dim].inside(___i_t.coord(),___i_t.shift())) │ │ │ │ │ -872 return _F_r_o_n_t_E_n_t_i_t_y; │ │ │ │ │ -873 return _G_h_o_s_t_E_n_t_i_t_y; │ │ │ │ │ -874 } │ │ │ │ │ -875 │ │ │ │ │ -_8_7_7 int _s_u_b_C_o_m_p_r_e_s_s_e_d_I_n_d_e_x (int, unsigned int ) const │ │ │ │ │ -878 { │ │ │ │ │ -879 return _c_o_m_p_r_e_s_s_e_d_I_n_d_e_x(); │ │ │ │ │ +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 │ │ │ │ │ -882 private: │ │ │ │ │ -883 // IndexSets needs access to the private index methods │ │ │ │ │ -884 friend class _D_u_n_e_:_:_Y_a_s_p_I_n_d_e_x_S_e_t; │ │ │ │ │ -885 friend class _D_u_n_e_:_:_Y_a_s_p_I_n_d_e_x_S_e_t; │ │ │ │ │ -886 friend class _D_u_n_e_:_:_Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t; │ │ │ │ │ -887 │ │ │ │ │ -889 _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 │ │ │ │ │ -890 { │ │ │ │ │ -891 // get coordinate and size of global grid │ │ │ │ │ -892 iTupel size = ___g->mg->levelSize(___g->level()); │ │ │ │ │ -893 │ │ │ │ │ -894 for (int i=0; ilevel(); j++) │ │ │ │ │ -907 if (___i_t.coord(i)&(1<level()-trailing; │ │ │ │ │ -916 │ │ │ │ │ -917 // encode codim: shift vector of vertices is 0. │ │ │ │ │ -918 _P_e_r_s_i_s_t_e_n_t_I_n_d_e_x_T_y_p_e id(0); │ │ │ │ │ -919 │ │ │ │ │ -920 // encode level │ │ │ │ │ -921 id = id << _y_a_s_p_g_r_i_d___l_e_v_e_l___b_i_t_s; │ │ │ │ │ -922 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); │ │ │ │ │ -923 │ │ │ │ │ -924 // encode coordinates │ │ │ │ │ -925 for (int i=dim-1; i>=0; i--) │ │ │ │ │ -926 { │ │ │ │ │ -927 id = id << _y_a_s_p_g_r_i_d___d_i_m___b_i_t_s; │ │ │ │ │ -928 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); │ │ │ │ │ -929 } │ │ │ │ │ -930 │ │ │ │ │ -931 return id; │ │ │ │ │ +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 │ │ │ │ │ -935 int _c_o_m_p_r_e_s_s_e_d_I_n_d_e_x () const { return ___i_t.superindex();} │ │ │ │ │ -936 │ │ │ │ │ -937 public: │ │ │ │ │ -_9_3_8 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_3_9 const _Y_G_L_I& _g_r_i_d_l_e_v_e_l() const { return ___g; } │ │ │ │ │ -_9_4_0 _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_4_1 _Y_G_L_I& _g_r_i_d_l_e_v_e_l() { return ___g; } │ │ │ │ │ -942 │ │ │ │ │ -_9_4_3 const GridImp * _y_a_s_p_g_r_i_d() const { return ___g->mg; } │ │ │ │ │ -944 protected: │ │ │ │ │ -_9_4_5 _I ___i_t = {}; // position in the grid level │ │ │ │ │ -_9_4_6 _Y_G_L_I ___g = {}; // access to grid level │ │ │ │ │ -947 }; │ │ │ │ │ -948 │ │ │ │ │ -949} // namespace Dune │ │ │ │ │ -950 │ │ │ │ │ -951#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. │ │ │ │ │ +_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_:_:_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:242 │ │ │ │ │ -_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:256 │ │ │ │ │ -_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:270 │ │ │ │ │ -_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:248 │ │ │ │ │ -_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:279 │ │ │ │ │ -_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:333 │ │ │ │ │ -_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:394 │ │ │ │ │ -_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:393 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_:_:___g │ │ │ │ │ -YGLI _g │ │ │ │ │ -DDeeffiinniittiioonn yaspgridentity.hh:400 │ │ │ │ │ -_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 │ │ │ │ │ +_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 tuple 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 │ │ │ │ │ +return 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 tuple. │ │ │ │ │ +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 yaspgridentity.hh:321 │ │ │ │ │ -_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:294 │ │ │ │ │ -_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:251 │ │ │ │ │ -_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:396 │ │ │ │ │ -_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:370 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_:_:_Y_G_L_I │ │ │ │ │ -GridImp::YGridLevelIterator YGLI │ │ │ │ │ -DDeeffiinniittiioonn yaspgridentity.hh:307 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_:_:_I │ │ │ │ │ -GridImp::YGrid::Iterator I │ │ │ │ │ -DDeeffiinniittiioonn yaspgridentity.hh:308 │ │ │ │ │ -_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:397 │ │ │ │ │ -_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:253 │ │ │ │ │ -_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:316 │ │ │ │ │ -_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:264 │ │ │ │ │ -_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:364 │ │ │ │ │ -_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:312 │ │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_:_:___i_t │ │ │ │ │ -I _it │ │ │ │ │ -DDeeffiinniittiioonn yaspgridentity.hh:399 │ │ │ │ │ -_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:309 │ │ │ │ │ -_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:250 │ │ │ │ │ -_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:330 │ │ │ │ │ -_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:288 │ │ │ │ │ -_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:395 │ │ │ │ │ -_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_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: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_ _>_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y │ │ │ │ │ -GridImp::template Codim< 0 >::LocalGeometry LocalGeometry │ │ │ │ │ -DDeeffiinniittiioonn yaspgridentity.hh:426 │ │ │ │ │ -_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: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_ _>_:_:_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: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(const YGLI &g, I &&it) │ │ │ │ │ -DDeeffiinniittiioonn yaspgridentity.hh:455 │ │ │ │ │ -_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:528 │ │ │ │ │ -_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:435 │ │ │ │ │ -_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:442 │ │ │ │ │ -_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:445 │ │ │ │ │ -_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:606 │ │ │ │ │ -_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: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_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:605 │ │ │ │ │ -_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:420 │ │ │ │ │ -_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:608 │ │ │ │ │ -_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: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_ _>_:_:_y_a_s_p_g_r_i_d │ │ │ │ │ -const GridImp * yaspgrid() const │ │ │ │ │ -DDeeffiinniittiioonn yaspgridentity.hh:609 │ │ │ │ │ -_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:470 │ │ │ │ │ -_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:438 │ │ │ │ │ -_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:459 │ │ │ │ │ -_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:480 │ │ │ │ │ -_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:656 │ │ │ │ │ -_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:622 │ │ │ │ │ -_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:439 │ │ │ │ │ -_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 yaspgridentity.hh:434 │ │ │ │ │ -_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:638 │ │ │ │ │ -_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:650 │ │ │ │ │ -_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: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_ _>_:_:_I │ │ │ │ │ -GridImp::YGrid::Iterator I │ │ │ │ │ -DDeeffiinniittiioonn yaspgridentity.hh:423 │ │ │ │ │ -_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:425 │ │ │ │ │ -_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:491 │ │ │ │ │ -_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:561 │ │ │ │ │ -_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:618 │ │ │ │ │ -_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:519 │ │ │ │ │ -_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:475 │ │ │ │ │ -_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:665 │ │ │ │ │ -_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:625 │ │ │ │ │ -_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 yaspgridentity.hh:422 │ │ │ │ │ -_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:537 │ │ │ │ │ -_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:588 │ │ │ │ │ -_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:436 │ │ │ │ │ -_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:437 │ │ │ │ │ -_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: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_ _>_:_:_i_s_L_e_a_f │ │ │ │ │ -bool isLeaf() const │ │ │ │ │ -DDeeffiinniittiioonn yaspgridentity.hh:611 │ │ │ │ │ -_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:581 │ │ │ │ │ -_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:431 │ │ │ │ │ -_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:830 │ │ │ │ │ -_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: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_ _>_:_:_g_r_i_d_l_e_v_e_l │ │ │ │ │ -YGLI & gridlevel() │ │ │ │ │ -DDeeffiinniittiioonn yaspgridentity.hh:941 │ │ │ │ │ -_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:849 │ │ │ │ │ -_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:815 │ │ │ │ │ -_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:843 │ │ │ │ │ -_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:863 │ │ │ │ │ -_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:796 │ │ │ │ │ -_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:798 │ │ │ │ │ -_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:806 │ │ │ │ │ -_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: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_ _>_:_:_y_a_s_p_g_r_i_d │ │ │ │ │ -const GridImp * yaspgrid() const │ │ │ │ │ -DDeeffiinniittiioonn yaspgridentity.hh:943 │ │ │ │ │ -_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:857 │ │ │ │ │ -_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:799 │ │ │ │ │ -_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:940 │ │ │ │ │ -_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:938 │ │ │ │ │ -_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:809 │ │ │ │ │ -_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:801 │ │ │ │ │ -_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:939 │ │ │ │ │ -_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:819 │ │ │ │ │ -_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:812 │ │ │ │ │ -_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:803 │ │ │ │ │ +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 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00242.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00293.html │ │ │ │┄ Files 99% similar despite different names │ │ │ │ @@ -78,17 +78,17 @@ │ │ │ │ Namespaces | │ │ │ │ Typedefs | │ │ │ │ Variables
│ │ │ │
partitionset.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#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.

│ │ │ │ +

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/a00242_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00293_source.html │ │ │ │┄ Files 99% similar despite different names │ │ │ │ @@ -77,23 +77,23 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
partitionset.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_PARTITIONSET_HH
│ │ │ │
6#define DUNE_GRID_COMMON_PARTITIONSET_HH
│ │ │ │
7
│ │ │ │
8#include <dune/common/typetraits.hh>
│ │ │ │ - │ │ │ │ + │ │ │ │
10
│ │ │ │
11namespace Dune {
│ │ │ │
12
│ │ │ │
18 namespace {
│ │ │ │
19
│ │ │ │
20 // Simple TMP to deduce partition iterator type from set of partitions.
│ │ │ │
21 template<unsigned int partitions>
│ │ │ │ @@ -381,15 +381,15 @@ │ │ │ │
326
│ │ │ │
327 } // namespace Partitions
│ │ │ │
│ │ │ │
328
│ │ │ │
333} // namespace Dune
│ │ │ │
334
│ │ │ │
335#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/a00245.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00263.html │ │ │ │┄ Files 99% similar despite different names │ │ │ │ @@ -77,18 +77,18 @@ │ │ │ │ Namespaces
│ │ │ │
rangegenerators.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>
│ │ │ │ +#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.

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

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00245_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00263_source.html │ │ │ │┄ Files 99% similar despite different names │ │ │ │ @@ -77,26 +77,26 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
rangegenerators.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │
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
│ │ │ │
18
│ │ │ │
206 // *****************************************************************************************
│ │ │ │ @@ -340,16 +340,16 @@ │ │ │ │
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...
│ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00257.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00338.html │ │ │ │┄ Files 99% 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.

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

│ │ │ │ Classes

class  Dune::MultipleCodimMultipleGeomTypeMapper< GV >
 Implementation class for a multiple codim and multiple geometry type mapper. More...
 
│ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00257_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00338_source.html │ │ │ │┄ Files 99% similar despite different names │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
mcmgmapper.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │ @@ -341,15 +341,15 @@ │ │ │ │
377 MCMGLayout layout_; // get layout object
│ │ │ │
378 std::vector<GeometryType> myTypes_[GV::dimension+1];
│ │ │ │
379 };
│ │ │ │
│ │ │ │
380
│ │ │ │
382}
│ │ │ │
383#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.
│ │ │ │
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
│ │ │ │
Mapper interface.
Definition mapper.hh:110
│ │ │ │
Implementation class for a multiple codim and multiple geometry type mapper.
Definition mcmgmapper.hh:129
│ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00272.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00299.html │ │ │ │┄ Files 94% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: mapper.hh File Reference │ │ │ │ +dune-grid: scsgmapper.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,40 +72,41 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
mapper.hh File Reference
│ │ │ │ +
scsgmapper.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

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

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

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

Go to the source code of this file.

│ │ │ │ +

Go to the source code of this file.

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

│ │ │ │ Classes

class  Dune::Mapper< G, MapperImp, IndexType >
 Mapper interface. More...
class  Dune::SingleCodimSingleGeomTypeMapper< GV, c >
 Implementation class for a single codim and single geometry type mapper. 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
│ │ │ │ +

Mapper classes are used to attach data to a grid.

│ │ │ │ +
Author
Peter Bastian
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,27 +2,28 @@ │ │ │ │ │ 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 │ │ │ │ │ +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_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_._._. │ │ │ │ │ +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_._._. │ │ │ │ │   │ │ │ │ │ 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. │ │ │ │ │ +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/a00272_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00626_source.html │ │ │ │┄ Files 92% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: mapper.hh Source File │ │ │ │ +dune-grid: macroelement.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,118 +70,109 @@ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
mapper.hh
│ │ │ │ +
macroelement.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_ALBERTA_MACROELEMENT_HH
│ │ │ │ +
6#define DUNE_ALBERTA_MACROELEMENT_HH
│ │ │ │
7
│ │ │ │ -
8#include <utility>
│ │ │ │ + │ │ │ │
9
│ │ │ │ -
10#include <dune/common/bartonnackmanifcheck.hh>
│ │ │ │ +
10#if HAVE_ALBERTA
│ │ │ │
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 private:
│ │ │ │ -
199 MapperImp& asImp () {return static_cast<MapperImp &> (*this);}
│ │ │ │ -
201 const MapperImp& asImp () const {return static_cast<const MapperImp &>(*this);}
│ │ │ │ -
202 };
│ │ │ │ -
│ │ │ │ -
203
│ │ │ │ -
206#undef CHECK_INTERFACE_IMPLEMENTATION
│ │ │ │ -
207#undef CHECK_AND_CALL_INTERFACE_IMPLEMENTATION
│ │ │ │ -
208
│ │ │ │ -
209}
│ │ │ │ -
210#endif
│ │ │ │ +
12namespace Dune
│ │ │ │ +
13{
│ │ │ │ +
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;
│ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ +
39
│ │ │ │ +
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 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#endif // #ifndef DUNE_ALBERTA_MACROELEMENT_HH
│ │ │ │ +
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ │ + │ │ │ │
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
│ │ │ │ -
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
│ │ │ │ +
static const int InteriorBoundary
Definition misc.hh:59
│ │ │ │ +
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
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,129 +1,109 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ - * _c_o_m_m_o_n │ │ │ │ │ -mapper.hh │ │ │ │ │ + * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ +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 © 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_ALBERTA_MACROELEMENT_HH │ │ │ │ │ +6#define DUNE_ALBERTA_MACROELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ -8#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#include │ │ │ │ │ +10#if HAVE_ALBERTA │ │ │ │ │ 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 private: │ │ │ │ │ -199 MapperImp& asImp () {return static_cast (*this);} │ │ │ │ │ -201 const MapperImp& asImp () const {return static_cast │ │ │ │ │ -(*this);} │ │ │ │ │ -202 }; │ │ │ │ │ -203 │ │ │ │ │ -206#undef CHECK_INTERFACE_IMPLEMENTATION │ │ │ │ │ -207#undef CHECK_AND_CALL_INTERFACE_IMPLEMENTATION │ │ │ │ │ -208 │ │ │ │ │ -209} │ │ │ │ │ -210#endif │ │ │ │ │ +12namespace _D_u_n_e │ │ │ │ │ +13{ │ │ │ │ │ +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; │ │ │ │ │ +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 } │ │ │ │ │ +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 │ │ │ │ │ +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 │ │ │ │ │ +67 │ │ │ │ │ +68#endif // #ifndef DUNE_ALBERTA_MACROELEMENT_HH │ │ │ │ │ +_A_L_B_E_R_T_A │ │ │ │ │ +#define ALBERTA │ │ │ │ │ +DDeeffiinniittiioonn albertaheader.hh:29 │ │ │ │ │ +_m_i_s_c_._h_h │ │ │ │ │ _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_:_:_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_:_:_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_:_:_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 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00275.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00356.html │ │ │ │┄ Files 99% similar despite different names │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ Functions
│ │ │ │
gridenums.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │
#include <iostream>
│ │ │ │ #include <dune/common/exceptions.hh>
│ │ │ │
│ │ │ │ -

Go to the source code of this file.

│ │ │ │ +

Go to the source code of this file.

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

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00275_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00356_source.html │ │ │ │┄ Files 99% similar despite different names │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
gridenums.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │
7
│ │ │ │
8#include <iostream>
│ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00281.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00326.html │ │ │ │┄ Files 99% 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/a00281_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00326_source.html │ │ │ │┄ Files 99% similar despite different names │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
boundarysegment.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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/a00296.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00248.html │ │ │ │┄ Files 99% similar despite different names │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
│ │ │ │
│ │ │ │
#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.

│ │ │ │ +

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...
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00296_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00248_source.html │ │ │ │┄ Files 99% similar despite different names │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
defaultgridview.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │
7
│ │ │ │
8#include <dune/common/typetraits.hh>
│ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00305.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00332.html │ │ │ │┄ Files 99% similar despite different names │ │ │ │ @@ -80,15 +80,15 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │

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

│ │ │ │
#include <dune/common/bartonnackmanifcheck.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 >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00305_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00332_source.html │ │ │ │┄ Files 99% similar despite different names │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
datahandleif.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │
7
│ │ │ │
14#include <dune/common/bartonnackmanifcheck.hh>
│ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00335.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00227.html │ │ │ │┄ Files 82% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: boundaryprojection.hh File Reference │ │ │ │ +dune-grid: torus.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,52 +65,64 @@ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces
│ │ │ │ -
boundaryprojection.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Functions
│ │ │ │ +
torus.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>
│ │ │ │ + │ │ │ │ +

This file provides the infrastructure for toroidal communication in 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"
│ │ │ │
│ │ │ │ -

Go to the source code of this file.

│ │ │ │ +

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

│ │ │ │ Classes

struct  Dune::DuneBoundaryProjection< dimworld >
 Interface class for vertex projection at the boundary. More...
 
class  Dune::BoundaryProjectionWrapper< dimworld >
class  Dune::Torus< Communication, d >
 
class  Dune::BoundarySegmentWrapper< dim, dimworld >
 
struct  Dune::CircleBoundaryProjection< dimworld >
class  Dune::Torus< Communication, d >::ProcListIterator
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

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

│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,33 +1,42 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ + * _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 <_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> │ │ │ │ │ +#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 │ │ │ │ │ -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_:_:_T_o_r_u_s_<_ _C_o_m_m_u_n_i_c_a_t_i_o_n_,_ _d_ _> │ │ │ │ │   │ │ │ │ │ - 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_ _> │ │ │ │ │ +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. │ │ │ │ │   │ │ │ │ │ +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. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00335_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00323_source.html │ │ │ │┄ Files 99% similar despite different names │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
boundaryprojection.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │ -
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.
│ │ │ │ +
Describes the parallel communication interface class for MessageBuffers and DataHandles.
│ │ │ │ + │ │ │ │
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/a00347.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00185.html │ │ │ │┄ Files 92% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: scsgmapper.hh File Reference │ │ │ │ +dune-grid: yaspgridhierarchiciterator.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,48 +65,42 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
scsgmapper.hh File Reference
│ │ │ │ +
yaspgridhierarchiciterator.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>
│ │ │ │ -
│ │ │ │ -

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...
class  Dune::YaspHierarchicIterator< GridImp >
 YaspHierarchicIterator enables iteration over son entities of codim 0. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │

Detailed Description

│ │ │ │ -

Mapper classes are used to attach data to a grid.

│ │ │ │ -
Author
Peter Bastian
│ │ │ │ +

The YaspHierarchicIterator class

│ │ │ │ +

Enables iteration over son entities of codim 0

│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,29 +1,24 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ - * _c_o_m_m_o_n │ │ │ │ │ + * _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 │ │ │ │ │ -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> │ │ │ │ │ +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_:_:_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_:_:_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 ********** │ │ │ │ │ -Mapper classes are used to attach data to a grid. │ │ │ │ │ - Author │ │ │ │ │ - Peter Bastian │ │ │ │ │ +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/a00347_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00299_source.html │ │ │ │┄ Files 99% similar despite different names │ │ │ │ @@ -77,23 +77,23 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
scsgmapper.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │
7
│ │ │ │
8#include <iostream>
│ │ │ │ -
9#include "mapper.hh"
│ │ │ │ +
9#include "mapper.hh"
│ │ │ │
10
│ │ │ │ │ │ │ │
12
│ │ │ │
19namespace Dune
│ │ │ │
20{
│ │ │ │
37 template <typename GV, int c>
│ │ │ │
│ │ │ │ @@ -180,15 +180,15 @@ │ │ │ │
155 GV gridView_;
│ │ │ │
156 const typename GV::IndexSet* indexSet_;
│ │ │ │
157 };
│ │ │ │
│ │ │ │
158
│ │ │ │
160}
│ │ │ │
161#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.
│ │ │ │
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
│ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00362.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00314.html │ │ │ │┄ Files 85% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: adaptcallback.hh File Reference │ │ │ │ +dune-grid: sizecache.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,43 +72,48 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
adaptcallback.hh File Reference
│ │ │ │ +
sizecache.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

interfaces and wrappers needed for the callback adaptation provided by AlbertaGrid and dune-ALUGrid │ │ │ │ +

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

│ │ │ │ - │ │ │ │ -

Go to the source code of this file.

│ │ │ │ +
#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::AdaptDataHandleInterface< Grid, Impl >
 Interface class for the Grid's adapt method where the parameter is a AdaptDataHandleInterface. More...
 
class  Dune::AdaptDataHandle< Grid, Impl >
 
class  Dune::CombinedAdaptProlongRestrict< A, B >
 class for combining 2 index sets together for adaptation process More...
class  Dune::SizeCache< GridImp >
 organizes the caching of sizes for one grid and one GeometryType More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │

Detailed Description

│ │ │ │ -

interfaces and wrappers needed for the callback adaptation provided by AlbertaGrid and dune-ALUGrid

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

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

│ │ │ │ +
Author
Robert Kloefkorn
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,33 +2,36 @@ │ │ │ │ │ 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 │ │ │ │ │ -adaptcallback.hh File Reference │ │ │ │ │ -interfaces and wrappers needed for the callback adaptation provided by │ │ │ │ │ -AlbertaGrid and dune-ALUGrid _M_o_r_e_._._. │ │ │ │ │ +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_:_:_A_d_a_p_t_D_a_t_a_H_a_n_d_l_e_I_n_t_e_r_f_a_c_e_<_ _G_r_i_d_,_ _I_m_p_l_ _> │ │ │ │ │ -  Interface class for the _G_r_i_d's adapt method where the parameter is a │ │ │ │ │ - _A_d_a_p_t_D_a_t_a_H_a_n_d_l_e_I_n_t_e_r_f_a_c_e. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_A_d_a_p_t_D_a_t_a_H_a_n_d_l_e_<_ _G_r_i_d_,_ _I_m_p_l_ _> │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_C_o_m_b_i_n_e_d_A_d_a_p_t_P_r_o_l_o_n_g_R_e_s_t_r_i_c_t_<_ _A_,_ _B_ _> │ │ │ │ │ -  class for combining 2 index sets together for adaptation process │ │ │ │ │ +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. │ │ │ │ │   │ │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -interfaces and wrappers needed for the callback adaptation provided by │ │ │ │ │ -AlbertaGrid and dune-ALUGrid │ │ │ │ │ +Provides size cache classes to implement the grids size method efficiently. │ │ │ │ │ Author │ │ │ │ │ - Martin Nolte │ │ │ │ │ + Robert Kloefkorn │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00362_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00797_source.html │ │ │ │┄ Files 90% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: adaptcallback.hh Source File │ │ │ │ +dune-grid: vtksequencewriterbase.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,184 +70,209 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
adaptcallback.hh
│ │ │ │ +
vtksequencewriterbase.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │ -
15{
│ │ │ │ -
16
│ │ │ │ -
17 // Internal Forward Declarations
│ │ │ │ -
18 // -----------------------------
│ │ │ │ -
19
│ │ │ │ -
20 template< class Grid, class Impl >
│ │ │ │ -
21 class AdaptDataHandle;
│ │ │ │ +
5
│ │ │ │ +
6#ifndef DUNE_GRID_IO_FILE_VTK_VTKSEQUENCEWRITERBASE_HH
│ │ │ │ +
7#define DUNE_GRID_IO_FILE_VTK_VTKSEQUENCEWRITERBASE_HH
│ │ │ │ +
8
│ │ │ │ +
9#include <vector>
│ │ │ │ +
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
│ │ │ │ -
23
│ │ │ │ -
24
│ │ │ │ -
25 // AdaptDataHandleInterface
│ │ │ │ -
26 // ------------------------
│ │ │ │ -
27
│ │ │ │ -
31 template< class Grid, class Impl >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
33 {
│ │ │ │ - │ │ │ │ -
35
│ │ │ │ -
36 friend class AdaptDataHandle< Grid, Impl >;
│ │ │ │ -
37
│ │ │ │ -
38 public:
│ │ │ │ -
39 typedef typename Grid::template Codim< 0 >::Entity Entity;
│ │ │ │ -
40
│ │ │ │ -
41 private:
│ │ │ │ - │ │ │ │ -
43 {}
│ │ │ │ -
44
│ │ │ │ -
45 AdaptDataHandleInterface ( const This & );
│ │ │ │ -
46 This &operator= ( const This & );
│ │ │ │ -
47
│ │ │ │ -
48 public:
│ │ │ │ -
│ │ │ │ -
54 void preCoarsening ( const Entity &father )
│ │ │ │ -
55 {
│ │ │ │ -
56 asImp().preCoarsening( father );
│ │ │ │ -
57 }
│ │ │ │ -
│ │ │ │ -
58
│ │ │ │ -
│ │ │ │ -
64 void postRefinement ( const Entity &father )
│ │ │ │ -
65 {
│ │ │ │ -
66 asImp().postRefinement( father );
│ │ │ │ -
67 }
│ │ │ │ +
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 }
│ │ │ │
│ │ │ │ -
68
│ │ │ │ +
67
│ │ │ │
│ │ │ │ -
69 void restrictLocal( const Entity &father, const Entity& son, bool initialize )
│ │ │ │ +
69 void addCellData (const std::shared_ptr<const typename VTKWriter<GridView>::VTKFunction> &p)
│ │ │ │
70 {
│ │ │ │ -
71 asImp().restrictLocal( father, son, initialize );
│ │ │ │ +
71 vtkWriter_->addCellData(p);
│ │ │ │
72 }
│ │ │ │
│ │ │ │
73
│ │ │ │ -
│ │ │ │ -
74 void prolongLocal( const Entity &father, const Entity& son, bool initialize )
│ │ │ │ -
75 {
│ │ │ │ -
76 asImp().prolongLocal( father, son, initialize );
│ │ │ │ -
77 }
│ │ │ │ -
│ │ │ │ -
78
│ │ │ │ -
79 protected:
│ │ │ │ -
80 const Impl &asImp () const { return static_cast< const Impl & >( *this ); }
│ │ │ │ -
81 Impl &asImp () { return static_cast< Impl & >( *this ); }
│ │ │ │ -
82 };
│ │ │ │ +
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 }
│ │ │ │
│ │ │ │ -
83
│ │ │ │
84
│ │ │ │ -
85
│ │ │ │ -
86 // AdaptDataHandle
│ │ │ │ -
87 // ---------------
│ │ │ │ -
88
│ │ │ │ -
89 template< class Grid, class Impl >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
91 : public AdaptDataHandleInterface< Grid, Impl >
│ │ │ │ -
92 {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
95
│ │ │ │ -
96 public:
│ │ │ │ -
97 typedef typename Base::Entity Entity;
│ │ │ │ -
98
│ │ │ │ -
99 protected:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
101 {}
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
103 private:
│ │ │ │ -
104 AdaptDataHandle ( const This & );
│ │ │ │ -
105 This &operator= ( const This & );
│ │ │ │ -
106
│ │ │ │ -
107 void preCoarsening ( const Entity &father );
│ │ │ │ -
108 void postRefinement ( const Entity &father );
│ │ │ │ -
109 };
│ │ │ │ -
│ │ │ │ -
110
│ │ │ │ -
111
│ │ │ │ -
112 // CombinedAdaptProlongRestrict
│ │ │ │ -
113 // ----------------------------
│ │ │ │ -
114
│ │ │ │ -
116 template <class A, class B >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
118 {
│ │ │ │ -
120 A& _a;
│ │ │ │ -
121 B& _b;
│ │ │ │ -
122 public:
│ │ │ │ -
│ │ │ │ -
124 CombinedAdaptProlongRestrict ( A& a, B& b ) : _a ( a ) , _b ( b )
│ │ │ │ -
125 {}
│ │ │ │ -
│ │ │ │ -
126
│ │ │ │ -
128 template <class Entity>
│ │ │ │ -
│ │ │ │ -
129 void restrictLocal ( const Entity &father, const Entity &son, bool initialize )
│ │ │ │ -
130 {
│ │ │ │ -
131 _a.restrictLocal(father,son,initialize);
│ │ │ │ -
132 _b.restrictLocal(father,son,initialize);
│ │ │ │ -
133 }
│ │ │ │ -
│ │ │ │ -
134
│ │ │ │ -
136 template <class Entity>
│ │ │ │ -
│ │ │ │ -
137 void prolongLocal ( const Entity &father, const Entity &son, bool initialize )
│ │ │ │ -
138 {
│ │ │ │ -
139 _a.prolongLocal(father,son,initialize);
│ │ │ │ -
140 _b.prolongLocal(father,son,initialize);
│ │ │ │ -
141 }
│ │ │ │ -
│ │ │ │ -
142 };
│ │ │ │ -
│ │ │ │ -
143
│ │ │ │ -
144} // end namespace Dune
│ │ │ │ -
145
│ │ │ │ -
146#endif
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ +
Common stuff for the VTKWriter.
│ │ │ │ +
Provides file i/o for the visualization toolkit.
│ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
Definition adaptcallback.hh:92
│ │ │ │ -
Base::Entity Entity
Definition adaptcallback.hh:97
│ │ │ │ -
AdaptDataHandle()
Definition adaptcallback.hh:100
│ │ │ │ -
Interface class for the Grid's adapt method where the parameter is a AdaptDataHandleInterface.
Definition adaptcallback.hh:33
│ │ │ │ -
void prolongLocal(const Entity &father, const Entity &son, bool initialize)
Definition adaptcallback.hh:74
│ │ │ │ -
void postRefinement(const Entity &father)
call back for activity to take place on newly created elements below the father element.
Definition adaptcallback.hh:64
│ │ │ │ -
Grid::template Codim< 0 >::Entity Entity
Definition adaptcallback.hh:39
│ │ │ │ -
Impl & asImp()
Definition adaptcallback.hh:81
│ │ │ │ -
const Impl & asImp() const
Definition adaptcallback.hh:80
│ │ │ │ -
void restrictLocal(const Entity &father, const Entity &son, bool initialize)
Definition adaptcallback.hh:69
│ │ │ │ -
void preCoarsening(const Entity &father)
call back for activity to take place on father and all descendants before the descendants are removed
Definition adaptcallback.hh:54
│ │ │ │ -
class for combining 2 index sets together for adaptation process
Definition adaptcallback.hh:118
│ │ │ │ -
CombinedAdaptProlongRestrict(A &a, B &b)
constructor storing the two references
Definition adaptcallback.hh:124
│ │ │ │ -
void restrictLocal(const Entity &father, const Entity &son, bool initialize)
restrict data to father
Definition adaptcallback.hh:129
│ │ │ │ -
void prolongLocal(const Entity &father, const Entity &son, bool initialize)
prolong data to children
Definition adaptcallback.hh:137
│ │ │ │ -
Wrapper class for entities.
Definition common/entity.hh:66
│ │ │ │ -
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
│ │ │ │ +
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 output of grid functions in the vtk format.
Definition vtkwriter.hh:95
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,202 +1,236 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ - * _c_o_m_m_o_n │ │ │ │ │ -adaptcallback.hh │ │ │ │ │ + * _i_o │ │ │ │ │ + * _f_i_l_e │ │ │ │ │ + * _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 © 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 _D_u_n_e │ │ │ │ │ -15{ │ │ │ │ │ -16 │ │ │ │ │ -17 // Internal Forward Declarations │ │ │ │ │ -18 // ----------------------------- │ │ │ │ │ -19 │ │ │ │ │ -20 template< class Grid, class Impl > │ │ │ │ │ -21 class AdaptDataHandle; │ │ │ │ │ +5 │ │ │ │ │ +6#ifndef DUNE_GRID_IO_FILE_VTK_VTKSEQUENCEWRITERBASE_HH │ │ │ │ │ +7#define DUNE_GRID_IO_FILE_VTK_VTKSEQUENCEWRITERBASE_HH │ │ │ │ │ +8 │ │ │ │ │ +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> │ │ │ │ │ +20 │ │ │ │ │ +21namespace _D_u_n_e { │ │ │ │ │ 22 │ │ │ │ │ -23 │ │ │ │ │ -24 │ │ │ │ │ -25 // AdaptDataHandleInterface │ │ │ │ │ -26 // ------------------------ │ │ │ │ │ -27 │ │ │ │ │ -31 template< class Grid, class Impl > │ │ │ │ │ -_3_2 class _A_d_a_p_t_D_a_t_a_H_a_n_d_l_e_I_n_t_e_r_f_a_c_e │ │ │ │ │ -33 { │ │ │ │ │ -34 typedef _A_d_a_p_t_D_a_t_a_H_a_n_d_l_e_I_n_t_e_r_f_a_c_e_<_ _G_r_i_d_,_ _I_m_p_l_ _> _T_h_i_s; │ │ │ │ │ -35 │ │ │ │ │ -36 friend class _A_d_a_p_t_D_a_t_a_H_a_n_d_l_e< _G_r_i_d, Impl >; │ │ │ │ │ -37 │ │ │ │ │ -38 public: │ │ │ │ │ -_3_9 typedef typename _G_r_i_d_:_:_t_e_m_p_l_a_t_e Codim< 0 >::Entity _E_n_t_i_t_y; │ │ │ │ │ -40 │ │ │ │ │ -41 private: │ │ │ │ │ -42 _A_d_a_p_t_D_a_t_a_H_a_n_d_l_e_I_n_t_e_r_f_a_c_e () │ │ │ │ │ -43 {} │ │ │ │ │ -44 │ │ │ │ │ -45 _A_d_a_p_t_D_a_t_a_H_a_n_d_l_e_I_n_t_e_r_f_a_c_e ( const This & ); │ │ │ │ │ -46 This &operator= ( const This & ); │ │ │ │ │ -47 │ │ │ │ │ -48 public: │ │ │ │ │ -_5_4 void _p_r_e_C_o_a_r_s_e_n_i_n_g ( const _E_n_t_i_t_y &father ) │ │ │ │ │ -55 { │ │ │ │ │ -56 _a_s_I_m_p().preCoarsening( father ); │ │ │ │ │ -57 } │ │ │ │ │ -58 │ │ │ │ │ -_6_4 void _p_o_s_t_R_e_f_i_n_e_m_e_n_t ( const _E_n_t_i_t_y &father ) │ │ │ │ │ -65 { │ │ │ │ │ -66 _a_s_I_m_p().postRefinement( father ); │ │ │ │ │ -67 } │ │ │ │ │ -68 │ │ │ │ │ -_6_9 void _r_e_s_t_r_i_c_t_L_o_c_a_l( const _E_n_t_i_t_y &father, const _E_n_t_i_t_y& son, bool initialize │ │ │ │ │ -) │ │ │ │ │ +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 _a_s_I_m_p().restrictLocal( father, son, initialize ); │ │ │ │ │ +71 vtkWriter_->addCellData(p); │ │ │ │ │ 72 } │ │ │ │ │ 73 │ │ │ │ │ -_7_4 void _p_r_o_l_o_n_g_L_o_c_a_l( const _E_n_t_i_t_y &father, const _E_n_t_i_t_y& son, bool initialize │ │ │ │ │ -) │ │ │ │ │ -75 { │ │ │ │ │ -76 _a_s_I_m_p().prolongLocal( father, son, initialize ); │ │ │ │ │ -77 } │ │ │ │ │ -78 │ │ │ │ │ -79 protected: │ │ │ │ │ -_8_0 const Impl &_a_s_I_m_p () const { return static_cast< const Impl & >( *this ); } │ │ │ │ │ -_8_1 Impl &_a_s_I_m_p () { return static_cast< Impl & >( *this ); } │ │ │ │ │ -82 }; │ │ │ │ │ -83 │ │ │ │ │ +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 │ │ │ │ │ -85 │ │ │ │ │ -86 // AdaptDataHandle │ │ │ │ │ -87 // --------------- │ │ │ │ │ -88 │ │ │ │ │ -89 template< class Grid, class Impl > │ │ │ │ │ -_9_0 class _A_d_a_p_t_D_a_t_a_H_a_n_d_l_e │ │ │ │ │ -91 : public _A_d_a_p_t_D_a_t_a_H_a_n_d_l_e_I_n_t_e_r_f_a_c_e< Grid, Impl > │ │ │ │ │ -92 { │ │ │ │ │ -93 typedef _A_d_a_p_t_D_a_t_a_H_a_n_d_l_e_<_ _G_r_i_d_,_ _I_m_p_l_ _> _T_h_i_s; │ │ │ │ │ -94 typedef _A_d_a_p_t_D_a_t_a_H_a_n_d_l_e_I_n_t_e_r_f_a_c_e_<_ _G_r_i_d_,_ _I_m_p_l_ _> _B_a_s_e; │ │ │ │ │ -95 │ │ │ │ │ -96 public: │ │ │ │ │ -_9_7 typedef typename _B_a_s_e_:_:_E_n_t_i_t_y _E_n_t_i_t_y; │ │ │ │ │ -98 │ │ │ │ │ -99 protected: │ │ │ │ │ -_1_0_0 _A_d_a_p_t_D_a_t_a_H_a_n_d_l_e () │ │ │ │ │ -101 {} │ │ │ │ │ +_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 │ │ │ │ │ -103 private: │ │ │ │ │ -104 _A_d_a_p_t_D_a_t_a_H_a_n_d_l_e ( const This & ); │ │ │ │ │ -105 This &operator= ( const This & ); │ │ │ │ │ -106 │ │ │ │ │ -107 void preCoarsening ( const _E_n_t_i_t_y &father ); │ │ │ │ │ -108 void postRefinement ( const _E_n_t_i_t_y &father ); │ │ │ │ │ -109 }; │ │ │ │ │ -110 │ │ │ │ │ -111 │ │ │ │ │ -112 // CombinedAdaptProlongRestrict │ │ │ │ │ -113 // ---------------------------- │ │ │ │ │ -114 │ │ │ │ │ -116 template │ │ │ │ │ -_1_1_7 class _C_o_m_b_i_n_e_d_A_d_a_p_t_P_r_o_l_o_n_g_R_e_s_t_r_i_c_t │ │ │ │ │ -118 { │ │ │ │ │ -120 A& _a; │ │ │ │ │ -121 B& _b; │ │ │ │ │ -122 public: │ │ │ │ │ -_1_2_4 _C_o_m_b_i_n_e_d_A_d_a_p_t_P_r_o_l_o_n_g_R_e_s_t_r_i_c_t ( A& a, B& b ) : _a ( a ) , _b ( b ) │ │ │ │ │ -125 {} │ │ │ │ │ -126 │ │ │ │ │ -128 template │ │ │ │ │ -_1_2_9 void _r_e_s_t_r_i_c_t_L_o_c_a_l ( const _E_n_t_i_t_y &father, const _E_n_t_i_t_y &son, bool │ │ │ │ │ -initialize ) │ │ │ │ │ -130 { │ │ │ │ │ -131 _a.restrictLocal(father,son,initialize); │ │ │ │ │ -132 _b.restrictLocal(father,son,initialize); │ │ │ │ │ -133 } │ │ │ │ │ -134 │ │ │ │ │ -136 template │ │ │ │ │ -_1_3_7 void _p_r_o_l_o_n_g_L_o_c_a_l ( const _E_n_t_i_t_y &father, const _E_n_t_i_t_y &son, bool │ │ │ │ │ -initialize ) │ │ │ │ │ -138 { │ │ │ │ │ -139 _a.prolongLocal(father,son,initialize); │ │ │ │ │ -140 _b.prolongLocal(father,son,initialize); │ │ │ │ │ -141 } │ │ │ │ │ -142 }; │ │ │ │ │ -143 │ │ │ │ │ -144} // end namespace Dune │ │ │ │ │ -145 │ │ │ │ │ -146#endif │ │ │ │ │ +_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 │ │ │ │ │ +_c_o_m_m_o_n_._h_h │ │ │ │ │ +Common stuff for the VTKWriter. │ │ │ │ │ +_v_t_k_w_r_i_t_e_r_._h_h │ │ │ │ │ +Provides file i/o for the visualization toolkit. │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_A_d_a_p_t_D_a_t_a_H_a_n_d_l_e │ │ │ │ │ -DDeeffiinniittiioonn adaptcallback.hh:92 │ │ │ │ │ -_D_u_n_e_:_:_A_d_a_p_t_D_a_t_a_H_a_n_d_l_e_:_:_E_n_t_i_t_y │ │ │ │ │ -Base::Entity Entity │ │ │ │ │ -DDeeffiinniittiioonn adaptcallback.hh:97 │ │ │ │ │ -_D_u_n_e_:_:_A_d_a_p_t_D_a_t_a_H_a_n_d_l_e_:_:_A_d_a_p_t_D_a_t_a_H_a_n_d_l_e │ │ │ │ │ -AdaptDataHandle() │ │ │ │ │ -DDeeffiinniittiioonn adaptcallback.hh:100 │ │ │ │ │ -_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_:_:_A_d_a_p_t_D_a_t_a_H_a_n_d_l_e_I_n_t_e_r_f_a_c_e_:_:_p_r_o_l_o_n_g_L_o_c_a_l │ │ │ │ │ -void prolongLocal(const Entity &father, const Entity &son, bool initialize) │ │ │ │ │ -DDeeffiinniittiioonn adaptcallback.hh:74 │ │ │ │ │ -_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_:_:_p_o_s_t_R_e_f_i_n_e_m_e_n_t │ │ │ │ │ -void postRefinement(const Entity &father) │ │ │ │ │ -call back for activity to take place on newly created elements below the father │ │ │ │ │ -element. │ │ │ │ │ -DDeeffiinniittiioonn adaptcallback.hh:64 │ │ │ │ │ -_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_:_:_E_n_t_i_t_y │ │ │ │ │ -Grid::template Codim< 0 >::Entity Entity │ │ │ │ │ -DDeeffiinniittiioonn adaptcallback.hh:39 │ │ │ │ │ -_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_:_:_a_s_I_m_p │ │ │ │ │ -Impl & asImp() │ │ │ │ │ -DDeeffiinniittiioonn adaptcallback.hh:81 │ │ │ │ │ -_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_:_:_a_s_I_m_p │ │ │ │ │ -const Impl & asImp() const │ │ │ │ │ -DDeeffiinniittiioonn adaptcallback.hh:80 │ │ │ │ │ -_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_:_:_r_e_s_t_r_i_c_t_L_o_c_a_l │ │ │ │ │ -void restrictLocal(const Entity &father, const Entity &son, bool initialize) │ │ │ │ │ -DDeeffiinniittiioonn adaptcallback.hh:69 │ │ │ │ │ -_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_:_:_p_r_e_C_o_a_r_s_e_n_i_n_g │ │ │ │ │ -void preCoarsening(const Entity &father) │ │ │ │ │ -call back for activity to take place on father and all descendants before the │ │ │ │ │ -descendants are removed │ │ │ │ │ -DDeeffiinniittiioonn adaptcallback.hh:54 │ │ │ │ │ -_D_u_n_e_:_:_C_o_m_b_i_n_e_d_A_d_a_p_t_P_r_o_l_o_n_g_R_e_s_t_r_i_c_t │ │ │ │ │ -class for combining 2 index sets together for adaptation process │ │ │ │ │ -DDeeffiinniittiioonn adaptcallback.hh:118 │ │ │ │ │ -_D_u_n_e_:_:_C_o_m_b_i_n_e_d_A_d_a_p_t_P_r_o_l_o_n_g_R_e_s_t_r_i_c_t_:_:_C_o_m_b_i_n_e_d_A_d_a_p_t_P_r_o_l_o_n_g_R_e_s_t_r_i_c_t │ │ │ │ │ -CombinedAdaptProlongRestrict(A &a, B &b) │ │ │ │ │ -constructor storing the two references │ │ │ │ │ -DDeeffiinniittiioonn adaptcallback.hh:124 │ │ │ │ │ -_D_u_n_e_:_:_C_o_m_b_i_n_e_d_A_d_a_p_t_P_r_o_l_o_n_g_R_e_s_t_r_i_c_t_:_:_r_e_s_t_r_i_c_t_L_o_c_a_l │ │ │ │ │ -void restrictLocal(const Entity &father, const Entity &son, bool initialize) │ │ │ │ │ -restrict data to father │ │ │ │ │ -DDeeffiinniittiioonn adaptcallback.hh:129 │ │ │ │ │ -_D_u_n_e_:_:_C_o_m_b_i_n_e_d_A_d_a_p_t_P_r_o_l_o_n_g_R_e_s_t_r_i_c_t_:_:_p_r_o_l_o_n_g_L_o_c_a_l │ │ │ │ │ -void prolongLocal(const Entity &father, const Entity &son, bool initialize) │ │ │ │ │ -prolong data to children │ │ │ │ │ -DDeeffiinniittiioonn adaptcallback.hh:137 │ │ │ │ │ -_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_:_:_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_:_:_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 output 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/a00578.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00590.html │ │ │ │┄ Files 99% similar despite different names │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │
coordfunction.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#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.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00578_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00590_source.html │ │ │ │┄ Files 99% similar despite different names │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
coordfunction.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │
7
│ │ │ │
8#include <cassert>
│ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00602.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00608.html │ │ │ │┄ Files 81% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: cachedcoordfunction.hh File Reference │ │ │ │ +dune-grid: identity.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,42 +72,31 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
cachedcoordfunction.hh File Reference
│ │ │ │ +
identity.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <cassert>
│ │ │ │ -#include <memory>
│ │ │ │ -#include <dune/common/typetraits.hh>
│ │ │ │ -#include <dune/grid/common/gridenums.hh>
│ │ │ │ -#include <dune/grid/geometrygrid/capabilities.hh>
│ │ │ │ -#include <dune/grid/geometrygrid/coordfunctioncaller.hh>
│ │ │ │ -#include <dune/grid/utility/persistentcontainer.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::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 >
│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::GeoGrid::CoordCache< HostGrid, Coordinate >
 
class  Dune::CachedCoordFunction< HostGrid, CoordFunction >
class  Dune::IdenticalCoordFunction< ctype, dim >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::GeoGrid
 namespace containing the implementations of GeometryGrid
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,30 +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 │ │ │ │ │ -cachedcoordfunction.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_/_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_/_c_o_o_r_d_f_u_n_c_t_i_o_n_c_a_l_l_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_._h_h> │ │ │ │ │ +identity.hh File Reference │ │ │ │ │ +#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_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_C_o_o_r_d_C_a_c_h_e_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_i_n_a_t_e_ _> │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_C_a_c_h_e_d_C_o_o_r_d_F_u_n_c_t_i_o_n_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_ _> │ │ │ │ │ +class   _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_<_ _c_t_y_p_e_,_ _d_i_m_ _> │ │ │ │ │   │ │ │ │ │ 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/a00602_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00809_source.html │ │ │ │┄ Files 84% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: cachedcoordfunction.hh Source File │ │ │ │ +dune-grid: skeletonfunction.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,274 +70,189 @@ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
cachedcoordfunction.hh
│ │ │ │ +
skeletonfunction.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_CACHEDCOORDFUNCTION_HH
│ │ │ │ -
6#define DUNE_GEOGRID_CACHEDCOORDFUNCTION_HH
│ │ │ │ -
7
│ │ │ │ -
8#include <cassert>
│ │ │ │ +
5
│ │ │ │ +
6#ifndef DUNE_GRID_IO_FILE_VTK_SKELETONFUNCTION_HH
│ │ │ │ +
7#define DUNE_GRID_IO_FILE_VTK_SKELETONFUNCTION_HH
│ │ │ │ +
8
│ │ │ │
9#include <memory>
│ │ │ │ -
10
│ │ │ │ -
11#include <dune/common/typetraits.hh>
│ │ │ │ +
10#include <string>
│ │ │ │ +
11#include <vector>
│ │ │ │
12
│ │ │ │ - │ │ │ │ +
13#include <dune/common/fvector.hh>
│ │ │ │
14
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
18
│ │ │ │ -
19namespace Dune
│ │ │ │ -
20{
│ │ │ │ -
21
│ │ │ │ -
22 // Internal Forward Declarations
│ │ │ │ -
23 // -----------------------------
│ │ │ │ -
24
│ │ │ │ -
25 template< class HostGrid, class CoordFunction >
│ │ │ │ -
26 class CachedCoordFunction;
│ │ │ │ -
27
│ │ │ │ -
28
│ │ │ │ -
29
│ │ │ │ -
30 // GeoGrid::CoordCache
│ │ │ │ -
31 // -------------------
│ │ │ │ -
32
│ │ │ │ -
33 namespace GeoGrid
│ │ │ │ -
34 {
│ │ │ │ +
19namespace Dune {
│ │ │ │ +
20
│ │ │ │ +
23
│ │ │ │ +
29 namespace VTK {
│ │ │ │ +
30
│ │ │ │ +
32 //
│ │ │ │ +
33 // Prototype for VTKFunktions on the skeleton
│ │ │ │ +
34 //
│ │ │ │
35
│ │ │ │ -
36 template< class HostGrid, class Coordinate >
│ │ │ │ +
36 template<typename GV, typename RF>
│ │ │ │
│ │ │ │ - │ │ │ │ -
38 {
│ │ │ │ - │ │ │ │ + │ │ │ │ +
38 typedef GV GridView;
│ │ │ │ +
39 typedef typename GV::Intersection Cell;
│ │ │ │
40
│ │ │ │ -
41 static const unsigned int dimension = HostGrid::dimension;
│ │ │ │ -
42
│ │ │ │ -
43 typedef typename HostGrid::template Codim< dimension >::Entity Vertex;
│ │ │ │ +
41 typedef typename GV::ctype DomainField;
│ │ │ │ +
42 static const unsigned dimDomain = GV::dimension-1;
│ │ │ │ +
43 typedef FieldVector<DomainField, dimDomain> Domain;
│ │ │ │
44
│ │ │ │ - │ │ │ │ -
46
│ │ │ │ -
47 public:
│ │ │ │ -
│ │ │ │ -
48 explicit CoordCache ( const HostGrid &hostGrid )
│ │ │ │ -
49 : data_( hostGrid, dimension )
│ │ │ │ -
50 {}
│ │ │ │ -
│ │ │ │ -
51
│ │ │ │ -
52 template< class Entity >
│ │ │ │ -
│ │ │ │ -
53 const Coordinate &operator() ( const Entity &entity, unsigned int corner ) const
│ │ │ │ -
54 {
│ │ │ │ -
55 return data_( entity, corner );
│ │ │ │ -
56 }
│ │ │ │ -
│ │ │ │ +
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
│ │ │ │ -
│ │ │ │ -
58 const Coordinate &operator() ( const Vertex &vertex, unsigned int corner ) const
│ │ │ │ -
59 {
│ │ │ │ -
60 assert( corner == 0 );
│ │ │ │ -
61 return data_[ vertex ];
│ │ │ │ -
62 }
│ │ │ │ -
│ │ │ │ -
63
│ │ │ │ -
64 template< class Entity >
│ │ │ │ -
│ │ │ │ -
65 Coordinate &operator() ( const Entity &entity, unsigned int corner )
│ │ │ │ -
66 {
│ │ │ │ -
67 return data_( entity,corner) ;
│ │ │ │ -
68 }
│ │ │ │ +
59
│ │ │ │ +
65 void evaluate(const typename Traits::Cell& c,
│ │ │ │ +
66 const typename Traits::Domain& xl,
│ │ │ │ +
67 typename Traits::Range& result) const;
│ │ │ │ +
68 };
│ │ │ │
│ │ │ │
69
│ │ │ │ -
│ │ │ │ -
70 Coordinate &operator() ( const Vertex &vertex, unsigned int corner )
│ │ │ │ -
71 {
│ │ │ │ -
72 assert( corner == 0 );
│ │ │ │ -
73 return data_[ vertex ];
│ │ │ │ -
74 }
│ │ │ │ -
│ │ │ │ -
75
│ │ │ │ -
│ │ │ │ -
76 void adapt ()
│ │ │ │ -
77 {
│ │ │ │ -
78 data_.resize();
│ │ │ │ -
79 data_.shrinkToFit();
│ │ │ │ -
80 }
│ │ │ │ -
│ │ │ │ -
81
│ │ │ │ -
82 private:
│ │ │ │ -
83 CoordCache ( const This & );
│ │ │ │ -
84 This &operator= ( const This & );
│ │ │ │ +
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 DataCache data_;
│ │ │ │ -
87 };
│ │ │ │ -
│ │ │ │ -
88
│ │ │ │ -
89 } // namespace GeoGrid
│ │ │ │ -
90
│ │ │ │ +
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
│ │ │ │ -
93 // CachedCoordFunction
│ │ │ │ -
94 // -------------------
│ │ │ │ -
95
│ │ │ │ -
96 template< class HostGrid, class CoordFunction >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
98 : public DiscreteCoordFunction< typename CoordFunction::ctype, CoordFunction::dimRange, CachedCoordFunction< HostGrid, CoordFunction > >
│ │ │ │ -
99 {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
102
│ │ │ │ -
103 public:
│ │ │ │ -
104 typedef typename Base::ctype ctype;
│ │ │ │ -
105
│ │ │ │ - │ │ │ │ +
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 { }
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
108 private:
│ │ │ │ - │ │ │ │ +
109 virtual unsigned ncomps() const { return dimR; }
│ │ │ │
110
│ │ │ │ -
111 public:
│ │ │ │ -
112 explicit
│ │ │ │ -
│ │ │ │ -
113 CachedCoordFunction ( const HostGrid &hostGrid,
│ │ │ │ -
114 const CoordFunction &coordFunction = CoordFunction() )
│ │ │ │ -
115 : hostGrid_( hostGrid ),
│ │ │ │ -
116 coordFunction_( coordFunction ),
│ │ │ │ -
117 cache_( hostGrid )
│ │ │ │ -
118 {
│ │ │ │ -
119 buildCache();
│ │ │ │ -
120 }
│ │ │ │ -
│ │ │ │ -
121
│ │ │ │ -
│ │ │ │ -
122 void adapt ()
│ │ │ │ -
123 {
│ │ │ │ -
124 cache_.adapt();
│ │ │ │ -
125 buildCache();
│ │ │ │ -
126 }
│ │ │ │ -
│ │ │ │ -
127
│ │ │ │ -
128 void buildCache ();
│ │ │ │ -
129
│ │ │ │ -
130 template< class HostEntity >
│ │ │ │ -
131 void insertEntity ( const HostEntity &hostEntity );
│ │ │ │ -
132
│ │ │ │ -
133 template< class HostEntity >
│ │ │ │ -
│ │ │ │ -
134 void evaluate ( const HostEntity &hostEntity, unsigned int corner, RangeVector &y ) const
│ │ │ │ -
135 {
│ │ │ │ -
136 y = cache_( hostEntity, corner );
│ │ │ │ -
137#ifndef NDEBUG
│ │ │ │ - │ │ │ │ -
139 CoordFunctionCaller;
│ │ │ │ -
140
│ │ │ │ -
141 RangeVector z;
│ │ │ │ -
142 CoordFunctionCaller coordFunctionCaller( hostEntity, coordFunction_ );
│ │ │ │ -
143 coordFunctionCaller.evaluate( corner, z );
│ │ │ │ -
144 assert( ((y - z).two_norm() < 1e-6) );
│ │ │ │ -
145#endif
│ │ │ │ -
146 }
│ │ │ │ -
│ │ │ │ -
147
│ │ │ │ -
148 private:
│ │ │ │ -
149 const HostGrid &hostGrid_;
│ │ │ │ -
150 const CoordFunction &coordFunction_;
│ │ │ │ -
151 Cache cache_;
│ │ │ │ -
152 };
│ │ │ │ -
│ │ │ │ -
153
│ │ │ │ -
154
│ │ │ │ -
155
│ │ │ │ -
156 // Implementation of CachedCoordFunction
│ │ │ │ -
157 // -------------------------------------
│ │ │ │ -
158
│ │ │ │ -
159 template< class HostGrid, class CoordFunction >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
161 {
│ │ │ │ -
162 typedef typename HostGrid::template Codim< 0 >::Entity Element;
│ │ │ │ -
163 typedef typename HostGrid::LevelGridView MacroView;
│ │ │ │ -
164 typedef typename HostGrid::HierarchicIterator HierarchicIterator;
│ │ │ │ -
165
│ │ │ │ -
166 typedef typename MacroView::template Codim< 0 >::template Partition< All_Partition >::Iterator MacroIterator;
│ │ │ │ -
167
│ │ │ │ -
168 const MacroView macroView = hostGrid_.levelGridView( 0 );
│ │ │ │ -
169 const int maxLevel = hostGrid_.maxLevel();
│ │ │ │ -
170
│ │ │ │ -
171 const MacroIterator mend = macroView.template end< 0, All_Partition >();
│ │ │ │ -
172 for( MacroIterator mit = macroView.template begin< 0, All_Partition >(); mit != mend; ++mit )
│ │ │ │ -
173 {
│ │ │ │ -
174 const Element &macroElement = *mit;
│ │ │ │ -
175 insertEntity( macroElement );
│ │ │ │ -
176
│ │ │ │ -
177 const HierarchicIterator hend = macroElement.hend( maxLevel );
│ │ │ │ -
178 for( HierarchicIterator hit = macroElement.hbegin( maxLevel ); hit != hend; ++hit )
│ │ │ │ -
179 insertEntity( *hit );
│ │ │ │ -
180 }
│ │ │ │ -
181 }
│ │ │ │ -
│ │ │ │ -
182
│ │ │ │ -
183
│ │ │ │ -
184 template< class HostGrid, class CoordFunction >
│ │ │ │ -
185 template< class HostEntity >
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
187 ::insertEntity ( const HostEntity &hostEntity )
│ │ │ │ -
188 {
│ │ │ │ - │ │ │ │ -
190 CoordFunctionCaller;
│ │ │ │ -
191
│ │ │ │ -
192 CoordFunctionCaller coordFunctionCaller( hostEntity, coordFunction_ );
│ │ │ │ -
193 auto refElement = referenceElement< ctype, HostEntity::dimension >( hostEntity.type() );
│ │ │ │ -
194
│ │ │ │ -
195 const unsigned int numCorners = refElement.size( HostEntity::dimension );
│ │ │ │ -
196 for( unsigned int i = 0; i < numCorners; ++i )
│ │ │ │ -
197 coordFunctionCaller.evaluate( i, cache_( hostEntity, i ) );
│ │ │ │ -
198 }
│ │ │ │ -
│ │ │ │ -
199
│ │ │ │ -
200} // namespace Dune
│ │ │ │ -
201
│ │ │ │ -
202#endif // #ifndef DUNE_GEOGRID_CACHEDCOORDFUNCTION_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ +
│ │ │ │ +
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 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
│ │ │ │ -
void buildCache()
Definition cachedcoordfunction.hh:160
│ │ │ │ -
void insertEntity(const HostEntity &hostEntity)
Definition cachedcoordfunction.hh:187
│ │ │ │ -
Definition cachedcoordfunction.hh:38
│ │ │ │ -
void adapt()
Definition cachedcoordfunction.hh:76
│ │ │ │ -
CoordCache(const HostGrid &hostGrid)
Definition cachedcoordfunction.hh:48
│ │ │ │ -
const Coordinate & operator()(const Entity &entity, unsigned int corner) const
Definition cachedcoordfunction.hh:53
│ │ │ │ -
Derive an implementation of a discrete coordinate function from this class.
Definition coordfunction.hh:248
│ │ │ │ -
Base::RangeVector RangeVector
Definition coordfunction.hh:253
│ │ │ │ -
ct ctype
field type of the coordinate vector
Definition coordfunction.hh:185
│ │ │ │ -
Definition coordfunctioncaller.hh:21
│ │ │ │ -
DUNE-conform implementation of the entity.
Definition geometrygrid/entity.hh:694
│ │ │ │ - │ │ │ │ -
void resize(const Value &value=Value())
Definition persistentcontainermap.hh:87
│ │ │ │ -
void shrinkToFit()
Definition persistentcontainermap.hh:93
│ │ │ │ - │ │ │ │ - │ │ │ │ +
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 {} │ │ │ │ │ @@ -1,290 +1,234 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ - * _g_e_o_m_e_t_r_y_g_r_i_d │ │ │ │ │ -cachedcoordfunction.hh │ │ │ │ │ + * _i_o │ │ │ │ │ + * _f_i_l_e │ │ │ │ │ + * _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 © 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_CACHEDCOORDFUNCTION_HH │ │ │ │ │ -6#define DUNE_GEOGRID_CACHEDCOORDFUNCTION_HH │ │ │ │ │ -7 │ │ │ │ │ -8#include │ │ │ │ │ +5 │ │ │ │ │ +6#ifndef DUNE_GRID_IO_FILE_VTK_SKELETONFUNCTION_HH │ │ │ │ │ +7#define DUNE_GRID_IO_FILE_VTK_SKELETONFUNCTION_HH │ │ │ │ │ +8 │ │ │ │ │ 9#include │ │ │ │ │ -10 │ │ │ │ │ -11#include │ │ │ │ │ +10#include │ │ │ │ │ +11#include │ │ │ │ │ 12 │ │ │ │ │ -13#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> │ │ │ │ │ +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_/_c_o_o_r_d_f_u_n_c_t_i_o_n_c_a_l_l_e_r_._h_h> │ │ │ │ │ -17#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> │ │ │ │ │ +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{ │ │ │ │ │ -21 │ │ │ │ │ -22 // Internal Forward Declarations │ │ │ │ │ -23 // ----------------------------- │ │ │ │ │ -24 │ │ │ │ │ -25 template< class HostGrid, class CoordFunction > │ │ │ │ │ -26 class CachedCoordFunction; │ │ │ │ │ -27 │ │ │ │ │ -28 │ │ │ │ │ -29 │ │ │ │ │ -30 // GeoGrid::CoordCache │ │ │ │ │ -31 // ------------------- │ │ │ │ │ -32 │ │ │ │ │ -33 namespace GeoGrid │ │ │ │ │ -34 { │ │ │ │ │ +19namespace _D_u_n_e { │ │ │ │ │ +20 │ │ │ │ │ +23 │ │ │ │ │ +29 namespace VTK { │ │ │ │ │ +30 │ │ │ │ │ +32 // │ │ │ │ │ +33 // Prototype for VTKFunktions on the skeleton │ │ │ │ │ +34 // │ │ │ │ │ 35 │ │ │ │ │ -36 template< class HostGrid, class Coordinate > │ │ │ │ │ -_3_7 class _C_o_o_r_d_C_a_c_h_e │ │ │ │ │ -38 { │ │ │ │ │ -39 typedef _C_o_o_r_d_C_a_c_h_e_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_i_n_a_t_e_ _> _T_h_i_s; │ │ │ │ │ +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 │ │ │ │ │ -41 static const unsigned int dimension = HostGrid::dimension; │ │ │ │ │ -42 │ │ │ │ │ -43 typedef typename HostGrid::template Codim< dimension >::Entity Vertex; │ │ │ │ │ +_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 │ │ │ │ │ -45 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_,_ _C_o_o_r_d_i_n_a_t_e_ _> _D_a_t_a_C_a_c_h_e; │ │ │ │ │ -46 │ │ │ │ │ -47 public: │ │ │ │ │ -_4_8 explicit _C_o_o_r_d_C_a_c_h_e ( const HostGrid &hostGrid ) │ │ │ │ │ -49 : data_( hostGrid, dimension ) │ │ │ │ │ -50 {} │ │ │ │ │ -51 │ │ │ │ │ -52 template< class Entity > │ │ │ │ │ -_5_3 const Coordinate &_o_p_e_r_a_t_o_r_(_)_ ( const _E_n_t_i_t_y &entity, unsigned int corner ) │ │ │ │ │ -const │ │ │ │ │ -54 { │ │ │ │ │ -55 return data_( entity, corner ); │ │ │ │ │ -56 } │ │ │ │ │ +_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 │ │ │ │ │ -_5_8 const Coordinate &_o_p_e_r_a_t_o_r_(_)_ ( const Vertex &vertex, unsigned int corner ) │ │ │ │ │ -const │ │ │ │ │ -59 { │ │ │ │ │ -60 assert( corner == 0 ); │ │ │ │ │ -61 return data_[ vertex ]; │ │ │ │ │ -62 } │ │ │ │ │ -63 │ │ │ │ │ -64 template< class Entity > │ │ │ │ │ -_6_5 Coordinate &_o_p_e_r_a_t_o_r_(_)_ ( const _E_n_t_i_t_y &entity, unsigned int corner ) │ │ │ │ │ -66 { │ │ │ │ │ -67 return data_( entity,corner) ; │ │ │ │ │ -68 } │ │ │ │ │ +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 │ │ │ │ │ -_7_0 Coordinate &_o_p_e_r_a_t_o_r_(_)_ ( const Vertex &vertex, unsigned int corner ) │ │ │ │ │ -71 { │ │ │ │ │ -72 assert( corner == 0 ); │ │ │ │ │ -73 return data_[ vertex ]; │ │ │ │ │ -74 } │ │ │ │ │ -75 │ │ │ │ │ -_7_6 void _a_d_a_p_t () │ │ │ │ │ -77 { │ │ │ │ │ -78 data_._r_e_s_i_z_e(); │ │ │ │ │ -79 data_._s_h_r_i_n_k_T_o_F_i_t(); │ │ │ │ │ -80 } │ │ │ │ │ -81 │ │ │ │ │ -82 private: │ │ │ │ │ -83 _C_o_o_r_d_C_a_c_h_e ( const This & ); │ │ │ │ │ -84 This &operator= ( const This & ); │ │ │ │ │ +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 DataCache data_; │ │ │ │ │ -87 }; │ │ │ │ │ -88 │ │ │ │ │ -89 } // namespace GeoGrid │ │ │ │ │ -90 │ │ │ │ │ +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 │ │ │ │ │ -93 // CachedCoordFunction │ │ │ │ │ -94 // ------------------- │ │ │ │ │ -95 │ │ │ │ │ -96 template< class HostGrid, class CoordFunction > │ │ │ │ │ -_9_7 class _C_a_c_h_e_d_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ -98 : public _D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n< typename CoordFunction::ctype, │ │ │ │ │ -CoordFunction::dimRange, CachedCoordFunction< HostGrid, CoordFunction > > │ │ │ │ │ -99 { │ │ │ │ │ -100 typedef _C_a_c_h_e_d_C_o_o_r_d_F_u_n_c_t_i_o_n_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_ _> _T_h_i_s; │ │ │ │ │ -101 typedef _D_i_s_c_r_e_t_e_C_o_o_r_d_F_u_n_c_t_i_o_n_<_ _t_y_p_e_n_a_m_e_ _C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_c_t_y_p_e_, │ │ │ │ │ -_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_d_i_m_R_a_n_g_e_,_ _T_h_i_s_ _> _B_a_s_e; │ │ │ │ │ -102 │ │ │ │ │ -103 public: │ │ │ │ │ -_1_0_4 typedef typename _B_a_s_e_:_:_c_t_y_p_e _c_t_y_p_e; │ │ │ │ │ -105 │ │ │ │ │ -_1_0_6 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; │ │ │ │ │ +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 │ │ │ │ │ -108 private: │ │ │ │ │ -109 typedef _G_e_o_G_r_i_d_:_:_C_o_o_r_d_C_a_c_h_e_<_ _H_o_s_t_G_r_i_d_,_ _R_a_n_g_e_V_e_c_t_o_r_ _> _C_a_c_h_e; │ │ │ │ │ +_1_0_9 virtual unsigned _n_c_o_m_p_s() const { return dimR; } │ │ │ │ │ 110 │ │ │ │ │ -111 public: │ │ │ │ │ -112 explicit │ │ │ │ │ -_1_1_3 _C_a_c_h_e_d_C_o_o_r_d_F_u_n_c_t_i_o_n ( const HostGrid &hostGrid, │ │ │ │ │ -114 const CoordFunction &coordFunction = CoordFunction() ) │ │ │ │ │ -115 : hostGrid_( hostGrid ), │ │ │ │ │ -116 coordFunction_( coordFunction ), │ │ │ │ │ -117 cache_( hostGrid ) │ │ │ │ │ -118 { │ │ │ │ │ -119 _b_u_i_l_d_C_a_c_h_e(); │ │ │ │ │ -120 } │ │ │ │ │ -121 │ │ │ │ │ -_1_2_2 void _a_d_a_p_t () │ │ │ │ │ -123 { │ │ │ │ │ -124 cache_._a_d_a_p_t(); │ │ │ │ │ -125 _b_u_i_l_d_C_a_c_h_e(); │ │ │ │ │ -126 } │ │ │ │ │ -127 │ │ │ │ │ -128 void _b_u_i_l_d_C_a_c_h_e (); │ │ │ │ │ -129 │ │ │ │ │ -130 template< class HostEntity > │ │ │ │ │ -131 void _i_n_s_e_r_t_E_n_t_i_t_y ( const HostEntity &hostEntity ); │ │ │ │ │ -132 │ │ │ │ │ -133 template< class HostEntity > │ │ │ │ │ -_1_3_4 void _e_v_a_l_u_a_t_e ( const HostEntity &hostEntity, unsigned int corner, │ │ │ │ │ -_R_a_n_g_e_V_e_c_t_o_r &y ) const │ │ │ │ │ -135 { │ │ │ │ │ -136 y = cache_( hostEntity, corner ); │ │ │ │ │ -137#ifndef NDEBUG │ │ │ │ │ -138 typedef _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_<_ _H_o_s_t_E_n_t_i_t_y_,_ _t_y_p_e_n_a_m_e_ _C_o_o_r_d_F_u_n_c_t_i_o_n_:_: │ │ │ │ │ -_I_n_t_e_r_f_a_c_e_ _> │ │ │ │ │ -139 CoordFunctionCaller; │ │ │ │ │ -140 │ │ │ │ │ -141 _R_a_n_g_e_V_e_c_t_o_r z; │ │ │ │ │ -142 CoordFunctionCaller coordFunctionCaller( hostEntity, coordFunction_ ); │ │ │ │ │ -143 coordFunctionCaller.evaluate( corner, z ); │ │ │ │ │ -144 assert( ((y - z).two_norm() < 1e-6) ); │ │ │ │ │ -145#endif │ │ │ │ │ -146 } │ │ │ │ │ -147 │ │ │ │ │ -148 private: │ │ │ │ │ -149 const HostGrid &hostGrid_; │ │ │ │ │ -150 const CoordFunction &coordFunction_; │ │ │ │ │ -151 Cache cache_; │ │ │ │ │ -152 }; │ │ │ │ │ -153 │ │ │ │ │ -154 │ │ │ │ │ -155 │ │ │ │ │ -156 // Implementation of CachedCoordFunction │ │ │ │ │ -157 // ------------------------------------- │ │ │ │ │ -158 │ │ │ │ │ -159 template< class HostGrid, class CoordFunction > │ │ │ │ │ -_1_6_0 inline void _C_a_c_h_e_d_C_o_o_r_d_F_u_n_c_t_i_o_n_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_ _>_:_:_b_u_i_l_d_C_a_c_h_e () │ │ │ │ │ -161 { │ │ │ │ │ -162 typedef typename HostGrid::template Codim< 0 >::Entity Element; │ │ │ │ │ -163 typedef typename HostGrid::LevelGridView MacroView; │ │ │ │ │ -164 typedef typename HostGrid::HierarchicIterator HierarchicIterator; │ │ │ │ │ -165 │ │ │ │ │ -166 typedef typename MacroView::template Codim< 0 >::template Partition< │ │ │ │ │ -All_Partition >::Iterator MacroIterator; │ │ │ │ │ -167 │ │ │ │ │ -168 const MacroView macroView = hostGrid_.levelGridView( 0 ); │ │ │ │ │ -169 const int maxLevel = hostGrid_.maxLevel(); │ │ │ │ │ -170 │ │ │ │ │ -171 const MacroIterator mend = macroView.template end< 0, All_Partition >(); │ │ │ │ │ -172 for( MacroIterator mit = macroView.template begin< 0, All_Partition >(); │ │ │ │ │ -mit != mend; ++mit ) │ │ │ │ │ -173 { │ │ │ │ │ -174 const Element ¯oElement = *mit; │ │ │ │ │ -175 insertEntity( macroElement ); │ │ │ │ │ -176 │ │ │ │ │ -177 const HierarchicIterator hend = macroElement.hend( maxLevel ); │ │ │ │ │ -178 for( HierarchicIterator hit = macroElement.hbegin( maxLevel ); hit != hend; │ │ │ │ │ -++hit ) │ │ │ │ │ -179 insertEntity( *hit ); │ │ │ │ │ -180 } │ │ │ │ │ -181 } │ │ │ │ │ -182 │ │ │ │ │ -183 │ │ │ │ │ -184 template< class HostGrid, class CoordFunction > │ │ │ │ │ -185 template< class HostEntity > │ │ │ │ │ -186 inline void _C_a_c_h_e_d_C_o_o_r_d_F_u_n_c_t_i_o_n_<_ _H_o_s_t_G_r_i_d_,_ _C_o_o_r_d_F_u_n_c_t_i_o_n_ _> │ │ │ │ │ -_1_8_7_ _:_:_i_n_s_e_r_t_E_n_t_i_t_y ( const HostEntity &hostEntity ) │ │ │ │ │ -188 { │ │ │ │ │ -189 typedef _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_<_ _H_o_s_t_E_n_t_i_t_y_,_ _t_y_p_e_n_a_m_e_ _C_o_o_r_d_F_u_n_c_t_i_o_n_:_: │ │ │ │ │ -_I_n_t_e_r_f_a_c_e_ _> │ │ │ │ │ -190 CoordFunctionCaller; │ │ │ │ │ -191 │ │ │ │ │ -192 CoordFunctionCaller coordFunctionCaller( hostEntity, coordFunction_ ); │ │ │ │ │ -193 auto refElement = referenceElement< ctype, HostEntity::dimension > │ │ │ │ │ -( hostEntity.type() ); │ │ │ │ │ -194 │ │ │ │ │ -195 const unsigned int numCorners = refElement.size( HostEntity::dimension ); │ │ │ │ │ -196 for( unsigned int i = 0; i < numCorners; ++i ) │ │ │ │ │ -197 coordFunctionCaller.evaluate( i, cache_( hostEntity, i ) ); │ │ │ │ │ -198 } │ │ │ │ │ -199 │ │ │ │ │ -200} // namespace Dune │ │ │ │ │ -201 │ │ │ │ │ -202#endif // #ifndef DUNE_GEOGRID_CACHEDCOORDFUNCTION_HH │ │ │ │ │ -_g_r_i_d_e_n_u_m_s_._h_h │ │ │ │ │ -_c_o_o_r_d_f_u_n_c_t_i_o_n_c_a_l_l_e_r_._h_h │ │ │ │ │ +_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 │ │ │ │ │ +_v_t_u_w_r_i_t_e_r_._h_h │ │ │ │ │ +_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 │ │ │ │ │ _D_u_n_e │ │ │ │ │ Include standard header files. │ │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_C_a_c_h_e_d_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ -DDeeffiinniittiioonn cachedcoordfunction.hh:99 │ │ │ │ │ -_D_u_n_e_:_:_C_a_c_h_e_d_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_a_d_a_p_t │ │ │ │ │ -void adapt() │ │ │ │ │ -DDeeffiinniittiioonn cachedcoordfunction.hh:122 │ │ │ │ │ -_D_u_n_e_:_:_C_a_c_h_e_d_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_C_a_c_h_e_d_C_o_o_r_d_F_u_n_c_t_i_o_n │ │ │ │ │ -CachedCoordFunction(const HostGrid &hostGrid, const CoordFunction │ │ │ │ │ -&coordFunction=CoordFunction()) │ │ │ │ │ -DDeeffiinniittiioonn cachedcoordfunction.hh:113 │ │ │ │ │ -_D_u_n_e_:_:_C_a_c_h_e_d_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ -void evaluate(const HostEntity &hostEntity, unsigned int corner, RangeVector │ │ │ │ │ -&y) const │ │ │ │ │ -DDeeffiinniittiioonn cachedcoordfunction.hh:134 │ │ │ │ │ -_D_u_n_e_:_:_C_a_c_h_e_d_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_c_t_y_p_e │ │ │ │ │ -Base::ctype ctype │ │ │ │ │ -DDeeffiinniittiioonn cachedcoordfunction.hh:104 │ │ │ │ │ -_D_u_n_e_:_:_C_a_c_h_e_d_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 cachedcoordfunction.hh:106 │ │ │ │ │ -_D_u_n_e_:_:_C_a_c_h_e_d_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_b_u_i_l_d_C_a_c_h_e │ │ │ │ │ -void buildCache() │ │ │ │ │ -DDeeffiinniittiioonn cachedcoordfunction.hh:160 │ │ │ │ │ -_D_u_n_e_:_:_C_a_c_h_e_d_C_o_o_r_d_F_u_n_c_t_i_o_n_:_:_i_n_s_e_r_t_E_n_t_i_t_y │ │ │ │ │ -void insertEntity(const HostEntity &hostEntity) │ │ │ │ │ -DDeeffiinniittiioonn cachedcoordfunction.hh:187 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_C_o_o_r_d_C_a_c_h_e │ │ │ │ │ -DDeeffiinniittiioonn cachedcoordfunction.hh:38 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_C_o_o_r_d_C_a_c_h_e_:_:_a_d_a_p_t │ │ │ │ │ -void adapt() │ │ │ │ │ -DDeeffiinniittiioonn cachedcoordfunction.hh:76 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_C_o_o_r_d_C_a_c_h_e_:_:_C_o_o_r_d_C_a_c_h_e │ │ │ │ │ -CoordCache(const HostGrid &hostGrid) │ │ │ │ │ -DDeeffiinniittiioonn cachedcoordfunction.hh:48 │ │ │ │ │ -_D_u_n_e_:_:_G_e_o_G_r_i_d_:_:_C_o_o_r_d_C_a_c_h_e_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ │ -const Coordinate & operator()(const Entity &entity, unsigned int corner) const │ │ │ │ │ -DDeeffiinniittiioonn cachedcoordfunction.hh:53 │ │ │ │ │ -_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_:_:_R_a_n_g_e_V_e_c_t_o_r │ │ │ │ │ -Base::RangeVector RangeVector │ │ │ │ │ -DDeeffiinniittiioonn coordfunction.hh:253 │ │ │ │ │ -_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_:_:_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_:_:_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_:_:_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_,_ _C_o_o_r_d_i_n_a_t_e_ _> │ │ │ │ │ -_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_:_:_s_h_r_i_n_k_T_o_F_i_t │ │ │ │ │ -void shrinkToFit() │ │ │ │ │ -DDeeffiinniittiioonn persistentcontainermap.hh:93 │ │ │ │ │ -_c_a_p_a_b_i_l_i_t_i_e_s_._h_h │ │ │ │ │ -_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_:_:_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/a00605.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00638.html │ │ │ │┄ Files 88% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: identity.hh File Reference │ │ │ │ +dune-grid: indexsets.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,33 +65,26 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ Namespaces
│ │ │ │ -
identity.hh File Reference
│ │ │ │ +
indexsets.cc File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/grid/geometrygrid/coordfunction.hh>
│ │ │ │ -
│ │ │ │ -

Go to the source code of this file.

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

│ │ │ │ -Classes

class  Dune::IdenticalCoordFunction< ctype, dim >
 
│ │ │ │ +
#include <dune/grid/albertagrid/indexsets.hh>
│ │ │ │ +#include <dune/grid/albertagrid/agrid.hh>
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ │
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,20 +1,17 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ -identity.hh File Reference │ │ │ │ │ -#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_. │ │ │ │ │ -CCllaasssseess │ │ │ │ │ -class   _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_<_ _c_t_y_p_e_,_ _d_i_m_ _> │ │ │ │ │ -  │ │ │ │ │ + * _a_l_b_e_r_t_a_g_r_i_d │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +indexsets.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_d_e_x_s_e_t_s_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_a_g_r_i_d_._h_h> │ │ │ │ │ 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/a00605_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00884_source.html │ │ │ │┄ Files 78% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: identity.hh Source File │ │ │ │ +dune-grid: dim.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,73 +70,79 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
identity.hh
│ │ │ │ +
dim.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_IDENTITY_HH
│ │ │ │ -
6#define DUNE_GEOGRID_IDENTITY_HH
│ │ │ │ +
5#ifndef DUNE_DGF_DIMBLOCK_HH
│ │ │ │ +
6#define DUNE_DGF_DIMBLOCK_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ +
8#include <iostream>
│ │ │ │
9
│ │ │ │ -
10namespace Dune
│ │ │ │ -
11{
│ │ │ │ + │ │ │ │ +
11
│ │ │ │
12
│ │ │ │ -
13 template< class ctype, unsigned int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
16 < ctype, dim, dim, IdenticalCoordFunction< ctype, dim > >
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │ +
15
│ │ │ │ +
16 namespace dgf
│ │ │ │
17 {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
20
│ │ │ │ -
21 public:
│ │ │ │ -
22 typedef typename Base :: DomainVector DomainVector;
│ │ │ │ -
23 typedef typename Base :: RangeVector RangeVector;
│ │ │ │ -
24
│ │ │ │ -
25 template< typename... Args >
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │
│ │ │ │ - │ │ │ │ -
27 {}
│ │ │ │ +
26 int dim() {
│ │ │ │ +
27 return _dim;
│ │ │ │ +
28 }
│ │ │ │
│ │ │ │ -
28
│ │ │ │
│ │ │ │ - │ │ │ │ -
30 {
│ │ │ │ -
31 return x;
│ │ │ │ -
32 }
│ │ │ │ +
29 int dimworld() {
│ │ │ │ +
30 return _dimworld;
│ │ │ │ +
31 }
│ │ │ │ +
│ │ │ │ +
32 // some information
│ │ │ │ +
│ │ │ │ +
33 bool ok() {
│ │ │ │ +
34 return true;
│ │ │ │ +
35 }
│ │ │ │
│ │ │ │ -
33
│ │ │ │ -
34 };
│ │ │ │ +
36 };
│ │ │ │
│ │ │ │ -
35
│ │ │ │ -
36}
│ │ │ │
37
│ │ │ │ -
38#endif
│ │ │ │ - │ │ │ │ +
38 } // end namespace dgf
│ │ │ │ +
39
│ │ │ │ +
40} // end namespace Dune
│ │ │ │ +
41
│ │ │ │ +
42#endif
│ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
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
│ │ │ │ +
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 {} │ │ │ │ │ @@ -1,71 +1,77 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ - * _g_e_o_m_e_t_r_y_g_r_i_d │ │ │ │ │ -identity.hh │ │ │ │ │ + * _i_o │ │ │ │ │ + * _f_i_l_e │ │ │ │ │ + * _d_g_f_p_a_r_s_e_r │ │ │ │ │ + * _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 © 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_IDENTITY_HH │ │ │ │ │ -6#define DUNE_GEOGRID_IDENTITY_HH │ │ │ │ │ +5#ifndef DUNE_DGF_DIMBLOCK_HH │ │ │ │ │ +6#define DUNE_DGF_DIMBLOCK_HH │ │ │ │ │ 7 │ │ │ │ │ -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> │ │ │ │ │ +8#include │ │ │ │ │ 9 │ │ │ │ │ -10namespace _D_u_n_e │ │ │ │ │ -11{ │ │ │ │ │ +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 │ │ │ │ │ -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 > > │ │ │ │ │ +13namespace _D_u_n_e │ │ │ │ │ +14{ │ │ │ │ │ +15 │ │ │ │ │ +16 namespace dgf │ │ │ │ │ 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 │ │ │ │ │ +_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 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 │ │ │ │ │ -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 │ │ │ │ │ -36} │ │ │ │ │ +_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#endif │ │ │ │ │ -_c_o_o_r_d_f_u_n_c_t_i_o_n_._h_h │ │ │ │ │ +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_:_:_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 │ │ │ │ │ +_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/a00617.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00575.html │ │ │ │┄ Files 78% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: macroelement.hh File Reference │ │ │ │ +dune-grid: declaration.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,40 +65,31 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ Namespaces
│ │ │ │ -
macroelement.hh File Reference
│ │ │ │ +
declaration.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/grid/albertagrid/misc.hh>
│ │ │ │ -
│ │ │ │ -

Go to the source code of this file.

│ │ │ │ + │ │ │ │ +

Go to the source code of this file.

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

│ │ │ │ -Classes

struct  Dune::Alberta::MacroElement< dim >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::Alberta
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,22 +1,16 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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> │ │ │ │ │ + * _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 │ │ │ │ │ _G_o_ _t_o_ _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_ _> │ │ │ │ │ -  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   Include standard header files. │ │ │ │ │   │ │ │ │ │ -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/a00617_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00821_source.html │ │ │ │┄ Files 82% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: macroelement.hh Source File │ │ │ │ +dune-grid: b64enc.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,109 +70,108 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
macroelement.hh
│ │ │ │ +
b64enc.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │ -
7
│ │ │ │ - │ │ │ │ -
9
│ │ │ │ -
10#if HAVE_ALBERTA
│ │ │ │ -
11
│ │ │ │ -
12namespace Dune
│ │ │ │ -
13{
│ │ │ │ -
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;
│ │ │ │ -
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 };
│ │ │ │ +
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
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ -
39
│ │ │ │ -
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 template< int dim >
│ │ │ │ -
│ │ │ │ -
49 inline int MacroElement< dim >::boundaryId ( const int face ) const
│ │ │ │ -
50 {
│ │ │ │ -
51 return wall_bound[ face ];
│ │ │ │ +
│ │ │ │ +
33 struct b64chunk
│ │ │ │ +
34 {
│ │ │ │ +
35 using size_type = unsigned char;
│ │ │ │ + │ │ │ │ +
37 char txt[3];
│ │ │ │ +
38
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
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#endif // #ifndef DUNE_ALBERTA_MACROELEMENT_HH
│ │ │ │ - │ │ │ │ -
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
static const int InteriorBoundary
Definition misc.hh:59
│ │ │ │ -
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
│ │ │ │ +
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 {} │ │ │ │ │ @@ -1,109 +1,112 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ + * _i_o │ │ │ │ │ + * _f_i_l_e │ │ │ │ │ + * _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 © 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 │ │ │ │ │ -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{ │ │ │ │ │ -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 │ │ │ │ │ +5 │ │ │ │ │ +6#ifndef DUNE_GRID_IO_FILE_VTK_B64ENC_HH │ │ │ │ │ +7#define DUNE_GRID_IO_FILE_VTK_B64ENC_HH │ │ │ │ │ +8 │ │ │ │ │ +9#include │ │ │ │ │ +10 │ │ │ │ │ +11namespace _D_u_n_e { │ │ │ │ │ +12 │ │ │ │ │ +_2_3 const char _b_a_s_e_6_4_t_a_b_l_e[] = │ │ │ │ │ 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 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; │ │ │ │ │ +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 │ │ │ │ │ -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 │ │ │ │ │ -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 │ │ │ │ │ -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 ]; │ │ │ │ │ +_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 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 │ │ │ │ │ -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#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 │ │ │ │ │ +_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 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_:_:_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_:_:_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_:_:_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/a00680_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00620_source.html │ │ │ │┄ Files 99% similar despite different names │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
undefine-3.0.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_
│ │ │ │
15
│ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00698_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00818_source.html │ │ │ │┄ Files 89% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: entity.cc Source File │ │ │ │ +dune-grid: functionwriter.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,497 +70,479 @@ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
entity.cc
│ │ │ │ +
functionwriter.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │ -
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 {}
│ │ │ │ -
│ │ │ │ -
21
│ │ │ │ -
22 template<int codim, int dim, class Grid>
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
25 : grid_( &grid ),
│ │ │ │ -
26 elementInfo_(),
│ │ │ │ -
27 subEntity_( -1 )
│ │ │ │ -
28 {}
│ │ │ │ -
│ │ │ │ +
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
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
24
│ │ │ │ +
25namespace Dune
│ │ │ │ +
26{
│ │ │ │
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
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
41 {
│ │ │ │ -
42 return InteriorEntity;
│ │ │ │ -
43 }
│ │ │ │ -
│ │ │ │ -
44
│ │ │ │ +
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
│ │ │ │ -
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 }
│ │ │ │ +
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 }
│ │ │ │
│ │ │ │ -
66
│ │ │ │
67
│ │ │ │ -
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 }
│ │ │ │ +
│ │ │ │ +
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;
│ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ +
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 };
│ │ │ │ +
│ │ │ │ +
137
│ │ │ │ +
139 //
│ │ │ │ +
140 // Writers for the grid information
│ │ │ │ +
141 //
│ │ │ │ +
142
│ │ │ │ +
144 template<typename Cell>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
146 : public FunctionWriterBase<Cell>
│ │ │ │ +
147 {
│ │ │ │ + │ │ │ │ +
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
│ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
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 }
│ │ │ │ +
│ │ │ │ +
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 }
│ │ │ │
│ │ │ │ -
304
│ │ │ │ +
│ │ │ │ +
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 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 >
│ │ │ │ - │ │ │ │ +
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
│ │ │ │
│ │ │ │ - │ │ │ │ -
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
│ │ │ │ +
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
│ │ │ │ +
Common stuff for the VTKWriter.
│ │ │ │ +
Data array writers for the VTKWriter.
│ │ │ │ + │ │ │ │ + │ │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ │ -
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
│ │ │ │ +
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 {} │ │ │ │ │ @@ -1,505 +1,578 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ + * _i_o │ │ │ │ │ + * _f_i_l_e │ │ │ │ │ + * _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 © 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 │ │ │ │ │ -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 {} │ │ │ │ │ -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 {} │ │ │ │ │ +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> │ │ │ │ │ +24 │ │ │ │ │ +25namespace _D_u_n_e │ │ │ │ │ +26{ │ │ │ │ │ 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 │ │ │ │ │ +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 │ │ │ │ │ -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()); │ │ │ │ │ +_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 } │ │ │ │ │ -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 } │ │ │ │ │ -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(); │ │ │ │ │ +_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; │ │ │ │ │ +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 │ │ │ │ │ +_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 _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 │ │ │ │ │ -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 } │ │ │ │ │ +_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 │ │ │ │ │ -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 */ ) │ │ │ │ │ +_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 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 │ │ │ │ │ +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 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 │ │ │ │ │ +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 │ │ │ │ │ +_c_o_m_m_o_n_._h_h │ │ │ │ │ +Common stuff for the VTKWriter. │ │ │ │ │ +_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 │ │ │ │ │ +_p_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_:_:_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 │ │ │ │ │ -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 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 │ │ │ │ │ +_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/a00719_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00623_source.html │ │ │ │┄ Files 80% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: albertagrid.cc Source File │ │ │ │ +dune-grid: agrid.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,799 +74,845 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
albertagrid.cc
│ │ │ │ +
agrid.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_ALBERTAGRID_IMP_HH
│ │ │ │ +
6#define DUNE_ALBERTAGRID_IMP_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
│ │ │ │ -
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
│ │ │ │ +
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
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
42
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
50
│ │ │ │ +
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
│ │ │ │ +
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 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 {
│ │ │ │ - │ │ │ │ +
121 friend class GridFactory< This >;
│ │ │ │ +
122 friend struct DGFGridFactory< This >;
│ │ │ │ +
123
│ │ │ │ +
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 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_ );
│ │ │ │ +
136 template< class, class >
│ │ │ │ + │ │ │ │ +
138
│ │ │ │ +
139 public:
│ │ │ │ + │ │ │ │ +
142
│ │ │ │ + │ │ │ │ +
144
│ │ │ │ + │ │ │ │ + │ │ │ │ +
147
│ │ │ │ +
148 // the Traits
│ │ │ │ + │ │ │ │ +
150
│ │ │ │ + │ │ │ │ + │ │ │ │ +
155
│ │ │ │ + │ │ │ │
158
│ │ │ │ -
159 levelProvider_.create( dofNumbering_ );
│ │ │ │ -
160
│ │ │ │ -
161#if DUNE_ALBERTA_CACHE_COORDINATES
│ │ │ │ -
162 coordCache_.create( dofNumbering_ );
│ │ │ │ -
163#endif
│ │ │ │ -
164 }
│ │ │ │ -
165
│ │ │ │ + │ │ │ │ + │ │ │ │ +
163
│ │ │ │ + │ │ │ │
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();
│ │ │ │ +
167 private:
│ │ │ │ +
169 typedef typename Traits::template Codim<0>::LeafIterator LeafIterator;
│ │ │ │ +
170
│ │ │ │ +
172 typedef AlbertaGridIdSet<dim,dimworld> IdSetImp;
│ │ │ │ +
173
│ │ │ │ +
175 struct AdaptationState
│ │ │ │ +
176 {
│ │ │ │ +
177 enum Phase { ComputationPhase, PreAdaptationPhase, PostAdaptationPhase };
│ │ │ │ +
178
│ │ │ │ +
179 private:
│ │ │ │ +
180 Phase phase_;
│ │ │ │ +
181 int coarsenMarked_;
│ │ │ │ +
182 int refineMarked_;
│ │ │ │ +
183
│ │ │ │ +
184 public:
│ │ │ │ +
185 AdaptationState ()
│ │ │ │ +
186 : phase_( ComputationPhase ),
│ │ │ │ +
187 coarsenMarked_( 0 ),
│ │ │ │ +
188 refineMarked_( 0 )
│ │ │ │ +
189 {}
│ │ │ │
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 );
│ │ │ │ +
191 void mark ( int count )
│ │ │ │ +
192 {
│ │ │ │ +
193 if( count < 0 )
│ │ │ │ +
194 ++coarsenMarked_;
│ │ │ │ +
195 if( count > 0 )
│ │ │ │ +
196 refineMarked_ += (2 << count);
│ │ │ │ +
197 }
│ │ │ │ +
198
│ │ │ │ +
199 void unmark ( int count )
│ │ │ │ +
200 {
│ │ │ │ +
201 if( count < 0 )
│ │ │ │ +
202 --coarsenMarked_;
│ │ │ │ +
203 if( count > 0 )
│ │ │ │ +
204 refineMarked_ -= (2 << count);
│ │ │ │ +
205 }
│ │ │ │ +
206
│ │ │ │ +
207 bool coarsen () const
│ │ │ │ +
208 {
│ │ │ │ +
209 return (coarsenMarked_ > 0);
│ │ │ │ +
210 }
│ │ │ │ +
211
│ │ │ │ +
212 int refineMarked () const
│ │ │ │ +
213 {
│ │ │ │ +
214 return refineMarked_;
│ │ │ │ +
215 }
│ │ │ │ +
216
│ │ │ │ +
217 void preAdapt ()
│ │ │ │ +
218 {
│ │ │ │ +
219 if( phase_ != ComputationPhase )
│ │ │ │ +
220 error( "preAdapt may only be called in computation phase." );
│ │ │ │ +
221 phase_ = PreAdaptationPhase;
│ │ │ │ +
222 }
│ │ │ │ +
223
│ │ │ │ +
224 void adapt ()
│ │ │ │ +
225 {
│ │ │ │ +
226 if( phase_ != PreAdaptationPhase )
│ │ │ │ +
227 error( "adapt may only be called in preadapdation phase." );
│ │ │ │ +
228 phase_ = PostAdaptationPhase;
│ │ │ │ +
229 }
│ │ │ │
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 }
│ │ │ │ -
│ │ │ │ +
231 void postAdapt ()
│ │ │ │ +
232 {
│ │ │ │ +
233 if( phase_ != PostAdaptationPhase )
│ │ │ │ +
234 error( "postAdapt may only be called in postadaptation phase." );
│ │ │ │ +
235 phase_ = ComputationPhase;
│ │ │ │ +
236
│ │ │ │ +
237 coarsenMarked_ = 0;
│ │ │ │ +
238 refineMarked_ = 0;
│ │ │ │ +
239 }
│ │ │ │ +
240
│ │ │ │ +
241 private:
│ │ │ │ +
242 void error ( const std::string &message )
│ │ │ │ +
243 {
│ │ │ │ + │ │ │ │ +
245 }
│ │ │ │ +
246 };
│ │ │ │ +
247
│ │ │ │ +
248 template< class DataHandler >
│ │ │ │ +
249 struct AdaptationCallback;
│ │ │ │ +
250
│ │ │ │ +
251 // max number of allowed levels is 64
│ │ │ │ +
252 static const int MAXL = 64;
│ │ │ │
253
│ │ │ │ -
254
│ │ │ │ -
255 template< int dim, int dimworld >
│ │ │ │ -
256 template< int codim, PartitionIteratorType pitype >
│ │ │ │ - │ │ │ │ -
258 ::template Codim< codim >::template Partition< pitype >::LeafIterator
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
260 {
│ │ │ │ - │ │ │ │ +
254 typedef Alberta::ElementInfo< dimension > ElementInfo;
│ │ │ │ +
255 typedef Alberta::MeshPointer< dimension > MeshPointer;
│ │ │ │ + │ │ │ │ +
257 typedef AlbertaGridLevelProvider< dimension > LevelProvider;
│ │ │ │ +
258
│ │ │ │ +
259 public:
│ │ │ │ +
260 AlbertaGrid ( const This & ) = delete;
│ │ │ │ +
261 This &operator= ( const This & ) = delete;
│ │ │ │
262
│ │ │ │ -
263 MarkerVector &markerVector = leafMarkerVector_;
│ │ │ │ -
│ │ │ │ -
264 const int firstMarkedCodim = 2;
│ │ │ │ -
265 if( (codim >= firstMarkedCodim) && !markerVector.up2Date() )
│ │ │ │ - │ │ │ │ -
267
│ │ │ │ -
268 return LeafIteratorImp( *this, &markerVector, maxlevel_ );
│ │ │ │ -
269 }
│ │ │ │ -
270
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
272 template< int dim, int dimworld >
│ │ │ │ -
273 template< int codim, PartitionIteratorType pitype >
│ │ │ │ - │ │ │ │ -
275 ::template Codim< codim >::template Partition< pitype >::LeafIterator
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
277 {
│ │ │ │ - │ │ │ │ -
279 return LeafIteratorImp( *this, maxlevel_ );
│ │ │ │ -
280 }
│ │ │ │ -
281
│ │ │ │ -
282
│ │ │ │ -
│ │ │ │ -
283 template< int dim, int dimworld >
│ │ │ │ -
284 template< int codim >
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
288 {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
│ │ │ │ +
264 AlbertaGrid ();
│ │ │ │ +
265
│ │ │ │ + │ │ │ │ +
272 const std::shared_ptr< DuneBoundaryProjection< dimensionworld > > &projection
│ │ │ │ +
273 = std::shared_ptr< DuneBoundaryProjection< dimensionworld > >() );
│ │ │ │ +
274
│ │ │ │ +
275 template< class Proj, class Impl >
│ │ │ │ + │ │ │ │ +
277 const Alberta::ProjectionFactoryInterface< Proj, Impl > &projectionFactory );
│ │ │ │ +
278
│ │ │ │ +
283 AlbertaGrid ( const std::string &macroGridFileName );
│ │ │ │ +
284
│ │ │ │ +
286 ~AlbertaGrid ();
│ │ │ │ +
287
│ │ │ │ +
290 int maxLevel () const;
│ │ │ │
291
│ │ │ │ -
292
│ │ │ │ -
293 template< int dim, int dimworld >
│ │ │ │ -
294 template< int codim >
│ │ │ │ - │ │ │ │ -
296 ::template Codim< codim >::LeafIterator
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
298 {
│ │ │ │ - │ │ │ │ -
300 }
│ │ │ │ -
│ │ │ │ +
293 template<int cd, PartitionIteratorType pitype>
│ │ │ │ +
294 typename Traits::template Codim<cd>::template Partition<pitype>::LevelIterator
│ │ │ │ +
295 lbegin (int level) const;
│ │ │ │ +
296
│ │ │ │ +
298 template<int cd, PartitionIteratorType pitype>
│ │ │ │ +
299 typename Traits::template Codim<cd>::template Partition<pitype>::LevelIterator
│ │ │ │ +
300 lend (int level) const;
│ │ │ │
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 );
│ │ │ │ +
303 template< int codim >
│ │ │ │ + │ │ │ │ +
305 lbegin ( int level ) const;
│ │ │ │ +
306
│ │ │ │ +
308 template< int codim >
│ │ │ │ + │ │ │ │ +
310 lend ( int level ) const;
│ │ │ │ +
311
│ │ │ │ +
313 template< int codim, PartitionIteratorType pitype >
│ │ │ │ +
314 typename Traits
│ │ │ │ +
315 ::template Codim< codim >::template Partition< pitype >::LeafIterator
│ │ │ │ +
316 leafbegin () const;
│ │ │ │
317
│ │ │ │ -
318 preAdapt();
│ │ │ │ -
319 adapt();
│ │ │ │ -
320 postAdapt();
│ │ │ │ -
321 }
│ │ │ │ -
322 }
│ │ │ │ -
│ │ │ │ +
319 template< int codim, PartitionIteratorType pitype >
│ │ │ │ +
320 typename Traits
│ │ │ │ +
321 ::template Codim< codim >::template Partition< pitype >::LeafIterator
│ │ │ │ +
322 leafend () const;
│ │ │ │
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 );
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
342 adapt( handle );
│ │ │ │ -
343 }
│ │ │ │ -
│ │ │ │ - │ │ │ │ +
325 template< int codim >
│ │ │ │ + │ │ │ │ +
327 leafbegin () const;
│ │ │ │ +
328
│ │ │ │ +
330 template< int codim >
│ │ │ │ + │ │ │ │ +
332 leafend () const;
│ │ │ │ +
333
│ │ │ │ +
338 int size (int level, int codim) const;
│ │ │ │ +
339
│ │ │ │ +
341 int size (int level, GeometryType type) const;
│ │ │ │ +
342
│ │ │ │ +
344 int size (int codim) const;
│ │ │ │
345
│ │ │ │ -
346
│ │ │ │ -
│ │ │ │ -
347 template< int dim, int dimworld >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
349 {
│ │ │ │ -
350 adaptationState_.preAdapt();
│ │ │ │ -
351 return adaptationState_.coarsen();
│ │ │ │ -
352 }
│ │ │ │ +
347 int size (GeometryType type) const;
│ │ │ │ +
348
│ │ │ │ +
│ │ │ │ +
350 std::size_t numBoundarySegments () const
│ │ │ │ +
351 {
│ │ │ │ +
352 return numBoundarySegments_;
│ │ │ │ +
353 }
│ │ │ │
│ │ │ │ -
353
│ │ │ │
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
│ │ │ │ +
356 typename Traits::LevelGridView levelGridView ( int level ) const
│ │ │ │ +
357 {
│ │ │ │ +
358 typedef typename Traits::LevelGridView View;
│ │ │ │ +
359 typedef typename View::GridViewImp ViewImp;
│ │ │ │ +
360 return View( ViewImp( *this, level ) );
│ │ │ │ +
361 }
│ │ │ │ +
│ │ │ │ +
362
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
365 {
│ │ │ │ +
366 typedef typename Traits::LeafGridView View;
│ │ │ │ +
367 typedef typename View::GridViewImp ViewImp;
│ │ │ │ +
368 return View( ViewImp( *this ) );
│ │ │ │ +
369 }
│ │ │ │ +
│ │ │ │ +
370
│ │ │ │ +
371 public:
│ │ │ │ +
372 //***************************************************************
│ │ │ │ +
373 // Interface for Adaptation
│ │ │ │ +
374 //***************************************************************
│ │ │ │ +
375 using Base::getMark;
│ │ │ │ +
376 using Base::mark;
│ │ │ │
377
│ │ │ │ -
378 levelProvider_.markAllOld();
│ │ │ │ -
│ │ │ │ -
379 adaptationState_.postAdapt();
│ │ │ │ -
380 }
│ │ │ │ -
381
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
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;
│ │ │ │ -
394
│ │ │ │ -
│ │ │ │ -
395 // take back previous marking
│ │ │ │ -
396 adaptationState_.unmark( getMark( e ) );
│ │ │ │ -
397
│ │ │ │ -
│ │ │ │ -
398 // set new marking
│ │ │ │ -
399 adaptationState_.mark( refCount );
│ │ │ │ -
400 e.impl().elementInfo().setMark( refCount );
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
402 return true;
│ │ │ │ -
403 }
│ │ │ │ -
404
│ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ - │ │ │ │ +
379 int getMark ( const typename Traits::template Codim< 0 >::Entity &e ) const;
│ │ │ │ +
380
│ │ │ │ +
382 bool mark ( int refCount, const typename Traits::template Codim< 0 >::Entity &e );
│ │ │ │ +
383
│ │ │ │ +
385 void globalRefine ( int refCount );
│ │ │ │ +
386
│ │ │ │ +
387 template< class DataHandle >
│ │ │ │ +
388 void globalRefine ( int refCount, AdaptDataHandleInterface< This, DataHandle > &handle );
│ │ │ │ +
389
│ │ │ │ +
391 bool adapt ();
│ │ │ │ +
392
│ │ │ │ +
394 template< class DataHandle >
│ │ │ │ + │ │ │ │ +
396
│ │ │ │ +
398 bool preAdapt ();
│ │ │ │ +
399
│ │ │ │ +
401 void postAdapt();
│ │ │ │ +
402
│ │ │ │ +
│ │ │ │ +
405 const Communication &comm () const
│ │ │ │ +
406 {
│ │ │ │ +
407 return comm_;
│ │ │ │ +
408 }
│ │ │ │ +
│ │ │ │ +
409
│ │ │ │ +
│ │ │ │ +
410 static std::string typeName ()
│ │ │ │ +
411 {
│ │ │ │ +
412 std::ostringstream s;
│ │ │ │ +
413 s << "AlbertaGrid< " << dim << ", " << dimworld << " >";
│ │ │ │ +
414 return s.str();
│ │ │ │ +
415 }
│ │ │ │ +
│ │ │ │ +
416
│ │ │ │ +
418 template< class EntitySeed >
│ │ │ │ +
419 typename Traits::template Codim< EntitySeed::codimension >::Entity
│ │ │ │ +
│ │ │ │ +
420 entity ( const EntitySeed &seed ) const
│ │ │ │ +
421 {
│ │ │ │ + │ │ │ │ +
423 return EntityImpl( *this, seed.impl().elementInfo( meshPointer() ), seed.impl().subEntity() );
│ │ │ │ +
424 }
│ │ │ │ +
│ │ │ │ +
425
│ │ │ │ +
426 //**********************************************************
│ │ │ │ +
427 // End of Interface Methods
│ │ │ │ +
428 //**********************************************************
│ │ │ │ +
430 bool writeGrid( const std::string &filename, ctype time ) const;
│ │ │ │ +
431
│ │ │ │ +
433 bool readGrid( const std::string &filename, ctype &time );
│ │ │ │
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 }
│ │ │ │ +
435 // return hierarchic index set
│ │ │ │ +
436 const HierarchicIndexSet & hierarchicIndexSet () const { return hIndexSet_; }
│ │ │ │ +
437
│ │ │ │ +
439 const typename Traits :: LevelIndexSet & levelIndexSet (int level) const;
│ │ │ │ +
440
│ │ │ │ +
442 const typename Traits :: LeafIndexSet & leafIndexSet () const;
│ │ │ │ +
443
│ │ │ │ +
│ │ │ │ +
445 const GlobalIdSet &globalIdSet () const
│ │ │ │ +
446 {
│ │ │ │ +
447 return idSet_;
│ │ │ │ +
448 }
│ │ │ │ +
│ │ │ │ +
449
│ │ │ │ +
│ │ │ │ +
451 const LocalIdSet &localIdSet () const
│ │ │ │ +
452 {
│ │ │ │ +
453 return idSet_;
│ │ │ │ +
454 }
│ │ │ │ +
│ │ │ │ +
455
│ │ │ │ +
456 // access to mesh pointer, needed by some methods
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
458 {
│ │ │ │ +
459 return mesh_;
│ │ │ │ +
460 };
│ │ │ │ +
│ │ │ │ +
461
│ │ │ │ +
│ │ │ │ +
462 const MeshPointer &meshPointer () const
│ │ │ │ +
463 {
│ │ │ │ +
464 return mesh_;
│ │ │ │ +
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 }
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
468 {
│ │ │ │ +
469 return dofNumbering_;
│ │ │ │ +
470 }
│ │ │ │ +
│ │ │ │ +
471
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
473 {
│ │ │ │ +
474 return levelProvider_;
│ │ │ │ +
475 }
│ │ │ │ +
│ │ │ │ +
476
│ │ │ │ +
│ │ │ │ +
477 int dune2alberta ( int codim, int i ) const
│ │ │ │ +
478 {
│ │ │ │ +
479 return numberingMap_.dune2alberta( codim, i );
│ │ │ │ +
480 }
│ │ │ │
│ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ +
│ │ │ │ +
482 int alberta2dune ( int codim, int i ) const
│ │ │ │ +
483 {
│ │ │ │ +
484 return numberingMap_.alberta2dune( codim, i );
│ │ │ │ +
485 }
│ │ │ │ +
│ │ │ │ +
486
│ │ │ │ +
│ │ │ │ +
487 int generic2alberta ( int codim, int i ) const
│ │ │ │ +
488 {
│ │ │ │ +
489 return genericNumberingMap_.dune2alberta( codim, i );
│ │ │ │ +
490 }
│ │ │ │ +
│ │ │ │ +
491
│ │ │ │ +
│ │ │ │ +
492 int alberta2generic ( int codim, int i ) const
│ │ │ │ +
493 {
│ │ │ │ +
494 return genericNumberingMap_.alberta2dune( codim, i );
│ │ │ │ +
495 }
│ │ │ │ +
│ │ │ │ +
496
│ │ │ │ +
497 private:
│ │ │ │ +
498 typedef std::vector<int> ArrayType;
│ │ │ │ +
499
│ │ │ │ +
500 void setup ();
│ │ │ │
501
│ │ │ │ -
502
│ │ │ │ -
503 template< int dim, int dimworld >
│ │ │ │ -
│ │ │ │ -
504 inline int AlbertaGrid< dim, dimworld >::size ( int codim ) const
│ │ │ │ -
505 {
│ │ │ │ -
506 assert( sizeCache_.size( codim ) == mesh_.size( codim ) );
│ │ │ │ -
507 return mesh_.size( codim );
│ │ │ │ -
508 }
│ │ │ │ -
│ │ │ │ +
502 // make the calculation of indexOnLevel and so on.
│ │ │ │ +
503 // extra method because of Reihenfolge
│ │ │ │ +
504 void calcExtras();
│ │ │ │ +
505
│ │ │ │ +
506 private:
│ │ │ │ +
507 // delete mesh and all vectors
│ │ │ │ +
508 void removeMesh();
│ │ │ │
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 }
│ │ │ │ +
510 //***********************************************************************
│ │ │ │ +
511 // MemoryManagement for Entities and Geometries
│ │ │ │ +
512 //**********************************************************************
│ │ │ │ + │ │ │ │ + │ │ │ │ +
515
│ │ │ │ +
516 public:
│ │ │ │ + │ │ │ │ +
518
│ │ │ │ +
519 template< int codim >
│ │ │ │ +
520 static int
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
522 {
│ │ │ │ +
523 return entity.impl().twist();
│ │ │ │ +
524 }
│ │ │ │ +
│ │ │ │ +
525
│ │ │ │ +
526 template< int codim >
│ │ │ │ +
527 static int
│ │ │ │ +
│ │ │ │ +
528 getTwist ( const typename Traits::template Codim< 0 >::Entity &entity, int subEntity )
│ │ │ │ +
529 {
│ │ │ │ +
530 return entity.impl().template twist< codim >( subEntity );
│ │ │ │ +
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 }
│ │ │ │ -
│ │ │ │ +
533 static int
│ │ │ │ +
│ │ │ │ +
534 getTwistInInside ( const typename Traits::LeafIntersection &intersection )
│ │ │ │ +
535 {
│ │ │ │ +
536 return intersection.impl().twistInInside();
│ │ │ │ +
537 }
│ │ │ │ +
│ │ │ │ +
538
│ │ │ │ +
539 static int
│ │ │ │ +
│ │ │ │ +
540 getTwistInOutside ( const typename Traits::LeafIntersection &intersection )
│ │ │ │ +
541 {
│ │ │ │ +
542 return intersection.impl().twistInOutside();
│ │ │ │ +
543 }
│ │ │ │
│ │ │ │
544
│ │ │ │ -
545
│ │ │ │ -
546 template < int dim, int dimworld >
│ │ │ │ -
547 inline void AlbertaGrid < dim, dimworld >::calcExtras ()
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
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();
│ │ │ │ +
545 public:
│ │ │ │ +
546 // read global element number from elNumbers_
│ │ │ │ + │ │ │ │ +
548 getCoord ( const ElementInfo &elementInfo, int vertex ) const;
│ │ │ │ +
549
│ │ │ │ +
550 private:
│ │ │ │ +
551 // pointer to an Albert Mesh, which contains the data
│ │ │ │ +
552 MeshPointer mesh_;
│ │ │ │ +
553
│ │ │ │ +
554 // communication
│ │ │ │ +
555 Communication comm_;
│ │ │ │
556
│ │ │ │ -
557 // unset up2Dat status, if leafbegin is called then this status is updated
│ │ │ │ -
558 leafMarkerVector_.clear();
│ │ │ │ +
557 // maximum level of the mesh
│ │ │ │ +
558 int maxlevel_;
│ │ │ │
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 >
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
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();
│ │ │ │ +
560 // number of boundary segments within the macro grid
│ │ │ │ +
561 size_t numBoundarySegments_;
│ │ │ │ +
562
│ │ │ │ +
563 // map between ALBERTA and DUNE numbering
│ │ │ │ + │ │ │ │ + │ │ │ │ +
566
│ │ │ │ +
567 DofNumbering dofNumbering_;
│ │ │ │ +
568
│ │ │ │ +
569 LevelProvider levelProvider_;
│ │ │ │ +
570
│ │ │ │ +
571 // hierarchical numbering of AlbertaGrid, unique per codim
│ │ │ │ +
572 HierarchicIndexSet hIndexSet_;
│ │ │ │ +
573
│ │ │ │ +
574 // the id set of this grid
│ │ │ │ +
575 IdSetImp idSet_;
│ │ │ │ +
576
│ │ │ │ +
577 // the level index set, is generated from the HierarchicIndexSet
│ │ │ │ +
578 // is generated, when accessed
│ │ │ │ +
579 mutable std::vector< typename GridFamily::LevelIndexSetImp * > levelIndexVec_;
│ │ │ │ +
580
│ │ │ │ +
581 // the leaf index set, is generated from the HierarchicIndexSet
│ │ │ │ +
582 // is generated, when accessed
│ │ │ │ +
583 mutable typename GridFamily::LeafIndexSetImp* leafIndexSet_;
│ │ │ │ +
584
│ │ │ │ +
585 SizeCache< This > sizeCache_;
│ │ │ │ +
586
│ │ │ │ +
587 typedef AlbertaMarkerVector< dim, dimworld > MarkerVector;
│ │ │ │
588
│ │ │ │ -
589 if( filename.size() <= 0 )
│ │ │ │ -
590 return false;
│ │ │ │ +
589 // needed for VertexIterator, mark on which element a vertex is treated
│ │ │ │ +
590 mutable MarkerVector leafMarkerVector_;
│ │ │ │
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 );
│ │ │ │ +
592 // needed for VertexIterator, mark on which element a vertex is treated
│ │ │ │ +
593 mutable std::vector< MarkerVector > levelMarkerVector_;
│ │ │ │ +
594
│ │ │ │ +
595#if DUNE_ALBERTA_CACHE_COORDINATES
│ │ │ │ + │ │ │ │ +
597#endif
│ │ │ │
598
│ │ │ │ -
599 // calc maxlevel and indexOnLevel and so on
│ │ │ │ -
600 calcExtras();
│ │ │ │ -
601
│ │ │ │ -
602 return true;
│ │ │ │ -
603 }
│ │ │ │ +
599 // current state of adaptation
│ │ │ │ +
600 AdaptationState adaptationState_;
│ │ │ │ +
601 };
│ │ │ │ +
│ │ │ │ +
602
│ │ │ │ +
603} // namespace Dune
│ │ │ │
│ │ │ │
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;
│ │ │ │ +
605#include "albertagrid.cc"
│ │ │ │ +
606
│ │ │ │ +
607// undef all dangerous defines
│ │ │ │ +
608#undef DIM
│ │ │ │ +
609#undef DIM_OF_WORLD
│ │ │ │ +
610
│ │ │ │ +
611#ifdef _ABS_NOT_DEFINED_
│ │ │ │ +
612#undef ABS
│ │ │ │ +
613#endif
│ │ │ │
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 }
│ │ │ │ +
615#ifdef _MIN_NOT_DEFINED_
│ │ │ │ +
616#undef MIN
│ │ │ │ +
617#endif
│ │ │ │ +
618
│ │ │ │ +
619#ifdef _MAX_NOT_DEFINED_
│ │ │ │ +
620#undef MAX
│ │ │ │ +
621#endif
│ │ │ │ +
622
│ │ │ │ +
623#ifdef obstack_chunk_alloc
│ │ │ │ +
624#undef obstack_chunk_alloc
│ │ │ │ +
625#endif
│ │ │ │ +
626#ifdef obstack_chunk_free
│ │ │ │ +
627#undef obstack_chunk_free
│ │ │ │ +
628#endif
│ │ │ │ + │ │ │ │ +
630
│ │ │ │ +
631// We use MEM_ALLOC, so undefine it here.
│ │ │ │ +
632#undef MEM_ALLOC
│ │ │ │ +
633
│ │ │ │ +
634// We use MEM_REALLOC, so undefine it here.
│ │ │ │ +
635#undef MEM_REALLOC
│ │ │ │
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
│ │ │ │ +
637// We use MEM_CALLOC, so undefine it here.
│ │ │ │ +
638#undef MEM_CALLOC
│ │ │ │ +
639
│ │ │ │ +
640// We use MEM_FREE, so undefine it here.
│ │ │ │ +
641#undef MEM_FREE
│ │ │ │ +
642
│ │ │ │ +
643// Macro ERROR may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ +
644#ifdef ERROR
│ │ │ │ +
645#undef ERROR
│ │ │ │ +
646#endif // #ifdef ERROR
│ │ │ │
647
│ │ │ │ -
648#endif
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
648// Macro ERROR_EXIT may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ +
649#ifdef ERROR_EXIT
│ │ │ │ +
650#undef ERROR_EXIT
│ │ │ │ +
651#endif // #ifdef ERROR_EXIT
│ │ │ │ +
652
│ │ │ │ +
653// Macro WARNING may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ +
654#ifdef WARNING
│ │ │ │ +
655#undef WARNING
│ │ │ │ +
656#endif // #ifdef WARNING
│ │ │ │ +
657
│ │ │ │ +
658// Macro TEST may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ +
659#ifdef TEST
│ │ │ │ +
660#undef TEST
│ │ │ │ +
661#endif // #ifdef TEST
│ │ │ │ +
662
│ │ │ │ +
663// Macro TEST_EXIT may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ +
664#ifdef TEST_EXIT
│ │ │ │ +
665#undef TEST_EXIT
│ │ │ │ +
666#endif // #ifdef TEST_EXIT
│ │ │ │ +
667
│ │ │ │ +
668// Macro DEBUG_TEST may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ +
669#ifdef DEBUG_TEST
│ │ │ │ +
670#undef DEBUG_TEST
│ │ │ │ +
671#endif // #ifdef DEBUG_TEST
│ │ │ │ +
672
│ │ │ │ +
673// Macro DEBUG_TEST_EXIT may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ +
674#ifdef DEBUG_TEST_EXIT
│ │ │ │ +
675#undef DEBUG_TEST_EXIT
│ │ │ │ +
676#endif // #ifdef DEBUG_TEST_EXIT
│ │ │ │ +
677
│ │ │ │ +
678// Macro INFO may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ +
679#ifdef INFO
│ │ │ │ +
680#undef INFO
│ │ │ │ +
681#endif // #ifdef INFO
│ │ │ │ +
682
│ │ │ │ +
683// Macro PRINT_INFO may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ +
684#ifdef PRINT_INFO
│ │ │ │ +
685#undef PRINT_INFO
│ │ │ │ +
686#endif // #ifdef PRINT_INFO
│ │ │ │ +
687
│ │ │ │ +
688// Macro PRINT_INT_VEC may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ +
689#ifdef PRINT_INT_VEC
│ │ │ │ +
690#undef PRINT_INT_VEC
│ │ │ │ +
691#endif // #ifdef PRINT_INT_VEC
│ │ │ │ +
692
│ │ │ │ +
693// Macro PRINT_REAL_VEC may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ +
694#ifdef PRINT_REAL_VEC
│ │ │ │ +
695#undef PRINT_REAL_VEC
│ │ │ │ +
696#endif // #ifdef PRINT_REAL_VEC
│ │ │ │ +
697
│ │ │ │ +
698// Macro WAIT may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ +
699#ifdef WAIT
│ │ │ │ +
700#undef WAIT
│ │ │ │ +
701#endif // #ifdef WAIT
│ │ │ │ +
702
│ │ │ │ +
703// Macro WAIT_REALLY may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ +
704#ifdef WAIT_REALLY
│ │ │ │ +
705#undef WAIT_REALLY
│ │ │ │ +
706#endif // #ifdef WAIT_REALLY
│ │ │ │ +
707
│ │ │ │ +
708// Macro GET_WORKSPACE may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ +
709#ifdef GET_WORKSPACE
│ │ │ │ +
710#undef GET_WORKSPACE
│ │ │ │ +
711#endif // #ifdef GET_WORKSPACE
│ │ │ │ +
712
│ │ │ │ +
713// Macro FREE_WORKSPACE may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ +
714#ifdef FREE_WORKSPACE
│ │ │ │ +
715#undef FREE_WORKSPACE
│ │ │ │ +
716#endif // #ifdef FREE_WORKSPACE
│ │ │ │ +
717
│ │ │ │ +
718// Macro MAT_ALLOC may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ +
719#ifdef MAT_ALLOC
│ │ │ │ +
720#undef MAT_ALLOC
│ │ │ │ +
721#endif // #ifdef MAT_ALLOC
│ │ │ │ +
722
│ │ │ │ +
723// Macro MAT_FREE may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ +
724#ifdef MAT_FREE
│ │ │ │ +
725#undef MAT_FREE
│ │ │ │ +
726#endif // #ifdef MAT_FREE
│ │ │ │ +
727
│ │ │ │ +
728// Macro NAME may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ +
729#ifdef NAME
│ │ │ │ +
730#undef NAME
│ │ │ │ +
731#endif // #ifdef NAME
│ │ │ │ +
732
│ │ │ │ +
733// Macro GET_STRUCT may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ +
734#ifdef GET_STRUCT
│ │ │ │ +
735#undef GET_STRUCT
│ │ │ │ +
736#endif // #ifdef GET_STRUCT
│ │ │ │ +
737
│ │ │ │ +
738// Macro ADD_PARAMETER may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ +
739#ifdef ADD_PARAMETER
│ │ │ │ +
740#undef ADD_PARAMETER
│ │ │ │ +
741#endif // #ifdef ADD_PARAMETER
│ │ │ │ +
742
│ │ │ │ +
743// Macro GET_PARAMETER may be defined by alberta_util.h. If so, undefine it.
│ │ │ │ +
744#ifdef GET_PARAMETER
│ │ │ │ +
745#undef GET_PARAMETER
│ │ │ │ +
746#endif // #ifdef GET_PARAMETER
│ │ │ │ +
747
│ │ │ │ +
748#define _ALBERTA_H_
│ │ │ │ +
749
│ │ │ │ +
750#endif // HAVE_ALBERTA || DOXYGEN
│ │ │ │ +
751
│ │ │ │ +
752#endif
│ │ │ │ +
interfaces and wrappers needed for the callback adaptation provided by AlbertaGrid and dune-ALUGrid
│ │ │ │ +
Provides size cache classes to implement the grids size method efficiently.
│ │ │ │ +
Contains #undefs for all preprocessor macros defined by alberta.
│ │ │ │ + │ │ │ │ + │ │ │ │ +
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
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 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:467
│ │ │ │ +
int generic2alberta(int codim, int i) const
Definition agrid.hh:487
│ │ │ │
static std::string typeName()
Definition agrid.hh:410
│ │ │ │ +
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:436
│ │ │ │ +
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:477
│ │ │ │ +
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:472
│ │ │ │ +
static int getTwistInOutside(const typename Traits::LeafIntersection &intersection)
Definition agrid.hh:540
│ │ │ │ +
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:364
│ │ │ │ +
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:534
│ │ │ │ +
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:451
│ │ │ │ +
std::size_t numBoundarySegments() const
number of boundary segments within the macro grid
Definition agrid.hh:350
│ │ │ │
GridFamily::ctype ctype
Definition agrid.hh:143
│ │ │ │ +
AlbertaGrid(const This &)=delete
│ │ │ │ +
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:492
│ │ │ │ +
static int getTwist(const typename Traits::template Codim< codim >::Entity &entity)
Definition agrid.hh:521
│ │ │ │ +
const Communication & comm() const
return reference to communication, if MPI found this is specialisation for MPI
Definition agrid.hh:405
│ │ │ │ +
ALBERTA MESH * getMesh() const
Definition agrid.hh:457
│ │ │ │ +
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:356
│ │ │ │ +
int alberta2dune(int codim, int i) const
Definition agrid.hh:482
│ │ │ │ +
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:528
│ │ │ │ +
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:445
│ │ │ │ +
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:420
│ │ │ │ +
~AlbertaGrid()
destructor
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:462
│ │ │ │ +
Definition coordcache.hh:25
│ │ │ │
Definition albertagrid/datahandle.hh:27
│ │ │ │ -
unsigned int create(const MacroData< dim > &macroData)
Definition meshpointer.hh:299
│ │ │ │ -
Definition dofvector.hh:179
│ │ │ │ +
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
│ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ -
const GlobalVector & coordinate(int vertex) const
Definition elementinfo.hh:685
│ │ │ │ -
void create()
Definition indexsets.cc:133
│ │ │ │ +
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:518
│ │ │ │
Definition albertagrid/indexsets.hh:329
│ │ │ │ +
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 macrodata.hh:30
│ │ │ │ -
Definition misc.hh:32
│ │ │ │ -
Definition misc.hh:36
│ │ │ │ +
Definition albertagrid/gridview.hh:76
│ │ │ │ +
Definition albertagrid/gridview.hh:287
│ │ │ │ +
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
│ │ │ │ -
Definition albertagrid/projection.hh:163
│ │ │ │ -
Definition refinement.hh:40
│ │ │ │
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:848
│ │ │ │ +
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:929
│ │ │ │ +
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:941
│ │ │ │
A Traits struct that collects all associated types of one implementation.
Definition common/grid.hh:411
│ │ │ │ +
Definition common/grid.hh:1121
│ │ │ │ +
Provide a generic factory class for unstructured grids.
Definition common/gridfactory.hh:275
│ │ │ │ +
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,748 +1,1036 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ +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 © 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_ALBERTAGRID_IMP_HH │ │ │ │ │ +6#define DUNE_ALBERTAGRID_IMP_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 │ │ │ │ │ -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 │ │ │ │ │ -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." ); │ │ │ │ │ -79 │ │ │ │ │ -80 setup(); │ │ │ │ │ -81 hIndexSet_._c_r_e_a_t_e(); │ │ │ │ │ -82 │ │ │ │ │ -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 _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 │ │ │ │ │ +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 │ │ │ │ │ +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 │ │ │ │ │ +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 │ │ │ │ │ +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 │ │ │ │ │ +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 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_ _>(); │ │ │ │ │ +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 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 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_ ); │ │ │ │ │ +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 │ │ │ │ │ +_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 │ │ │ │ │ +_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 │ │ │ │ │ -159 levelProvider_.create( dofNumbering_ ); │ │ │ │ │ -160 │ │ │ │ │ -161#if DUNE_ALBERTA_CACHE_COORDINATES │ │ │ │ │ -162 coordCache_.create( dofNumbering_ ); │ │ │ │ │ -163#endif │ │ │ │ │ -164 } │ │ │ │ │ -165 │ │ │ │ │ +_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 │ │ │ │ │ -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(); │ │ │ │ │ +167 private: │ │ │ │ │ +169 _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; │ │ │ │ │ +170 │ │ │ │ │ +172 _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; │ │ │ │ │ +173 │ │ │ │ │ +175 _s_t_r_u_c_t AdaptationState │ │ │ │ │ +176 { │ │ │ │ │ +177 enum Phase { ComputationPhase, PreAdaptationPhase, PostAdaptationPhase }; │ │ │ │ │ +178 │ │ │ │ │ +179 private: │ │ │ │ │ +180 Phase phase_; │ │ │ │ │ +181 int coarsenMarked_; │ │ │ │ │ +182 int refineMarked_; │ │ │ │ │ +183 │ │ │ │ │ +184 public: │ │ │ │ │ +185 AdaptationState () │ │ │ │ │ +186 : phase_( ComputationPhase ), │ │ │ │ │ +187 coarsenMarked_( 0 ), │ │ │ │ │ +188 refineMarked_( 0 ) │ │ │ │ │ +189 {} │ │ │ │ │ 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( (codim > 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 ); │ │ │ │ │ +191 void mark ( int count ) │ │ │ │ │ +192 { │ │ │ │ │ +193 if( count < 0 ) │ │ │ │ │ +194 ++coarsenMarked_; │ │ │ │ │ +195 if( count > 0 ) │ │ │ │ │ +196 refineMarked_ += (2 << count); │ │ │ │ │ +197 } │ │ │ │ │ +198 │ │ │ │ │ +199 void unmark ( int count ) │ │ │ │ │ +200 { │ │ │ │ │ +201 if( count < 0 ) │ │ │ │ │ +202 --coarsenMarked_; │ │ │ │ │ +203 if( count > 0 ) │ │ │ │ │ +204 refineMarked_ -= (2 << count); │ │ │ │ │ +205 } │ │ │ │ │ +206 │ │ │ │ │ +207 bool coarsen () const │ │ │ │ │ +208 { │ │ │ │ │ +209 return (coarsenMarked_ > 0); │ │ │ │ │ +210 } │ │ │ │ │ +211 │ │ │ │ │ +212 int refineMarked () const │ │ │ │ │ +213 { │ │ │ │ │ +214 return refineMarked_; │ │ │ │ │ +215 } │ │ │ │ │ +216 │ │ │ │ │ +217 void preAdapt () │ │ │ │ │ +218 { │ │ │ │ │ +219 if( phase_ != ComputationPhase ) │ │ │ │ │ +220 error( "preAdapt may only be called in computation phase." ); │ │ │ │ │ +221 phase_ = PreAdaptationPhase; │ │ │ │ │ +222 } │ │ │ │ │ +223 │ │ │ │ │ +224 void adapt () │ │ │ │ │ +225 { │ │ │ │ │ +226 if( phase_ != PreAdaptationPhase ) │ │ │ │ │ +227 error( "adapt may only be called in preadapdation phase." ); │ │ │ │ │ +228 phase_ = PostAdaptationPhase; │ │ │ │ │ +229 } │ │ │ │ │ 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 } │ │ │ │ │ +231 void postAdapt () │ │ │ │ │ +232 { │ │ │ │ │ +233 if( phase_ != PostAdaptationPhase ) │ │ │ │ │ +234 error( "postAdapt may only be called in postadaptation phase." ); │ │ │ │ │ +235 phase_ = ComputationPhase; │ │ │ │ │ +236 │ │ │ │ │ +237 coarsenMarked_ = 0; │ │ │ │ │ +238 refineMarked_ = 0; │ │ │ │ │ +239 } │ │ │ │ │ +240 │ │ │ │ │ +241 private: │ │ │ │ │ +242 void error ( const std::string &_m_e_s_s_a_g_e ) │ │ │ │ │ +243 { │ │ │ │ │ +244 _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 ); │ │ │ │ │ +245 } │ │ │ │ │ +246 }; │ │ │ │ │ +247 │ │ │ │ │ +248 template< class DataHandler > │ │ │ │ │ +249 struct AdaptationCallback; │ │ │ │ │ +250 │ │ │ │ │ +251 // max number of allowed levels is 64 │ │ │ │ │ +252 static const int MAXL = 64; │ │ │ │ │ 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; │ │ │ │ │ +254 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; │ │ │ │ │ +255 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; │ │ │ │ │ +256 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; │ │ │ │ │ +257 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; │ │ │ │ │ +258 │ │ │ │ │ +259 public: │ │ │ │ │ +_2_6_0 _A_l_b_e_r_t_a_G_r_i_d ( const _T_h_i_s & ) = delete; │ │ │ │ │ +_2_6_1 _T_h_i_s &_o_p_e_r_a_t_o_r_=_ ( const _T_h_i_s & ) = delete; │ │ │ │ │ 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_; │ │ │ │ │ -_2_6_4 const int _f_i_r_s_t_M_a_r_k_e_d_C_o_d_i_m = 2; │ │ │ │ │ -265 if( (codim >= _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 } │ │ │ │ │ -270 │ │ │ │ │ -_2_7_1 │ │ │ │ │ -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 │ │ │ │ │ -277 { │ │ │ │ │ -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 │ │ │ │ │ -282 │ │ │ │ │ -_2_8_3 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 │ │ │ │ │ -_2_8_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_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 { │ │ │ │ │ -289 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_ _>(); │ │ │ │ │ -_2_9_0 } │ │ │ │ │ +264 _A_l_b_e_r_t_a_G_r_i_d (); │ │ │ │ │ +265 │ │ │ │ │ +271 _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, │ │ │ │ │ +272 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 │ │ │ │ │ +273 = 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_ _> >() ); │ │ │ │ │ +274 │ │ │ │ │ +275 template< class Proj, class Impl > │ │ │ │ │ +276 _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, │ │ │ │ │ +277 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 │ │ │ │ │ +); │ │ │ │ │ +278 │ │ │ │ │ +283 _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 ); │ │ │ │ │ +284 │ │ │ │ │ +286 _~_A_l_b_e_r_t_a_G_r_i_d (); │ │ │ │ │ +287 │ │ │ │ │ +290 int _m_a_x_L_e_v_e_l () const; │ │ │ │ │ 291 │ │ │ │ │ -292 │ │ │ │ │ -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 │ │ │ │ │ -296 ::template Codim< codim >::LeafIterator │ │ │ │ │ -_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 } │ │ │ │ │ +293 template │ │ │ │ │ +294 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 │ │ │ │ │ +_2_9_5 _l_b_e_g_i_n (int level) const; │ │ │ │ │ +296 │ │ │ │ │ +298 template │ │ │ │ │ +299 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_0 _l_e_n_d (int level) const; │ │ │ │ │ 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 ); │ │ │ │ │ +303 template< int codim > │ │ │ │ │ +304 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_0_5 _l_b_e_g_i_n ( int level ) const; │ │ │ │ │ +306 │ │ │ │ │ +308 template< int codim > │ │ │ │ │ +309 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_0 _l_e_n_d ( int level ) const; │ │ │ │ │ +311 │ │ │ │ │ +313 template< int codim, PartitionIteratorType pitype > │ │ │ │ │ +314 typename Traits │ │ │ │ │ +315 ::template _C_o_d_i_m_<_ _c_o_d_i_m_ _>_:_:_t_e_m_p_l_a_t_e Partition< pitype >::LeafIterator │ │ │ │ │ +_3_1_6 _l_e_a_f_b_e_g_i_n () const; │ │ │ │ │ 317 │ │ │ │ │ -318 preAdapt(); │ │ │ │ │ -319 adapt(); │ │ │ │ │ -320 postAdapt(); │ │ │ │ │ -321 } │ │ │ │ │ -322 } │ │ │ │ │ +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_e_n_d () const; │ │ │ │ │ 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 │ │ │ │ │ -_3_3_8 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 ); │ │ │ │ │ -_3_4_1 │ │ │ │ │ -342 adapt( _h_a_n_d_l_e ); │ │ │ │ │ -343 } │ │ │ │ │ -_3_4_4 } │ │ │ │ │ +325 template< int codim > │ │ │ │ │ +326 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_2_7 _l_e_a_f_b_e_g_i_n () const; │ │ │ │ │ +328 │ │ │ │ │ +330 template< int codim > │ │ │ │ │ +331 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_2 _l_e_a_f_e_n_d () const; │ │ │ │ │ +333 │ │ │ │ │ +338 int _s_i_z_e (int level, int codim) const; │ │ │ │ │ +339 │ │ │ │ │ +341 int _s_i_z_e (int level, GeometryType type) const; │ │ │ │ │ +342 │ │ │ │ │ +344 int _s_i_z_e (int codim) const; │ │ │ │ │ 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 { │ │ │ │ │ -350 adaptationState_.preAdapt(); │ │ │ │ │ -351 return adaptationState_.coarsen(); │ │ │ │ │ -352 } │ │ │ │ │ -353 │ │ │ │ │ +347 int _s_i_z_e (GeometryType type) const; │ │ │ │ │ +348 │ │ │ │ │ +_3_5_0 std::size_t _n_u_m_B_o_u_n_d_a_r_y_S_e_g_m_e_n_t_s () const │ │ │ │ │ +351 { │ │ │ │ │ +352 return numBoundarySegments_; │ │ │ │ │ +353 } │ │ │ │ │ 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 () │ │ │ │ │ +_3_5_6 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 │ │ │ │ │ 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 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 _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 │ │ │ │ │ +358 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; │ │ │ │ │ +359 typedef typename View::GridViewImp _V_i_e_w_I_m_p; │ │ │ │ │ +360 return _V_i_e_w( _V_i_e_w_I_m_p( *this, level ) ); │ │ │ │ │ +361 } │ │ │ │ │ +362 │ │ │ │ │ +_3_6_4 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 │ │ │ │ │ +365 { │ │ │ │ │ +366 typedef typename _T_r_a_i_t_s_:_:_L_e_a_f_G_r_i_d_V_i_e_w _V_i_e_w; │ │ │ │ │ +367 typedef typename View::GridViewImp _V_i_e_w_I_m_p; │ │ │ │ │ +368 return _V_i_e_w( _V_i_e_w_I_m_p( *this ) ); │ │ │ │ │ +369 } │ │ │ │ │ +370 │ │ │ │ │ +371 public: │ │ │ │ │ +372 //*************************************************************** │ │ │ │ │ +373 // Interface for Adaptation │ │ │ │ │ +374 //*************************************************************** │ │ │ │ │ +375 using _B_a_s_e_:_:_g_e_t_M_a_r_k; │ │ │ │ │ +376 using _B_a_s_e_:_:_m_a_r_k; │ │ │ │ │ 377 │ │ │ │ │ -378 levelProvider_.markAllOld(); │ │ │ │ │ -_3_7_9 adaptationState_.postAdapt(); │ │ │ │ │ -380 } │ │ │ │ │ -381 │ │ │ │ │ -_3_8_2 │ │ │ │ │ -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; │ │ │ │ │ -394 │ │ │ │ │ -_3_9_5 // take back previous marking │ │ │ │ │ -396 adaptationState_.unmark( getMark( _e ) ); │ │ │ │ │ -397 │ │ │ │ │ -_3_9_8 // set new marking │ │ │ │ │ -399 adaptationState_.mark( refCount ); │ │ │ │ │ -400 _e.impl().elementInfo().setMark( refCount ); │ │ │ │ │ -_4_0_1 │ │ │ │ │ -402 return true; │ │ │ │ │ -403 } │ │ │ │ │ -404 │ │ │ │ │ -405 │ │ │ │ │ -406 template< int dim, int dimworld > │ │ │ │ │ -407 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 │ │ │ │ │ -_4_3_0 // return true if elements were created │ │ │ │ │ -431 return _r_e_f_i_n_e_d; │ │ │ │ │ -432 } │ │ │ │ │ -_4_3_3 │ │ │ │ │ +379 int _g_e_t_M_a_r_k ( const typename Traits::template Codim< 0 >::Entity &e ) │ │ │ │ │ +const; │ │ │ │ │ +380 │ │ │ │ │ +382 bool _m_a_r_k ( int refCount, const typename Traits::template Codim< 0 >:: │ │ │ │ │ +Entity &e ); │ │ │ │ │ +383 │ │ │ │ │ +385 void _g_l_o_b_a_l_R_e_f_i_n_e ( int refCount ); │ │ │ │ │ +386 │ │ │ │ │ +387 template< class DataHandle > │ │ │ │ │ +388 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 ); │ │ │ │ │ +389 │ │ │ │ │ +391 bool _a_d_a_p_t (); │ │ │ │ │ +392 │ │ │ │ │ +394 template< class DataHandle > │ │ │ │ │ +395 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 ); │ │ │ │ │ +396 │ │ │ │ │ +398 bool _p_r_e_A_d_a_p_t (); │ │ │ │ │ +399 │ │ │ │ │ +401 void _p_o_s_t_A_d_a_p_t(); │ │ │ │ │ +402 │ │ │ │ │ +_4_0_5 const _C_o_m_m_u_n_i_c_a_t_i_o_n &_c_o_m_m () const │ │ │ │ │ +406 { │ │ │ │ │ +407 return comm_; │ │ │ │ │ +408 } │ │ │ │ │ +409 │ │ │ │ │ +_4_1_0 static std::string _t_y_p_e_N_a_m_e () │ │ │ │ │ +411 { │ │ │ │ │ +412 std::ostringstream s; │ │ │ │ │ +413 s << "AlbertaGrid< " << dim << ", " << dimworld << " >"; │ │ │ │ │ +414 return s.str(); │ │ │ │ │ +415 } │ │ │ │ │ +416 │ │ │ │ │ +418 template< class EntitySeed > │ │ │ │ │ +419 typename Traits::template Codim< EntitySeed::codimension >::Entity │ │ │ │ │ +_4_2_0 _e_n_t_i_t_y ( const _E_n_t_i_t_y_S_e_e_d &seed ) const │ │ │ │ │ +421 { │ │ │ │ │ +422 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; │ │ │ │ │ +423 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() ); │ │ │ │ │ +424 } │ │ │ │ │ +425 │ │ │ │ │ +426 //********************************************************** │ │ │ │ │ +427 // End of Interface Methods │ │ │ │ │ +428 //********************************************************** │ │ │ │ │ +430 bool _w_r_i_t_e_G_r_i_d( const std::string &filename, _c_t_y_p_e time ) const; │ │ │ │ │ +431 │ │ │ │ │ +433 bool _r_e_a_d_G_r_i_d( const std::string &filename, _c_t_y_p_e &time ); │ │ │ │ │ 434 │ │ │ │ │ -435 template< int dim, int dimworld > │ │ │ │ │ -436 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 │ │ │ │ │ -_4_4_2 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; │ │ │ │ │ -445 _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; │ │ │ │ │ -448 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; │ │ │ │ │ +435 // return hierarchic index set │ │ │ │ │ +_4_3_6 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_; │ │ │ │ │ +} │ │ │ │ │ +437 │ │ │ │ │ +439 const typename Traits :: LevelIndexSet & _l_e_v_e_l_I_n_d_e_x_S_e_t (int level) const; │ │ │ │ │ +440 │ │ │ │ │ +442 const typename Traits :: LeafIndexSet & _l_e_a_f_I_n_d_e_x_S_e_t () const; │ │ │ │ │ +443 │ │ │ │ │ +_4_4_5 const _G_l_o_b_a_l_I_d_S_e_t &_g_l_o_b_a_l_I_d_S_e_t () const │ │ │ │ │ +446 { │ │ │ │ │ +447 return idSet_; │ │ │ │ │ +448 } │ │ │ │ │ +449 │ │ │ │ │ +_4_5_1 const _L_o_c_a_l_I_d_S_e_t &_l_o_c_a_l_I_d_S_e_t () const │ │ │ │ │ +452 { │ │ │ │ │ +453 return idSet_; │ │ │ │ │ +454 } │ │ │ │ │ +455 │ │ │ │ │ +456 // access to mesh pointer, needed by some methods │ │ │ │ │ +_4_5_7 _A_L_B_E_R_T_A _M_E_S_H* _g_e_t_M_e_s_h () const │ │ │ │ │ +458 { │ │ │ │ │ +459 return mesh_; │ │ │ │ │ +460 }; │ │ │ │ │ +461 │ │ │ │ │ +_4_6_2 const _M_e_s_h_P_o_i_n_t_e_r &_m_e_s_h_P_o_i_n_t_e_r () const │ │ │ │ │ +463 { │ │ │ │ │ +464 return mesh_; │ │ │ │ │ 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 │ │ │ │ │ +_4_6_7 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 │ │ │ │ │ +468 { │ │ │ │ │ +469 return dofNumbering_; │ │ │ │ │ +470 } │ │ │ │ │ +471 │ │ │ │ │ +_4_7_2 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 │ │ │ │ │ +473 { │ │ │ │ │ +474 return levelProvider_; │ │ │ │ │ +475 } │ │ │ │ │ +476 │ │ │ │ │ +_4_7_7 int _d_u_n_e_2_a_l_b_e_r_t_a ( int codim, int i ) const │ │ │ │ │ +478 { │ │ │ │ │ +479 return numberingMap_._d_u_n_e_2_a_l_b_e_r_t_a( codim, i ); │ │ │ │ │ +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 codim ) │ │ │ │ │ -const │ │ │ │ │ -491 { │ │ │ │ │ -492 return ((level >= 0) && (level <= maxlevel_) ? sizeCache_.size( level, │ │ │ │ │ -codim ) : 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 } │ │ │ │ │ +_4_8_2 int _a_l_b_e_r_t_a_2_d_u_n_e ( int codim, int i ) const │ │ │ │ │ +483 { │ │ │ │ │ +484 return numberingMap_._a_l_b_e_r_t_a_2_d_u_n_e( codim, i ); │ │ │ │ │ +485 } │ │ │ │ │ +486 │ │ │ │ │ +_4_8_7 int _g_e_n_e_r_i_c_2_a_l_b_e_r_t_a ( int codim, int i ) const │ │ │ │ │ +488 { │ │ │ │ │ +489 return genericNumberingMap_.dune2alberta( codim, i ); │ │ │ │ │ +490 } │ │ │ │ │ +491 │ │ │ │ │ +_4_9_2 int _a_l_b_e_r_t_a_2_g_e_n_e_r_i_c ( int codim, int i ) const │ │ │ │ │ +493 { │ │ │ │ │ +494 return genericNumberingMap_.alberta2dune( codim, i ); │ │ │ │ │ +495 } │ │ │ │ │ +496 │ │ │ │ │ +497 private: │ │ │ │ │ +498 typedef std::vector ArrayType; │ │ │ │ │ +499 │ │ │ │ │ +500 void setup (); │ │ │ │ │ 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 codim ) const │ │ │ │ │ -505 { │ │ │ │ │ -506 _a_s_s_e_r_t( sizeCache_.size( codim ) == mesh_.size( codim ) ); │ │ │ │ │ -507 return mesh_.size( codim ); │ │ │ │ │ -508 } │ │ │ │ │ +502 // make the calculation of indexOnLevel and so on. │ │ │ │ │ +503 // extra method because of Reihenfolge │ │ │ │ │ +504 void calcExtras(); │ │ │ │ │ +505 │ │ │ │ │ +506 private: │ │ │ │ │ +507 // delete mesh and all vectors │ │ │ │ │ +508 void removeMesh(); │ │ │ │ │ 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 ]); │ │ │ │ │ +510 //*********************************************************************** │ │ │ │ │ +511 // MemoryManagement for Entities and Geometries │ │ │ │ │ +512 //********************************************************************** │ │ │ │ │ +513 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_1_4 _E_n_t_i_t_y_O_b_j_e_c_t; │ │ │ │ │ +515 │ │ │ │ │ +516 public: │ │ │ │ │ +517 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 >; │ │ │ │ │ +518 │ │ │ │ │ +519 template< int codim > │ │ │ │ │ +520 static int │ │ │ │ │ +_5_2_1 _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 ) │ │ │ │ │ +522 { │ │ │ │ │ +523 return _e_n_t_i_t_y.impl().twist(); │ │ │ │ │ +524 } │ │ │ │ │ +525 │ │ │ │ │ +526 template< int codim > │ │ │ │ │ +527 static int │ │ │ │ │ +_5_2_8 _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 ) │ │ │ │ │ +529 { │ │ │ │ │ +530 return _e_n_t_i_t_y.impl().template _t_w_i_s_t_<_ _c_o_d_i_m_ _>( subEntity ); │ │ │ │ │ 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_; │ │ │ │ │ +533 static int │ │ │ │ │ +_5_3_4 _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 ) │ │ │ │ │ +535 { │ │ │ │ │ +536 return intersection._i_m_p_l().twistInInside(); │ │ │ │ │ +537 } │ │ │ │ │ +538 │ │ │ │ │ +539 static int │ │ │ │ │ +_5_4_0 _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 ) │ │ │ │ │ +541 { │ │ │ │ │ +542 return intersection._i_m_p_l().twistInOutside(); │ │ │ │ │ 543 } │ │ │ │ │ 544 │ │ │ │ │ -545 │ │ │ │ │ -546 template < int dim, int dimworld > │ │ │ │ │ -547 inline void AlbertaGrid < dim, dimworld >::calcExtras () │ │ │ │ │ -_5_4_8 { │ │ │ │ │ -549 // determine new maxlevel │ │ │ │ │ -550 maxlevel_ = levelProvider_.maxLevel(); │ │ │ │ │ -551 _a_s_s_e_r_t( (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(); │ │ │ │ │ +545 public: │ │ │ │ │ +546 // read global element number from elNumbers_ │ │ │ │ │ +547 const _A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r & │ │ │ │ │ +548 _g_e_t_C_o_o_r_d ( const ElementInfo &elementInfo, int vertex ) const; │ │ │ │ │ +549 │ │ │ │ │ +550 private: │ │ │ │ │ +551 // pointer to an Albert Mesh, which contains the data │ │ │ │ │ +552 MeshPointer mesh_; │ │ │ │ │ +553 │ │ │ │ │ +554 // communication │ │ │ │ │ +555 _C_o_m_m_u_n_i_c_a_t_i_o_n comm_; │ │ │ │ │ 556 │ │ │ │ │ -557 // unset up2Dat status, if leafbegin is called then this status is updated │ │ │ │ │ -558 leafMarkerVector_.clear(); │ │ │ │ │ +557 // maximum level of the mesh │ │ │ │ │ +558 int maxlevel_; │ │ │ │ │ 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 _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _> │ │ │ │ │ -_5_7_5_ _:_:_w_r_i_t_e_G_r_i_d ( 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(); │ │ │ │ │ +560 // number of boundary segments within the macro grid │ │ │ │ │ +561 size_t numBoundarySegments_; │ │ │ │ │ +562 │ │ │ │ │ +563 // map between ALBERTA and DUNE numbering │ │ │ │ │ +564 _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_; │ │ │ │ │ +565 _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_; │ │ │ │ │ +566 │ │ │ │ │ +567 DofNumbering dofNumbering_; │ │ │ │ │ +568 │ │ │ │ │ +569 LevelProvider levelProvider_; │ │ │ │ │ +570 │ │ │ │ │ +571 // hierarchical numbering of AlbertaGrid, unique per codim │ │ │ │ │ +572 _H_i_e_r_a_r_c_h_i_c_I_n_d_e_x_S_e_t hIndexSet_; │ │ │ │ │ +573 │ │ │ │ │ +574 // the id set of this grid │ │ │ │ │ +575 IdSetImp idSet_; │ │ │ │ │ +576 │ │ │ │ │ +577 // the level index set, is generated from the HierarchicIndexSet │ │ │ │ │ +578 // is generated, when accessed │ │ │ │ │ +579 mutable std::vector< typename GridFamily::LevelIndexSetImp * > │ │ │ │ │ +levelIndexVec_; │ │ │ │ │ +580 │ │ │ │ │ +581 // the leaf index set, is generated from the HierarchicIndexSet │ │ │ │ │ +582 // is generated, when accessed │ │ │ │ │ +583 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_; │ │ │ │ │ +584 │ │ │ │ │ +585 _S_i_z_e_C_a_c_h_e_<_ _T_h_i_s_ _> sizeCache_; │ │ │ │ │ +586 │ │ │ │ │ +587 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; │ │ │ │ │ 588 │ │ │ │ │ -589 if( filename.size() <= 0 ) │ │ │ │ │ -590 return false; │ │ │ │ │ +589 // needed for VertexIterator, mark on which element a vertex is treated │ │ │ │ │ +590 mutable MarkerVector leafMarkerVector_; │ │ │ │ │ 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 ); │ │ │ │ │ +592 // needed for VertexIterator, mark on which element a vertex is treated │ │ │ │ │ +593 mutable std::vector< MarkerVector > levelMarkerVector_; │ │ │ │ │ +594 │ │ │ │ │ +595#if DUNE_ALBERTA_CACHE_COORDINATES │ │ │ │ │ +596 _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_; │ │ │ │ │ +597#endif │ │ │ │ │ 598 │ │ │ │ │ -599 // calc maxlevel and indexOnLevel and so on │ │ │ │ │ -600 calcExtras(); │ │ │ │ │ -601 │ │ │ │ │ -602 return true; │ │ │ │ │ -603 } │ │ │ │ │ +599 // current state of adaptation │ │ │ │ │ +600 AdaptationState adaptationState_; │ │ │ │ │ +601 }; │ │ │ │ │ +602 │ │ │ │ │ +603} // namespace Dune │ │ │ │ │ 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; │ │ │ │ │ +605#include "_a_l_b_e_r_t_a_g_r_i_d_._c_c" │ │ │ │ │ +606 │ │ │ │ │ +607// undef all dangerous defines │ │ │ │ │ +608#undef DIM │ │ │ │ │ +609#undef DIM_OF_WORLD │ │ │ │ │ +610 │ │ │ │ │ +611#ifdef _ABS_NOT_DEFINED_ │ │ │ │ │ +612#undef ABS │ │ │ │ │ +613#endif │ │ │ │ │ 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 } │ │ │ │ │ +615#ifdef _MIN_NOT_DEFINED_ │ │ │ │ │ +616#undef MIN │ │ │ │ │ +617#endif │ │ │ │ │ +618 │ │ │ │ │ +619#ifdef _MAX_NOT_DEFINED_ │ │ │ │ │ +620#undef MAX │ │ │ │ │ +621#endif │ │ │ │ │ +622 │ │ │ │ │ +623#ifdef obstack_chunk_alloc │ │ │ │ │ +624#undef obstack_chunk_alloc │ │ │ │ │ +625#endif │ │ │ │ │ +626#ifdef obstack_chunk_free │ │ │ │ │ +627#undef obstack_chunk_free │ │ │ │ │ +628#endif │ │ │ │ │ +629#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> │ │ │ │ │ +630 │ │ │ │ │ +631// We use MEM_ALLOC, so undefine it here. │ │ │ │ │ +632#undef MEM_ALLOC │ │ │ │ │ +633 │ │ │ │ │ +634// We use MEM_REALLOC, so undefine it here. │ │ │ │ │ +635#undef MEM_REALLOC │ │ │ │ │ 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 │ │ │ │ │ +637// We use MEM_CALLOC, so undefine it here. │ │ │ │ │ +638#undef MEM_CALLOC │ │ │ │ │ +639 │ │ │ │ │ +640// We use MEM_FREE, so undefine it here. │ │ │ │ │ +641#undef MEM_FREE │ │ │ │ │ +642 │ │ │ │ │ +643// Macro ERROR may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ +644#ifdef ERROR │ │ │ │ │ +645#undef ERROR │ │ │ │ │ +646#endif // #ifdef ERROR │ │ │ │ │ 647 │ │ │ │ │ -648#endif │ │ │ │ │ -_i_n_t_e_r_s_e_c_t_i_o_n_._c_c │ │ │ │ │ -_g_e_o_m_e_t_r_y_._c_c │ │ │ │ │ -_e_n_t_i_t_y_._c_c │ │ │ │ │ +648// Macro ERROR_EXIT may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ +649#ifdef ERROR_EXIT │ │ │ │ │ +650#undef ERROR_EXIT │ │ │ │ │ +651#endif // #ifdef ERROR_EXIT │ │ │ │ │ +652 │ │ │ │ │ +653// Macro WARNING may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ +654#ifdef WARNING │ │ │ │ │ +655#undef WARNING │ │ │ │ │ +656#endif // #ifdef WARNING │ │ │ │ │ +657 │ │ │ │ │ +658// Macro TEST may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ +659#ifdef TEST │ │ │ │ │ +660#undef TEST │ │ │ │ │ +661#endif // #ifdef TEST │ │ │ │ │ +662 │ │ │ │ │ +663// Macro TEST_EXIT may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ +664#ifdef TEST_EXIT │ │ │ │ │ +665#undef TEST_EXIT │ │ │ │ │ +666#endif // #ifdef TEST_EXIT │ │ │ │ │ +667 │ │ │ │ │ +668// Macro DEBUG_TEST may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ +669#ifdef DEBUG_TEST │ │ │ │ │ +670#undef DEBUG_TEST │ │ │ │ │ +671#endif // #ifdef DEBUG_TEST │ │ │ │ │ +672 │ │ │ │ │ +673// Macro DEBUG_TEST_EXIT may be defined by alberta_util.h. If so, undefine │ │ │ │ │ +it. │ │ │ │ │ +674#ifdef DEBUG_TEST_EXIT │ │ │ │ │ +675#undef DEBUG_TEST_EXIT │ │ │ │ │ +676#endif // #ifdef DEBUG_TEST_EXIT │ │ │ │ │ +677 │ │ │ │ │ +678// Macro INFO may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ +679#ifdef INFO │ │ │ │ │ +680#undef INFO │ │ │ │ │ +681#endif // #ifdef INFO │ │ │ │ │ +682 │ │ │ │ │ +683// Macro PRINT_INFO may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ +684#ifdef PRINT_INFO │ │ │ │ │ +685#undef PRINT_INFO │ │ │ │ │ +686#endif // #ifdef PRINT_INFO │ │ │ │ │ +687 │ │ │ │ │ +688// Macro PRINT_INT_VEC may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ +689#ifdef PRINT_INT_VEC │ │ │ │ │ +690#undef PRINT_INT_VEC │ │ │ │ │ +691#endif // #ifdef PRINT_INT_VEC │ │ │ │ │ +692 │ │ │ │ │ +693// Macro PRINT_REAL_VEC may be defined by alberta_util.h. If so, undefine │ │ │ │ │ +it. │ │ │ │ │ +694#ifdef PRINT_REAL_VEC │ │ │ │ │ +695#undef PRINT_REAL_VEC │ │ │ │ │ +696#endif // #ifdef PRINT_REAL_VEC │ │ │ │ │ +697 │ │ │ │ │ +698// Macro WAIT may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ +699#ifdef WAIT │ │ │ │ │ +700#undef WAIT │ │ │ │ │ +701#endif // #ifdef WAIT │ │ │ │ │ +702 │ │ │ │ │ +703// Macro WAIT_REALLY may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ +704#ifdef WAIT_REALLY │ │ │ │ │ +705#undef WAIT_REALLY │ │ │ │ │ +706#endif // #ifdef WAIT_REALLY │ │ │ │ │ +707 │ │ │ │ │ +708// Macro GET_WORKSPACE may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ +709#ifdef GET_WORKSPACE │ │ │ │ │ +710#undef GET_WORKSPACE │ │ │ │ │ +711#endif // #ifdef GET_WORKSPACE │ │ │ │ │ +712 │ │ │ │ │ +713// Macro FREE_WORKSPACE may be defined by alberta_util.h. If so, undefine │ │ │ │ │ +it. │ │ │ │ │ +714#ifdef FREE_WORKSPACE │ │ │ │ │ +715#undef FREE_WORKSPACE │ │ │ │ │ +716#endif // #ifdef FREE_WORKSPACE │ │ │ │ │ +717 │ │ │ │ │ +718// Macro MAT_ALLOC may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ +719#ifdef MAT_ALLOC │ │ │ │ │ +720#undef MAT_ALLOC │ │ │ │ │ +721#endif // #ifdef MAT_ALLOC │ │ │ │ │ +722 │ │ │ │ │ +723// Macro MAT_FREE may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ +724#ifdef MAT_FREE │ │ │ │ │ +725#undef MAT_FREE │ │ │ │ │ +726#endif // #ifdef MAT_FREE │ │ │ │ │ +727 │ │ │ │ │ +728// Macro NAME may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ +729#ifdef NAME │ │ │ │ │ +730#undef NAME │ │ │ │ │ +731#endif // #ifdef NAME │ │ │ │ │ +732 │ │ │ │ │ +733// Macro GET_STRUCT may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ +734#ifdef GET_STRUCT │ │ │ │ │ +735#undef GET_STRUCT │ │ │ │ │ +736#endif // #ifdef GET_STRUCT │ │ │ │ │ +737 │ │ │ │ │ +738// Macro ADD_PARAMETER may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ +739#ifdef ADD_PARAMETER │ │ │ │ │ +740#undef ADD_PARAMETER │ │ │ │ │ +741#endif // #ifdef ADD_PARAMETER │ │ │ │ │ +742 │ │ │ │ │ +743// Macro GET_PARAMETER may be defined by alberta_util.h. If so, undefine it. │ │ │ │ │ +744#ifdef GET_PARAMETER │ │ │ │ │ +745#undef GET_PARAMETER │ │ │ │ │ +746#endif // #ifdef GET_PARAMETER │ │ │ │ │ +747 │ │ │ │ │ +_7_4_8#define _ALBERTA_H_ │ │ │ │ │ +749 │ │ │ │ │ +750#endif // HAVE_ALBERTA || DOXYGEN │ │ │ │ │ +751 │ │ │ │ │ +752#endif │ │ │ │ │ +_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 │ │ │ │ │ +_s_i_z_e_c_a_c_h_e_._h_h │ │ │ │ │ +Provides size cache classes to implement the grids size method efficiently. │ │ │ │ │ +_u_n_d_e_f_i_n_e_-_3_._0_._h_h │ │ │ │ │ +Contains #undefs for all preprocessor macros defined by alberta. │ │ │ │ │ +_h_i_e_r_a_r_c_h_i_c_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 │ │ │ │ │ +_l_e_v_e_l_._h_h │ │ │ │ │ +_a_l_b_e_r_t_a_g_r_i_d_._c_c │ │ │ │ │ +_m_i_s_c_._h_h │ │ │ │ │ +_c_o_o_r_d_c_a_c_h_e_._h_h │ │ │ │ │ +_l_e_a_f_i_t_e_r_a_t_o_r_._h_h │ │ │ │ │ +_l_e_v_e_l_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 │ │ │ │ │ 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_:_:_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:467 │ │ │ │ │ +_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:487 │ │ │ │ │ _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:410 │ │ │ │ │ +_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:436 │ │ │ │ │ +_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:477 │ │ │ │ │ +_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:472 │ │ │ │ │ +_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:540 │ │ │ │ │ +_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:364 │ │ │ │ │ +_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:534 │ │ │ │ │ +_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:451 │ │ │ │ │ +_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:350 │ │ │ │ │ _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_:_:_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:492 │ │ │ │ │ +_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:521 │ │ │ │ │ +_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:405 │ │ │ │ │ +_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:457 │ │ │ │ │ +_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:356 │ │ │ │ │ +_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:482 │ │ │ │ │ +_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:528 │ │ │ │ │ +_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:445 │ │ │ │ │ +_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:420 │ │ │ │ │ +_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() │ │ │ │ │ +destructor │ │ │ │ │ +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:462 │ │ │ │ │ +_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_:_:_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_:_:_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_:_:_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_:_:_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:133 │ │ │ │ │ +_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:518 │ │ │ │ │ _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:329 │ │ │ │ │ +_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_:_:_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_L_e_v_e_l_G_r_i_d_V_i_e_w │ │ │ │ │ +DDeeffiinniittiioonn albertagrid/gridview.hh:76 │ │ │ │ │ +_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: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 │ │ │ │ │ +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_:_:_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_:_:_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:848 │ │ │ │ │ +_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:929 │ │ │ │ │ +_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:941 │ │ │ │ │ _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:1121 │ │ │ │ │ +_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:275 │ │ │ │ │ +_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/a00857_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00314_source.html │ │ │ │┄ Files 74% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: entitykey_inline.hh Source File │ │ │ │ +dune-grid: sizecache.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,230 +70,389 @@ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
entitykey_inline.hh
│ │ │ │ +
sizecache.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_GRID_COMMON_SIZECACHE_HH
│ │ │ │ +
6#define DUNE_GRID_COMMON_SIZECACHE_HH
│ │ │ │
7
│ │ │ │ -
8#include <algorithm>
│ │ │ │ -
9#include <dune/geometry/referenceelements.hh>
│ │ │ │ - │ │ │ │ -
11
│ │ │ │ -
12namespace Dune
│ │ │ │ -
13{
│ │ │ │ -
14
│ │ │ │ -
15 // DGFEntityKey
│ │ │ │ -
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];
│ │ │ │ -
│ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ +
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
│ │ │ │ -
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
│ │ │ │ +
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< 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 )
│ │ │ │ +
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 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
│ │ │ │ +
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#endif // DUNE_ENTITYKEY_INLINE_HH
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ +
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
│ │ │ │ -
Definition entitykey.hh:21
│ │ │ │ -
static DGFEntityKey< unsigned int > generateFace(int dim, const std::vector< unsigned int > &element, int f)
Definition entitykey_inline.hh:145
│ │ │ │ +
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,210 +1,414 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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_inline.hh │ │ │ │ │ + * _c_o_m_m_o_n │ │ │ │ │ +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 © 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_GRID_COMMON_SIZECACHE_HH │ │ │ │ │ +6#define DUNE_GRID_COMMON_SIZECACHE_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 │ │ │ │ │ -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 │ │ │ │ │ +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 │ │ │ │ │ -63 template< class A > │ │ │ │ │ -_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 ) │ │ │ │ │ +62 // count elements of set by iterating the grid │ │ │ │ │ +63 template < int codim, bool gridHasCodim > │ │ │ │ │ +64 struct CountLevelEntitiesBase │ │ │ │ │ 65 { │ │ │ │ │ -66 assert(key_.size()==k.key_.size()); │ │ │ │ │ -67 for (size_t i=0; i │ │ │ │ │ +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 │ │ │ │ │ +74 }; │ │ │ │ │ 75 │ │ │ │ │ -76 template< class A > │ │ │ │ │ -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 ) │ │ │ │ │ +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( 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 │ │ │ │ │ +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 & vec = levelSizes_[codim]; │ │ │ │ │ +160 vec.resize(numMxl); │ │ │ │ │ +161 levelTypeSizes_[codim].resize( numMxl ); │ │ │ │ │ +162 for(int level = 0; level( 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 │ │ │ │ │ +164 vec[level] = -1; │ │ │ │ │ +165 levelTypeSizes_[codim][level].resize( sizeCodim( codim ), -1 ); │ │ │ │ │ +166 } │ │ │ │ │ +167 } │ │ │ │ │ +168 } │ │ │ │ │ +169 │ │ │ │ │ +170 //******************************************************************** │ │ │ │ │ +171 // level sizes │ │ │ │ │ +172 //******************************************************************** │ │ │ │ │ +_1_7_4 int _s_i_z_e (int level, int codim) const │ │ │ │ │ +175 { │ │ │ │ │ +176 assert( codim >= 0 ); │ │ │ │ │ +177 assert( codim < nCodim ); │ │ │ │ │ +178 assert( level >= 0 ); │ │ │ │ │ +179 if( level >= (int) levelSizes_[codim]._s_i_z_e() ) return 0; │ │ │ │ │ 180 │ │ │ │ │ -181#endif // DUNE_ENTITYKEY_INLINE_HH │ │ │ │ │ -_e_n_t_i_t_y_k_e_y_._h_h │ │ │ │ │ +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 generateFace(int dim, const std::vector< │ │ │ │ │ -unsigned int > &element, int f) │ │ │ │ │ -DDeeffiinniittiioonn entitykey_inline.hh:145 │ │ │ │ │ +_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_:_:_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_:_:_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 │ │ │ │ │ +_D_u_n_e_:_:_S_i_z_e_C_a_c_h_e_:_:_s_i_z_e │ │ │ │ │ +int size(int level, GeometryType type) const │ │ │ │ │ +Return number of entities per level and geometry type in this process. │ │ │ │ │ +DDeeffiinniittiioonn sizecache.hh:191 │ │ │ │ │ +_D_u_n_e_:_:_S_i_z_e_C_a_c_h_e_:_:_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 sizecache.hh:174 │ │ │ │ │ +_D_u_n_e_:_:_S_i_z_e_C_a_c_h_e_:_:_s_i_z_e │ │ │ │ │ +int size(int codim) const │ │ │ │ │ +Return number of leaf entities of a given codim in this process. │ │ │ │ │ +DDeeffiinniittiioonn sizecache.hh:205 │ │ │ │ │ +_D_u_n_e_:_:_S_i_z_e_C_a_c_h_e_:_:_S_i_z_e_C_a_c_h_e │ │ │ │ │ +SizeCache(const GridType &grid) │ │ │ │ │ +constructor taking grid reference │ │ │ │ │ +DDeeffiinniittiioonn sizecache.hh:142 │ │ │ │ │ +_D_u_n_e_:_:_S_i_z_e_C_a_c_h_e_:_:_s_i_z_e │ │ │ │ │ +int size(const GeometryType type) const │ │ │ │ │ +Return number of leaf entities per geometry type in this process. │ │ │ │ │ +DDeeffiinniittiioonn sizecache.hh:217 │ │ │ │ │ +_D_u_n_e_:_:_S_i_z_e_C_a_c_h_e_:_:_r_e_s_e_t │ │ │ │ │ +void reset() │ │ │ │ │ +reset all cached sizes │ │ │ │ │ +DDeeffiinniittiioonn sizecache.hh:148 │ │ │ │ │ +_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/a00860_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00779_source.html │ │ │ │┄ Files 87% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dgfidentitygrid.hh Source File │ │ │ │ +dune-grid: pointiterator.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,179 +70,151 @@ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dgfidentitygrid.hh
│ │ │ │ +
pointiterator.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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 {
│ │ │ │ - │ │ │ │ +
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{
│ │ │ │ +
22
│ │ │ │ +
23 namespace VTK {
│ │ │ │
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 };
│ │ │ │ +
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 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;
│ │ │ │ +
80
│ │ │ │ +
81 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
83 return *cornerit;
│ │ │ │ +
84 }
│ │ │ │
│ │ │ │ -
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 }
│ │ │ │ +
│ │ │ │ +
86 bool isDereferencable() const {
│ │ │ │ +
87 return cornerit.isDereferencable();
│ │ │ │ +
88 }
│ │ │ │
│ │ │ │ -
102 };
│ │ │ │ +
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 }
│ │ │ │
│ │ │ │ -
103
│ │ │ │ -
104}
│ │ │ │
105
│ │ │ │ -
106#endif // #ifndef DUNE_DGFPARSER_DGFIDENTITYGRID_HH
│ │ │ │ -
The IdentityGrid class.
│ │ │ │ - │ │ │ │ +
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 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:93
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ +
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,209 +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 │ │ │ │ │ -dgfidentitygrid.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 © 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; │ │ │ │ │ +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{ │ │ │ │ │ +22 │ │ │ │ │ +23 namespace VTK { │ │ │ │ │ 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 │ │ │ │ │ +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 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 │ │ │ │ │ +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 │ │ │ │ │ +_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 _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 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 │ │ │ │ │ -86 │ │ │ │ │ -87 // DGFGridInfo for IdGrid │ │ │ │ │ -88 // ---------------------- │ │ │ │ │ +_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 │ │ │ │ │ -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} │ │ │ │ │ +_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 │ │ │ │ │ -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 │ │ │ │ │ +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_._h_h │ │ │ │ │ +_c_o_r_n_e_r_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_:_:_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:93 │ │ │ │ │ -_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_:_:_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/a00875_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00644_source.html │ │ │ │┄ Files 84% 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 © DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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:97
│ │ │ │ - │ │ │ │ - │ │ │ │ +
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.10 │ │ │ │ │ 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 © 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 │ │ │ │ │ +_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 │ │ │ │ │ _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:97 │ │ │ │ │ -_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/a00890_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00227_source.html │ │ │ │┄ Files 96% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dgfyasp.hh Source File │ │ │ │ +dune-grid: torus.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,619 +70,623 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dgfyasp.hh
│ │ │ │ +
torus.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_GRID_YASPGRID_TORUS_HH
│ │ │ │ +
6#define DUNE_GRID_YASPGRID_TORUS_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ - │ │ │ │ -
10#include "dgfparser.hh"
│ │ │ │ -
11
│ │ │ │ -
12namespace Dune
│ │ │ │ -
13{
│ │ │ │ +
8#include <array>
│ │ │ │ +
9#include <bitset>
│ │ │ │ +
10#include <cmath>
│ │ │ │ +
11#include <deque>
│ │ │ │ +
12#include <iostream>
│ │ │ │ +
13#include <vector>
│ │ │ │
14
│ │ │ │ -
15 // External Forward Declarations
│ │ │ │ -
16 // -----------------------------
│ │ │ │ -
17
│ │ │ │ -
18 template< class GridImp, class IntersectionImp >
│ │ │ │ -
19 class Intersection;
│ │ │ │ -
20
│ │ │ │ -
21
│ │ │ │ -
22 namespace dgf
│ │ │ │ -
23 {
│ │ │ │ +
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
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
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;
│ │ │ │ +
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
│ │ │ │ -
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 }
│ │ │ │ +
│ │ │ │ +
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 }
│ │ │ │
│ │ │ │ -
117
│ │ │ │ +
116
│ │ │ │
│ │ │ │ -
118 Grid *grid() const
│ │ │ │ +
118 int dims (int i) const
│ │ │ │
119 {
│ │ │ │ -
120 return grid_;
│ │ │ │ +
120 return _dims[i];
│ │ │ │
121 }
│ │ │ │
│ │ │ │
122
│ │ │ │ -
123 template <class Intersection>
│ │ │ │
│ │ │ │ -
124 bool wasInserted(const Intersection &intersection) const
│ │ │ │ +
124 Communication comm () const
│ │ │ │
125 {
│ │ │ │ -
126 return false;
│ │ │ │ +
126 return _comm;
│ │ │ │
127 }
│ │ │ │
│ │ │ │
128
│ │ │ │ -
129 template <class Intersection>
│ │ │ │
│ │ │ │ -
130 int boundaryId(const Intersection &intersection) const
│ │ │ │ +
130 int tag () 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 };
│ │ │ │ +
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
│ │ │ │ -
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." );
│ │ │ │ +
│ │ │ │ +
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 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 << "Transformation '" << 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 }
│ │ │ │ +
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
│ │ │ │ -
│ │ │ │ -
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 }
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
319 template <class Intersection>
│ │ │ │
│ │ │ │ -
320 bool wasInserted(const Intersection &intersection) const
│ │ │ │ -
321 {
│ │ │ │ -
322 return false;
│ │ │ │ -
323 }
│ │ │ │ +
320 bool operator!= (const ProcListIterator& iter) const
│ │ │ │ +
321 {
│ │ │ │ +
322 return i != iter.i;
│ │ │ │ +
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();
│ │ │ │ + │ │ │ │ +
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
│ │ │ │ -
342 template< int codim >
│ │ │ │
│ │ │ │ -
343 int numParameters () const
│ │ │ │ + │ │ │ │
344 {
│ │ │ │ -
345 return 0;
│ │ │ │ +
345 return ProcListIterator(_sendlist.end());
│ │ │ │
346 }
│ │ │ │
│ │ │ │
347
│ │ │ │ -
348 // return true if boundary parameters found
│ │ │ │
│ │ │ │ - │ │ │ │ + │ │ │ │
350 {
│ │ │ │ -
351 return boundaryDomainBlock_->hasParameter();
│ │ │ │ +
351 return ProcListIterator(_recvlist.begin());
│ │ │ │
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 << "Transformation '" << 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 );
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
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 grid_ = new YaspGrid< dim, EquidistantOffsetCoordinates<ctype, dim> >
│ │ │ │ -
473 ( lower, upper, anz, periodic, grdParam.overlap(), comm );
│ │ │ │ -
474
│ │ │ │ -
475 boundaryDomainBlock_ = new dgf::BoundaryDomBlock( gridin, dimension );
│ │ │ │ -
476 }
│ │ │ │ +
472 void proclists ()
│ │ │ │ +
473 {
│ │ │ │ +
474 // compile the full neighbor list
│ │ │ │ +
475 CommPartner cp;
│ │ │ │ +
476 iTupel delta;
│ │ │ │
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
│ │ │ │ - │ │ │ │ +
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
│ │ │ │ -
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:122
│ │ │ │ -
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:166
│ │ │ │ -
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
│ │ │ │ - │ │ │ │ - │ │ │ │ +
a base class for the yaspgrid partitioning strategy
Definition partitioning.hh:38
│ │ │ │ +
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,740 +1,680 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ 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 │ │ │ │ │ -dgfyasp.hh │ │ │ │ │ + * _y_a_s_p_g_r_i_d │ │ │ │ │ +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 © 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_GRID_YASPGRID_TORUS_HH │ │ │ │ │ +6#define DUNE_GRID_YASPGRID_TORUS_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{ │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10#include │ │ │ │ │ +11#include │ │ │ │ │ +12#include │ │ │ │ │ +13#include │ │ │ │ │ 14 │ │ │ │ │ -15 // External Forward Declarations │ │ │ │ │ -16 // ----------------------------- │ │ │ │ │ -17 │ │ │ │ │ -18 template< class GridImp, class IntersectionImp > │ │ │ │ │ -19 class Intersection; │ │ │ │ │ -20 │ │ │ │ │ -21 │ │ │ │ │ -22 namespace dgf │ │ │ │ │ -23 { │ │ │ │ │ +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 │ │ │ │ │ -_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 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; │ │ │ │ │ +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 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 │ │ │ │ │ +_9_4 int _r_a_n_k () const │ │ │ │ │ +95 { │ │ │ │ │ +96 return _comm.rank(); │ │ │ │ │ +97 } │ │ │ │ │ +98 │ │ │ │ │ +_1_0_0 _i_T_u_p_e_l _c_o_o_r_d () const │ │ │ │ │ +101 { │ │ │ │ │ +102 return _r_a_n_k___t_o___c_o_o_r_d(_comm.rank()); │ │ │ │ │ +103 } │ │ │ │ │ +104 │ │ │ │ │ +_1_0_6 int _p_r_o_c_s () const │ │ │ │ │ +107 { │ │ │ │ │ +108 return _comm.size(); │ │ │ │ │ +109 } │ │ │ │ │ +110 │ │ │ │ │ +_1_1_2 const _i_T_u_p_e_l & _d_i_m_s () const │ │ │ │ │ +113 { │ │ │ │ │ +114 return _dims; │ │ │ │ │ +115 } │ │ │ │ │ +116 │ │ │ │ │ +_1_1_8 int _d_i_m_s (int i) const │ │ │ │ │ 119 { │ │ │ │ │ -120 return grid_; │ │ │ │ │ +120 return _dims[i]; │ │ │ │ │ 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 │ │ │ │ │ +_1_2_4 Communication _c_o_m_m () const │ │ │ │ │ 125 { │ │ │ │ │ -126 return false; │ │ │ │ │ +126 return _comm; │ │ │ │ │ 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 │ │ │ │ │ +_1_3_0 int _t_a_g () 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(); │ │ │ │ │ +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 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(); │ │ │ │ │ +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; i │ │ │ │ │ -_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 ]; │ │ │ │ │ +172 │ │ │ │ │ +_1_7_4 int _c_o_l_o_r (const _i_T_u_p_e_l & _c_o_o_r_d) const │ │ │ │ │ +175 { │ │ │ │ │ +176 int c = 0; │ │ │ │ │ +177 int power = 1; │ │ │ │ │ +178 │ │ │ │ │ +179 // interior coloring │ │ │ │ │ +180 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 } │ │ │ │ │ -196 │ │ │ │ │ -197 _G_r_i_d *grid_; │ │ │ │ │ -198 dgf::BoundaryDomBlock *boundaryDomainBlock_; │ │ │ │ │ -199 std::vector emptyParam; │ │ │ │ │ -200 }; │ │ │ │ │ +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 │ │ │ │ │ -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." ); │ │ │ │ │ +_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 if( intervalBlock.dimw() != dim ) │ │ │ │ │ +216 for (int i=0; i." ); │ │ │ │ │ -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 << "Transformation '" << trafo │ │ │ │ │ -267 << "' does not map boundaries on boundaries." << std::endl; │ │ │ │ │ +218 if (delta[i]<0) │ │ │ │ │ +219 { │ │ │ │ │ +220 // if I am on the boundary and domain is not periodic => 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 >( 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 > > │ │ │ │ │ +269 │ │ │ │ │ +_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 { │ │ │ │ │ -_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() ) │ │ │ │ │ +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 generate( input, comm ); │ │ │ │ │ +299 return i->index; │ │ │ │ │ 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() ) │ │ │ │ │ +_3_0_3 int _d_i_s_t_a_n_c_e () const │ │ │ │ │ 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 } │ │ │ │ │ +305 int dist = 0; │ │ │ │ │ +306 _i_T_u_p_e_l _d_e_l_t_a=i->delta; │ │ │ │ │ +307 for (int j=0; j │ │ │ │ │ -_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 │ │ │ │ │ +_3_2_0 bool _o_p_e_r_a_t_o_r_!_=_ (const _P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r& iter) const │ │ │ │ │ 321 { │ │ │ │ │ -322 return false; │ │ │ │ │ +322 return i != iter.i; │ │ │ │ │ 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 │ │ │ │ │ +_3_2_6 _P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r& _o_p_e_r_a_t_o_r_+_+_ () │ │ │ │ │ 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(); │ │ │ │ │ +328 ++i; │ │ │ │ │ +329 return *this; │ │ │ │ │ +330 } │ │ │ │ │ +331 │ │ │ │ │ +332 private: │ │ │ │ │ +333 typename std::deque::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 │ │ │ │ │ -342 template< int codim > │ │ │ │ │ -_3_4_3 int _n_u_m_P_a_r_a_m_e_t_e_r_s () const │ │ │ │ │ +_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 0; │ │ │ │ │ +345 return _P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r(_sendlist.end()); │ │ │ │ │ 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 │ │ │ │ │ +_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 boundaryDomainBlock_->hasParameter(); │ │ │ │ │ +351 return _P_r_o_c_L_i_s_t_I_t_e_r_a_t_o_r(_recvlist.begin()); │ │ │ │ │ 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 ) │ │ │ │ │ +_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 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 ) │ │ │ │ │ +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 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 << "Transformation '" << trafo │ │ │ │ │ -461 << "' does not map boundaries on boundaries." << std::endl; │ │ │ │ │ -462 } │ │ │ │ │ -463 else │ │ │ │ │ -464 { │ │ │ │ │ -465 periodic[ dir ] = true; │ │ │ │ │ -466 } │ │ │ │ │ +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 // get grid parameters │ │ │ │ │ -470 dgf::YaspGridParameterBlock grdParam( gridin ); │ │ │ │ │ +468 } │ │ │ │ │ +469 │ │ │ │ │ +470 private: │ │ │ │ │ 471 │ │ │ │ │ -472 grid_ = new YaspGrid< dim, EquidistantOffsetCoordinates > │ │ │ │ │ -473 ( lower, upper, anz, periodic, grdParam.overlap(), comm ); │ │ │ │ │ -474 │ │ │ │ │ -475 boundaryDomainBlock_ = new dgf::BoundaryDomBlock( gridin, dimension ); │ │ │ │ │ -476 } │ │ │ │ │ +472 void proclists () │ │ │ │ │ +473 { │ │ │ │ │ +474 // compile the full neighbor list │ │ │ │ │ +475 CommPartner cp; │ │ │ │ │ +476 _i_T_u_p_e_l delta; │ │ │ │ │ 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 > > │ │ │ │ │ +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 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 │ │ │ │ │ +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_:_:_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:122 │ │ │ │ │ -_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:166 │ │ │ │ │ -_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 │ │ │ │ │ +_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:38 │ │ │ │ │ +_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 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00893_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00791_source.html │ │ │ │┄ Files 90% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: gnuplot.hh Source File │ │ │ │ +dune-grid: streams.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,141 +70,132 @@ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
gnuplot.hh
│ │ │ │ +
streams.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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_IO_GNUPLOT_HH
│ │ │ │ -
6#define DUNE_IO_GNUPLOT_HH
│ │ │ │ -
7
│ │ │ │ -
13#include <vector>
│ │ │ │ -
14#include <string>
│ │ │ │ -
15#include <iostream>
│ │ │ │ -
16#include <fstream>
│ │ │ │ -
17
│ │ │ │ -
18#include <dune/common/fvector.hh>
│ │ │ │ -
19
│ │ │ │ - │ │ │ │ -
21
│ │ │ │ -
22namespace Dune {
│ │ │ │ +
5
│ │ │ │ +
6#ifndef DUNE_GRID_IO_FILE_VTK_STREAMS_HH
│ │ │ │ +
7#define DUNE_GRID_IO_FILE_VTK_STREAMS_HH
│ │ │ │ +
8
│ │ │ │ +
9#include <ostream>
│ │ │ │ +
10
│ │ │ │ + │ │ │ │ +
12
│ │ │ │ +
13namespace Dune {
│ │ │ │ +
14
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
17 std::ostream& s;
│ │ │ │ +
18 b64chunk chunk;
│ │ │ │ +
19 char obuf[4];
│ │ │ │ +
20
│ │ │ │ +
21 public:
│ │ │ │
23
│ │ │ │ -
29 template<class GridView>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
31
│ │ │ │ -
32 typedef typename GridView::Grid::ctype ctype;
│ │ │ │ +
│ │ │ │ +
27 Base64Stream(std::ostream& s_)
│ │ │ │ +
28 : s(s_)
│ │ │ │ +
29 {
│ │ │ │ +
30 // reset chunk
│ │ │ │ +
31 chunk.reset();
│ │ │ │ +
32 }
│ │ │ │ +
│ │ │ │
33
│ │ │ │ -
34 constexpr static int dimworld = GridView::dimensionworld;
│ │ │ │
35
│ │ │ │ -
36 public:
│ │ │ │ -
│ │ │ │ -
37 GnuplotWriter (const GridView & gv) : _is(gv.indexSet()), _gv(gv)
│ │ │ │ -
38 {
│ │ │ │ -
39 static_assert(dimworld==1 || dimworld==2, "GnuPlot export only works for worlddim==1 and worlddim==2");
│ │ │ │ -
40 // allocate _data buffer
│ │ │ │ -
41 _data.resize(_is.size(0)*2);
│ │ │ │ -
42 }
│ │ │ │ -
│ │ │ │ -
43
│ │ │ │ -
48 template <class DataContainer>
│ │ │ │ -
│ │ │ │ -
49 void addCellData(const DataContainer& data, const std::string & name)
│ │ │ │ -
50 {
│ │ │ │ -
51 if (dimworld!=1)
│ │ │ │ -
52 DUNE_THROW(IOError, "Gnuplot cell data writing is only supported for grids in a 1d world!");
│ │ │ │ -
53 addData(cellData, data, name);
│ │ │ │ +
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 }
│ │ │ │
│ │ │ │
55
│ │ │ │ -
60 template <class DataContainer>
│ │ │ │ -
│ │ │ │ -
61 void addVertexData(const DataContainer& data, const std::string & name)
│ │ │ │ -
62 {
│ │ │ │ -
63 addData(vertexData, data, name);
│ │ │ │ -
64 }
│ │ │ │ -
│ │ │ │ -
65
│ │ │ │ -
69 void write(const std::string& filename) const;
│ │ │ │ -
70
│ │ │ │ -
71 private:
│ │ │ │ -
72 enum DataType { vertexData, cellData };
│ │ │ │ -
73 const typename GridView::IndexSet & _is;
│ │ │ │ -
74 const GridView _gv;
│ │ │ │ -
75 std::vector< std::vector< float > > _data;
│ │ │ │ -
76 std::vector< std::string > _names;
│ │ │ │ -
77
│ │ │ │ -
78 template <class DataContainer>
│ │ │ │ -
79 void addData(DataType t, const DataContainer& data, const std::string & name);
│ │ │ │ -
80
│ │ │ │ -
81 void writeRow(std::ostream & file,
│ │ │ │ -
82 const FieldVector<ctype, dimworld>& position,
│ │ │ │ -
83 const std::vector<float> & data) const;
│ │ │ │ -
84 };
│ │ │ │ -
│ │ │ │ -
85
│ │ │ │ -
89 template<class G>
│ │ │ │ -
│ │ │ │ -
90 class LeafGnuplotWriter : public GnuplotWriter<typename G::LeafGridView>
│ │ │ │ -
91 {
│ │ │ │ -
92 public:
│ │ │ │ -
│ │ │ │ -
94 LeafGnuplotWriter (const G& grid)
│ │ │ │ -
95 : GnuplotWriter<typename G::LeafGridView>(grid.leafGridView())
│ │ │ │ -
96 {}
│ │ │ │ -
│ │ │ │ -
97 };
│ │ │ │ -
│ │ │ │ -
98
│ │ │ │ -
102 template<class G>
│ │ │ │ -
│ │ │ │ -
103 class LevelGnuplotWriter : public GnuplotWriter<typename G::LevelGridView>
│ │ │ │ -
104 {
│ │ │ │ -
105 public:
│ │ │ │ -
│ │ │ │ -
107 LevelGnuplotWriter (const G& grid, int level)
│ │ │ │ -
108 : GnuplotWriter<typename G::LevelGridView>(grid.levelGridView(level))
│ │ │ │ -
109 {}
│ │ │ │ -
│ │ │ │ -
110 };
│ │ │ │ -
│ │ │ │ -
111
│ │ │ │ -
112}
│ │ │ │ -
113
│ │ │ │ -
114#include "gnuplot/gnuplot.cc"
│ │ │ │ -
115
│ │ │ │ -
116#endif // DUNE_IO_GNUPLOT_HH
│ │ │ │ -
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:805
│ │ │ │ -
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:788
│ │ │ │ -
static constexpr int dimensionworld
The dimension of the world the grid lives in.
Definition common/gridview.hh:137
│ │ │ │ +
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
│ │ │ │ +
103
│ │ │ │ +
104#endif // DUNE_GRID_IO_FILE_VTK_STREAMS_HH
│ │ │ │ +
Simple base64 encode.
│ │ │ │
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
│ │ │ │ -
void addVertexData(const DataContainer &data, const std::string &name)
Add vertex data.
Definition gnuplot.hh:61
│ │ │ │ -
void addCellData(const DataContainer &data, const std::string &name)
Add cell data.
Definition gnuplot.hh:49
│ │ │ │ -
void write(const std::string &filename) const
Write Gnuplot file to disk.
Definition gnuplot.cc:19
│ │ │ │ -
GnuplotWriter(const GridView &gv)
Definition gnuplot.hh:37
│ │ │ │ -
GnuplotWriter on the leaf grid.
Definition gnuplot.hh:91
│ │ │ │ -
LeafGnuplotWriter(const G &grid)
Construct a Gnuplot writer for the leaf level of a given grid.
Definition gnuplot.hh:94
│ │ │ │ -
GnuplotWriter on a given level grid.
Definition gnuplot.hh:104
│ │ │ │ -
LevelGnuplotWriter(const G &grid, int level)
Construct a Gnuplot writer for a certain level of a given grid.
Definition gnuplot.hh:107
│ │ │ │ -
Different resources needed by all grid implementations.
│ │ │ │ +
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
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,162 +2,143 @@ │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ * _i_o │ │ │ │ │ * _f_i_l_e │ │ │ │ │ -gnuplot.hh │ │ │ │ │ + * _v_t_k │ │ │ │ │ +streams.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 © 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_IO_GNUPLOT_HH │ │ │ │ │ -6#define DUNE_IO_GNUPLOT_HH │ │ │ │ │ -7 │ │ │ │ │ -13#include │ │ │ │ │ -14#include │ │ │ │ │ -15#include │ │ │ │ │ -16#include │ │ │ │ │ -17 │ │ │ │ │ -18#include │ │ │ │ │ -19 │ │ │ │ │ -20#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_._h_h> │ │ │ │ │ -21 │ │ │ │ │ -22namespace _D_u_n_e { │ │ │ │ │ +5 │ │ │ │ │ +6#ifndef DUNE_GRID_IO_FILE_VTK_STREAMS_HH │ │ │ │ │ +7#define DUNE_GRID_IO_FILE_VTK_STREAMS_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_6_4_e_n_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 │ │ │ │ │ -29 template │ │ │ │ │ -_3_0 class _G_n_u_p_l_o_t_W_r_i_t_e_r { │ │ │ │ │ -31 │ │ │ │ │ -32 typedef typename GridView::Grid::ctype ctype; │ │ │ │ │ +_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 } │ │ │ │ │ 33 │ │ │ │ │ -34 constexpr static int dimworld = _G_r_i_d_V_i_e_w_:_:_d_i_m_e_n_s_i_o_n_w_o_r_l_d; │ │ │ │ │ 35 │ │ │ │ │ -36 public: │ │ │ │ │ -_3_7 _G_n_u_p_l_o_t_W_r_i_t_e_r (const _G_r_i_d_V_i_e_w & gv) : _is(gv.indexSet()), _gv(gv) │ │ │ │ │ -38 { │ │ │ │ │ -39 static_assert(dimworld==1 || dimworld==2, "GnuPlot export only works for │ │ │ │ │ -worlddim==1 and worlddim==2"); │ │ │ │ │ -40 // allocate _data buffer │ │ │ │ │ -41 _data.resize(_is.size(0)*2); │ │ │ │ │ -42 } │ │ │ │ │ -43 │ │ │ │ │ -48 template │ │ │ │ │ -_4_9 void _a_d_d_C_e_l_l_D_a_t_a(const DataContainer& data, const std::string & name) │ │ │ │ │ -50 { │ │ │ │ │ -51 if (dimworld!=1) │ │ │ │ │ -52 DUNE_THROW(IOError, "Gnuplot cell data writing is only supported for grids │ │ │ │ │ -in a 1d world!"); │ │ │ │ │ -53 addData(cellData, data, name); │ │ │ │ │ +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 } │ │ │ │ │ 55 │ │ │ │ │ -60 template │ │ │ │ │ -_6_1 void _a_d_d_V_e_r_t_e_x_D_a_t_a(const DataContainer& data, const std::string & name) │ │ │ │ │ -62 { │ │ │ │ │ -63 addData(vertexData, data, name); │ │ │ │ │ -64 } │ │ │ │ │ -65 │ │ │ │ │ -69 void _w_r_i_t_e(const std::string& filename) const; │ │ │ │ │ -70 │ │ │ │ │ -71 private: │ │ │ │ │ -72 enum DataType { vertexData, cellData }; │ │ │ │ │ -73 const typename _G_r_i_d_V_i_e_w_:_:_I_n_d_e_x_S_e_t & _is; │ │ │ │ │ -74 const GridView _gv; │ │ │ │ │ -75 std::vector< std::vector< float > > _data; │ │ │ │ │ -76 std::vector< std::string > _names; │ │ │ │ │ -77 │ │ │ │ │ -78 template │ │ │ │ │ -79 void addData(DataType t, const DataContainer& data, const std::string & │ │ │ │ │ -name); │ │ │ │ │ -80 │ │ │ │ │ -81 void writeRow(std::ostream & file, │ │ │ │ │ -82 const FieldVector& position, │ │ │ │ │ -83 const std::vector & data) const; │ │ │ │ │ -84 }; │ │ │ │ │ -85 │ │ │ │ │ -89 template │ │ │ │ │ -_9_0 class _L_e_a_f_G_n_u_p_l_o_t_W_r_i_t_e_r : public _G_n_u_p_l_o_t_W_r_i_t_e_r │ │ │ │ │ -91 { │ │ │ │ │ -92 public: │ │ │ │ │ -_9_4 _L_e_a_f_G_n_u_p_l_o_t_W_r_i_t_e_r (const G& grid) │ │ │ │ │ -95 : _G_n_u_p_l_o_t_W_r_i_t_e_r(grid._l_e_a_f_G_r_i_d_V_i_e_w()) │ │ │ │ │ -96 {} │ │ │ │ │ -97 }; │ │ │ │ │ -98 │ │ │ │ │ -102 template │ │ │ │ │ -_1_0_3 class _L_e_v_e_l_G_n_u_p_l_o_t_W_r_i_t_e_r : public _G_n_u_p_l_o_t_W_r_i_t_e_r │ │ │ │ │ -104 { │ │ │ │ │ -105 public: │ │ │ │ │ -_1_0_7 _L_e_v_e_l_G_n_u_p_l_o_t_W_r_i_t_e_r (const G& grid, int level) │ │ │ │ │ -108 : _G_n_u_p_l_o_t_W_r_i_t_e_r(grid._l_e_v_e_l_G_r_i_d_V_i_e_w(level)) │ │ │ │ │ -109 {} │ │ │ │ │ -110 }; │ │ │ │ │ -111 │ │ │ │ │ -112} │ │ │ │ │ -113 │ │ │ │ │ -114#include "_g_n_u_p_l_o_t_/_g_n_u_p_l_o_t_._c_c" │ │ │ │ │ -115 │ │ │ │ │ -116#endif // DUNE_IO_GNUPLOT_HH │ │ │ │ │ -_g_n_u_p_l_o_t_._c_c │ │ │ │ │ -Implementation of gnuplot output for 1D and 2D grids. │ │ │ │ │ -_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_:_:_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:805 │ │ │ │ │ -_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:788 │ │ │ │ │ -_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:137 │ │ │ │ │ +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 │ │ │ │ │ +103 │ │ │ │ │ +104#endif // DUNE_GRID_IO_FILE_VTK_STREAMS_HH │ │ │ │ │ +_b_6_4_e_n_c_._h_h │ │ │ │ │ +Simple base64 encode. │ │ │ │ │ _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_:_:_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_:_:_a_d_d_V_e_r_t_e_x_D_a_t_a │ │ │ │ │ -void addVertexData(const DataContainer &data, const std::string &name) │ │ │ │ │ -Add vertex data. │ │ │ │ │ -DDeeffiinniittiioonn gnuplot.hh:61 │ │ │ │ │ -_D_u_n_e_:_:_G_n_u_p_l_o_t_W_r_i_t_e_r_:_:_a_d_d_C_e_l_l_D_a_t_a │ │ │ │ │ -void addCellData(const DataContainer &data, const std::string &name) │ │ │ │ │ -Add cell data. │ │ │ │ │ -DDeeffiinniittiioonn gnuplot.hh:49 │ │ │ │ │ -_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_:_:_G_n_u_p_l_o_t_W_r_i_t_e_r_:_:_G_n_u_p_l_o_t_W_r_i_t_e_r │ │ │ │ │ -GnuplotWriter(const GridView &gv) │ │ │ │ │ -DDeeffiinniittiioonn gnuplot.hh:37 │ │ │ │ │ -_D_u_n_e_:_:_L_e_a_f_G_n_u_p_l_o_t_W_r_i_t_e_r │ │ │ │ │ -GnuplotWriter on the leaf grid. │ │ │ │ │ -DDeeffiinniittiioonn gnuplot.hh:91 │ │ │ │ │ -_D_u_n_e_:_:_L_e_a_f_G_n_u_p_l_o_t_W_r_i_t_e_r_:_:_L_e_a_f_G_n_u_p_l_o_t_W_r_i_t_e_r │ │ │ │ │ -LeafGnuplotWriter(const G &grid) │ │ │ │ │ -Construct a Gnuplot writer for the leaf level of a given grid. │ │ │ │ │ -DDeeffiinniittiioonn gnuplot.hh:94 │ │ │ │ │ -_D_u_n_e_:_:_L_e_v_e_l_G_n_u_p_l_o_t_W_r_i_t_e_r │ │ │ │ │ -GnuplotWriter on a given level grid. │ │ │ │ │ -DDeeffiinniittiioonn gnuplot.hh:104 │ │ │ │ │ -_D_u_n_e_:_:_L_e_v_e_l_G_n_u_p_l_o_t_W_r_i_t_e_r_:_:_L_e_v_e_l_G_n_u_p_l_o_t_W_r_i_t_e_r │ │ │ │ │ -LevelGnuplotWriter(const G &grid, int level) │ │ │ │ │ -Construct a Gnuplot writer for a certain level of a given grid. │ │ │ │ │ -DDeeffiinniittiioonn gnuplot.hh:107 │ │ │ │ │ -_g_r_i_d_._h_h │ │ │ │ │ -Different resources needed by all grid implementations. │ │ │ │ │ +_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 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00896_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00287_source.html │ │ │ │┄ Files 88% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: vtk.hh Source File │ │ │ │ +dune-grid: exceptions.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,41 +70,47 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
vtk.hh
│ │ │ │ +
exceptions.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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 file i/o for the visualization toolkit.
│ │ │ │ - │ │ │ │ - │ │ │ │ -
Provides subsampled file i/o for the visualization toolkit.
│ │ │ │ +
5#ifndef DUNE_GRID_COMMON_EXCEPTIONS_HH
│ │ │ │ +
6#define DUNE_GRID_COMMON_EXCEPTIONS_HH
│ │ │ │ +
7
│ │ │ │ +
8#include <dune/common/exceptions.hh>
│ │ │ │ +
9
│ │ │ │ +
10namespace Dune
│ │ │ │ +
11{
│ │ │ │ +
12
│ │ │ │ +
13 // GridError
│ │ │ │ +
14 // ---------
│ │ │ │ +
15
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
19 : public Exception
│ │ │ │ +
20 {};
│ │ │ │ +
│ │ │ │ +
21
│ │ │ │ +
22}
│ │ │ │ +
23
│ │ │ │ +
24#endif // #ifndef DUNE_GRID_COMMON_EXCEPTIONS_HH
│ │ │ │ +
Include standard header files.
Definition agrid.hh:60
│ │ │ │ +
Base class for exceptions in Dune grid modules.
Definition exceptions.hh:20
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,35 +1,40 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ - * _i_o │ │ │ │ │ - * _f_i_l_e │ │ │ │ │ -vtk.hh │ │ │ │ │ + * _c_o_m_m_o_n │ │ │ │ │ +exceptions.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 © 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 │ │ │ │ │ -_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. │ │ │ │ │ -_v_o_l_u_m_e_w_r_i_t_e_r_._h_h │ │ │ │ │ -_b_o_u_n_d_a_r_y_w_r_i_t_e_r_._h_h │ │ │ │ │ -_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. │ │ │ │ │ +5#ifndef DUNE_GRID_COMMON_EXCEPTIONS_HH │ │ │ │ │ +6#define DUNE_GRID_COMMON_EXCEPTIONS_HH │ │ │ │ │ +7 │ │ │ │ │ +8#include │ │ │ │ │ +9 │ │ │ │ │ +10namespace _D_u_n_e │ │ │ │ │ +11{ │ │ │ │ │ +12 │ │ │ │ │ +13 // GridError │ │ │ │ │ +14 // --------- │ │ │ │ │ +15 │ │ │ │ │ +_1_8 class _G_r_i_d_E_r_r_o_r │ │ │ │ │ +19 : public Exception │ │ │ │ │ +20 {}; │ │ │ │ │ +21 │ │ │ │ │ +22} │ │ │ │ │ +23 │ │ │ │ │ +24#endif // #ifndef DUNE_GRID_COMMON_EXCEPTIONS_HH │ │ │ │ │ +_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 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00911_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00800_source.html │ │ │ │┄ Files 99% similar despite different names │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
function.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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
│ │ │ │
8
│ │ │ │ @@ -94,16 +94,16 @@ │ │ │ │
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
│ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │
20
│ │ │ │
26namespace Dune
│ │ │ │
27{
│ │ │ │
30
│ │ │ │
32 //
│ │ │ │
33 // Base VTKFunction
│ │ │ │
34 //
│ │ │ │ @@ -291,16 +291,16 @@ │ │ │ │
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.
│ │ │ │ +
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:134
│ │ │ │
Grid::ctype ctype
type used for coordinates in grid
Definition common/gridview.hh:131
│ │ │ │
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
│ │ │ │
Precision
which precision to use when writing out data to vtk files
Definition common.hh:271
│ │ │ │ │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00917_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00782_source.html │ │ │ │┄ Files 99% similar despite different names │ │ │ │ @@ -77,30 +77,30 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
vtuwriter.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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 {
│ │ │ │
19
│ │ │ │
22
│ │ │ │
23 namespace VTK {
│ │ │ │
24
│ │ │ │
26
│ │ │ │ @@ -329,16 +329,16 @@ │ │ │ │
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.
│ │ │ │ +
Common stuff for the VTKWriter.
│ │ │ │ +
Data array writers for the VTKWriter.
│ │ │ │
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
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -226,18 +226,18 @@ │ │ │ │ │ 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_a_t_a_a_r_r_a_y_w_r_i_t_e_r_._h_h │ │ │ │ │ +Data array writers for the VTKWriter. │ │ │ │ │ _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 │ │ │ │ --- ./usr/share/doc/libdune-grid-doc/doxygen/a00923_source.html │ │ │ ├── +++ ./usr/share/doc/libdune-grid-doc/doxygen/a00185_source.html │ │ │ │┄ Files 74% similar despite different names │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: streams.hh Source File │ │ │ │ +dune-grid: yaspgridhierarchiciterator.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,132 +70,185 @@ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
streams.hh
│ │ │ │ +
yaspgridhierarchiciterator.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © 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>
│ │ │ │ -
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 }
│ │ │ │ -
│ │ │ │ +
5#ifndef DUNE_GRID_YASPGRIDHIERARCHICITERATOR_HH
│ │ │ │ +
6#define DUNE_GRID_YASPGRIDHIERARCHICITERATOR_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;
│ │ │ │ +
30
│ │ │ │ +
32 YaspHierarchicIterator () : _entity(), _maxlevel(-1), stack() {}
│ │ │ │
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 }
│ │ │ │ -
│ │ │ │ -
55
│ │ │ │ -
57
│ │ │ │ -
│ │ │ │ -
64 void flush()
│ │ │ │ -
65 {
│ │ │ │ -
66 if (chunk.size > 0)
│ │ │ │ -
67 {
│ │ │ │ -
68 chunk.write(obuf);
│ │ │ │ -
69 s.write(obuf,4);
│ │ │ │ -
70 }
│ │ │ │ +
│ │ │ │ +
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
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
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 };
│ │ │ │ -
│ │ │ │ +
│ │ │ │ +
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} // namespace Dune
│ │ │ │ -
103
│ │ │ │ -
104#endif // DUNE_GRID_IO_FILE_VTK_STREAMS_HH
│ │ │ │ -
Simple base64 encode.
│ │ │ │ +
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
│ │ │ │
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
│ │ │ │ +
Wrapper class for entities.
Definition common/entity.hh:66
│ │ │ │ +
Implementation & impl()
access to the underlying implementation
Definition common/entity.hh:80
│ │ │ │ +
Definition yaspgridentity.hh:242
│ │ │ │ +
YGLI _g
Definition yaspgridentity.hh:400
│ │ │ │ +
I _it
Definition yaspgridentity.hh:399
│ │ │ │ +
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
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,144 +1,205 @@ │ │ │ │ │ dune-grid 2.10 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _g_r_i_d │ │ │ │ │ - * _i_o │ │ │ │ │ - * _f_i_l_e │ │ │ │ │ - * _v_t_k │ │ │ │ │ -streams.hh │ │ │ │ │ + * _y_a_s_p_g_r_i_d │ │ │ │ │ +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 © 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 │ │ │ │ │ -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> │ │ │ │ │ -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 } │ │ │ │ │ +5#ifndef DUNE_GRID_YASPGRIDHIERARCHICITERATOR_HH │ │ │ │ │ +6#define DUNE_GRID_YASPGRIDHIERARCHICITERATOR_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; │ │ │ │ │ +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 │ │ │ │ │ -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); │ │ │ │ │ +_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 } │ │ │ │ │ -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 } │ │ │ │ │ +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 │ │ │ │ │ -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 }; │ │ │ │ │ +_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} // namespace Dune │ │ │ │ │ -103 │ │ │ │ │ -104#endif // DUNE_GRID_IO_FILE_VTK_STREAMS_HH │ │ │ │ │ -_b_6_4_e_n_c_._h_h │ │ │ │ │ -Simple base64 encode. │ │ │ │ │ +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_:_:_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_:_:_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:242 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_:_:___g │ │ │ │ │ +YGLI _g │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:400 │ │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_:_:___i_t │ │ │ │ │ +I _it │ │ │ │ │ +DDeeffiinniittiioonn yaspgridentity.hh:399 │ │ │ │ │ +_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