--- /srv/rebuilderd/tmp/rebuilderdVlL8BC/inputs/libdune-grid-doc_2.10.0-1_all.deb +++ /srv/rebuilderd/tmp/rebuilderdVlL8BC/out/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 41836 2024-11-14 20:09:51.000000 control.tar.xz │ --rw-r--r-- 0 0 0 7847224 2024-11-14 20:09:51.000000 data.tar.xz │ +-rw-r--r-- 0 0 0 41872 2024-11-14 20:09:51.000000 control.tar.xz │ +-rw-r--r-- 0 0 0 7853304 2024-11-14 20:09:51.000000 data.tar.xz ├── control.tar.xz │ ├── control.tar │ │ ├── ./md5sums │ │ │ ├── ./md5sums │ │ │ │┄ Files differ │ │ │ ├── line order │ │ │ │ @@ -1,144 +1,144 @@ │ │ │ │ usr/share/doc/libdune-grid-doc/changelog.Debian.gz │ │ │ │ usr/share/doc/libdune-grid-doc/changelog.gz │ │ │ │ usr/share/doc/libdune-grid-doc/copyright │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00143.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00146.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00149.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00152.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00152_source.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/a00158.html │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00158_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00161.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00161_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00164.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00164_source.html │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00167.html │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00167_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00170.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00170_source.html │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00173.html │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00173_source.html │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00176.html │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00176_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00179.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00179_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00182.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00182_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00185.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00185_source.html │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00206.html │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00206_source.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00188.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00188_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/a00200.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00200_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/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/a00248.html │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00248_source.html │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00251.html │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00251_source.html │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00254.html │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00254_source.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00212.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00212_source.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00221.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00221_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/a00233.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00233_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/a00278.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00278_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/a00302.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00302_source.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00311.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00311_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/a00335.html │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00335_source.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00317.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00317_source.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/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/a00356.html │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00356_source.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00341.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00341_source.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00347.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00347_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00359.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00359_source.html │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00362.html │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00362_source.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00566.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00566_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/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/a00575.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00575_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/a00581.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00581_source.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00584.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00584_source.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00590.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00590_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00593.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00593_source.html │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00599.html │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00599_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00602.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00602_source.html │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00605.html │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00605_source.html │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00608.html │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00608_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00614.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00614_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00617.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00617_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00620.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00620_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00623.html │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00623_source.html │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00629.html │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00629_source.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00626.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00632.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00632_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00635.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00635_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00638.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00638_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00641.html │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00644.html │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00644_source.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00641_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00647.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00647_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00650.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00650_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00653.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00653_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00656.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00656_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00659.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00659_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00662.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00662_source.html │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00665.html │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00665_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00668.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00668_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00671.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00671_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00674.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00674_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00677.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00677_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00680.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00680_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00683.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00683_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00686.html │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00686_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00689.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00689_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00692.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00692_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/a00698.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00698_source.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00701.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00704.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00704_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00707.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00707_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00710.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00710_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00713.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/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 │ │ │ │ @@ -166,61 +166,50 @@ │ │ │ │ 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 │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00833_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00836.html │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00836_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00839.html │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00839_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00842.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00842_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00845.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00848.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00851.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00851_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00854.html │ │ │ │ @@ -234,65 +223,76 @@ │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00866.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00866_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00869.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00869_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00872.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00872_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00875.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00875_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00878.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00878_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00881.html │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00881_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00884.html │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00884_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00887.html │ │ │ │ -usr/share/doc/libdune-grid-doc/doxygen/a00887_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00890.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00890_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00893.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00893_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00896.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00896_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00899.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00899_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00902.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00902_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00905.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00905_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00908.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00908_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00911.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00911_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00914.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00914_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00917.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00917_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00920.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00920_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00923.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00923_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00926.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00926_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00929.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00929_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00932.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00932_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00935.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00935_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00938.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00938_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00941.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00941_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00944.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00944_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00947.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00947_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00950.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00950_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00953.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00953_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00956.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00956_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00959.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00959_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00962.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00962_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00965.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00965_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00968.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00968_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00971.html │ │ │ │ +usr/share/doc/libdune-grid-doc/doxygen/a00971_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00974.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00974_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00977.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00977_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00980.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00980_source.html │ │ │ │ usr/share/doc/libdune-grid-doc/doxygen/a00983.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) 13227 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00152.html │ │ │ --rw-r--r-- 0 root (0) root (0) 196698 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00152_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/a00155.html │ │ │ --rw-r--r-- 0 root (0) root (0) 30249 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) 5062 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00158.html │ │ │ --rw-r--r-- 0 root (0) root (0) 17472 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) 5384 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00161.html │ │ │ --rw-r--r-- 0 root (0) root (0) 20165 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00161_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) 5198 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00167.html │ │ │ --rw-r--r-- 0 root (0) root (0) 23216 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) 4798 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00170.html │ │ │ --rw-r--r-- 0 root (0) root (0) 16224 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) 5195 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00173.html │ │ │ --rw-r--r-- 0 root (0) root (0) 31837 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) 5119 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00179.html │ │ │ --rw-r--r-- 0 root (0) root (0) 17467 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00179_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/a00182.html │ │ │ --rw-r--r-- 0 root (0) root (0) 210196 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) 7012 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00185.html │ │ │ --rw-r--r-- 0 root (0) root (0) 103974 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) 6299 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00206.html │ │ │ --rw-r--r-- 0 root (0) root (0) 23401 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00206_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/a00209.html │ │ │ --rw-r--r-- 0 root (0) root (0) 32746 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/a00230.html │ │ │ --rw-r--r-- 0 root (0) root (0) 63476 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) 5885 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00242.html │ │ │ --rw-r--r-- 0 root (0) root (0) 61145 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) 5452 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00245.html │ │ │ --rw-r--r-- 0 root (0) root (0) 24835 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) 4571 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00248.html │ │ │ --rw-r--r-- 0 root (0) root (0) 56512 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) 19456 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00251.html │ │ │ --rw-r--r-- 0 root (0) root (0) 47029 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00251_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/a00254.html │ │ │ --rw-r--r-- 0 root (0) root (0) 54462 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00254_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/a00257.html │ │ │ --rw-r--r-- 0 root (0) root (0) 20331 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) 12859 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00314.html │ │ │ --rw-r--r-- 0 root (0) root (0) 36323 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) 4950 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00323.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7310 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) 8741 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00335.html │ │ │ --rw-r--r-- 0 root (0) root (0) 106215 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) 6588 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00338.html │ │ │ --rw-r--r-- 0 root (0) root (0) 24645 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) 5745 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00356.html │ │ │ --rw-r--r-- 0 root (0) root (0) 24811 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) 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) 6608 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00152.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 18591 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00152_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/a00161.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 103974 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00161_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/a00164.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 63476 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) 5062 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00170.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 17472 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) 6660 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00179.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 210196 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00179_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/a00182.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 23401 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) 4798 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00185.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16224 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) 6090 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00188.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 30249 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) 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) 5195 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00200.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 31837 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) 5198 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00209.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 23216 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) 5119 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00212.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 17467 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00212_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/a00221.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 68408 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00221_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/a00224.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 196698 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) 7353 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00233.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 32746 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) 6588 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00257.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 24645 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) 12859 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00278.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 36323 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00278_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/a00296.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 31787 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) 5452 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00302.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 24835 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00302_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/a00311.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 56512 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00311_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/a00314.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 24811 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) 8741 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00317.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 106215 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00317_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/a00326.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 61145 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) 10013 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00332.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 54462 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) 5372 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00338.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 20331 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) 19456 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00341.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 47029 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00341_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/a00347.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7310 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) 6339 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00359.html │ │ │ -rw-r--r-- 0 root (0) root (0) 65889 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00359_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) 8408 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00569.html │ │ │ --rw-r--r-- 0 root (0) root (0) 117631 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) 5297 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00575.html │ │ │ --rw-r--r-- 0 root (0) root (0) 22774 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) 4783 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00578.html │ │ │ --rw-r--r-- 0 root (0) root (0) 12569 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) 4783 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00566.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 12569 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) 6162 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00569.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 44586 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) 4123 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00572.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6410 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/a00575.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 70888 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) 5364 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00581.html │ │ │ -rw-r--r-- 0 root (0) root (0) 14555 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00581_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/a00593.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6410 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00593_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/a00599.html │ │ │ --rw-r--r-- 0 root (0) root (0) 45976 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) 4938 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00602.html │ │ │ --rw-r--r-- 0 root (0) root (0) 20258 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) 8578 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00605.html │ │ │ --rw-r--r-- 0 root (0) root (0) 70888 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) 6162 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00608.html │ │ │ --rw-r--r-- 0 root (0) root (0) 44586 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) 3889 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00614.html │ │ │ --rw-r--r-- 0 root (0) root (0) 128351 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/a00617.html │ │ │ --rw-r--r-- 0 root (0) root (0) 67784 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) 6304 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00584.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 45976 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) 8408 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00590.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 117631 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) 4938 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00593.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 20258 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00593_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/a00602.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 22774 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) 5259 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00614.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 84755 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) 5482 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00617.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 33202 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) 5952 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00620.html │ │ │ -rw-r--r-- 0 root (0) root (0) 107207 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) 4822 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00623.html │ │ │ --rw-r--r-- 0 root (0) root (0) 22389 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) 8065 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00629.html │ │ │ --rw-r--r-- 0 root (0) root (0) 75017 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) 27808 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00635.html │ │ │ --rw-r--r-- 0 root (0) root (0) 144961 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) 6133 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00638.html │ │ │ --rw-r--r-- 0 root (0) root (0) 105401 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00638_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/a00641.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5065 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00644.html │ │ │ --rw-r--r-- 0 root (0) root (0) 18609 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) 6061 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00647.html │ │ │ --rw-r--r-- 0 root (0) root (0) 86686 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) 5014 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00650.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5245 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00653.html │ │ │ --rw-r--r-- 0 root (0) root (0) 28783 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) 6019 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00656.html │ │ │ --rw-r--r-- 0 root (0) root (0) 55372 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) 5241 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00659.html │ │ │ --rw-r--r-- 0 root (0) root (0) 28807 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) 6327 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00662.html │ │ │ --rw-r--r-- 0 root (0) root (0) 109813 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) 5325 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00665.html │ │ │ --rw-r--r-- 0 root (0) root (0) 40677 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) 4296 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00668.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) 5489 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00674.html │ │ │ --rw-r--r-- 0 root (0) root (0) 47803 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) 5482 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00677.html │ │ │ --rw-r--r-- 0 root (0) root (0) 33202 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) 6540 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00680.html │ │ │ --rw-r--r-- 0 root (0) root (0) 60301 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) 5259 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00683.html │ │ │ --rw-r--r-- 0 root (0) root (0) 84755 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) 6561 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00686.html │ │ │ --rw-r--r-- 0 root (0) root (0) 206943 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) 4935 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00689.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8631 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00692.html │ │ │ --rw-r--r-- 0 root (0) root (0) 91920 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) 5592 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00695.html │ │ │ --rw-r--r-- 0 root (0) root (0) 65600 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) 5910 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00704.html │ │ │ --rw-r--r-- 0 root (0) root (0) 41406 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) 13661 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00707.html │ │ │ --rw-r--r-- 0 root (0) root (0) 30513 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00707_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5047 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00710.html │ │ │ --rw-r--r-- 0 root (0) root (0) 27135 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) 7361 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00716.html │ │ │ --rw-r--r-- 0 root (0) root (0) 123399 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) 9466 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00719.html │ │ │ --rw-r--r-- 0 root (0) root (0) 154753 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) 4483 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00623.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5014 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00626.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13661 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00632.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 30513 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) 6327 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00635.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 109813 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) 9466 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00638.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 154753 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00638_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/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) 5065 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00647.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 18609 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) 8631 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00650.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 91920 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) 5489 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00653.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 47803 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) 5241 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00656.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 28807 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) 5910 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00659.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 41406 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) 6133 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00668.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 105401 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) 6561 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00671.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 206943 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) 5325 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00674.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 40677 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) 4822 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00677.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 22389 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) 67784 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) 8065 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00683.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 75017 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) 4935 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00686.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5592 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00689.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 65600 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) 27808 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00692.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 144961 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) 5047 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00695.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 27135 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) 6540 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00698.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 60301 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) 4296 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00701.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7361 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00704.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 123399 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) 3889 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00707.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 128351 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00707_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/a00710.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 35857 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) 5245 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00713.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 28783 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) 6061 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00719.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 86686 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) 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) 5266 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00734.html │ │ │ --rw-r--r-- 0 root (0) root (0) 17733 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) 5261 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00737.html │ │ │ --rw-r--r-- 0 root (0) root (0) 17909 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) 6249 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00740.html │ │ │ --rw-r--r-- 0 root (0) root (0) 75964 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) 6397 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00743.html │ │ │ --rw-r--r-- 0 root (0) root (0) 30301 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) 6009 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00746.html │ │ │ --rw-r--r-- 0 root (0) root (0) 67469 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) 5365 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00749.html │ │ │ --rw-r--r-- 0 root (0) root (0) 17747 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/a00734.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 67469 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) 6397 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00737.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 30301 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) 5313 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00743.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 15635 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) 5365 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00746.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 17747 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) 5204 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00752.html │ │ │ -rw-r--r-- 0 root (0) root (0) 32991 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) 5313 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00755.html │ │ │ --rw-r--r-- 0 root (0) root (0) 15635 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) 6249 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00755.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 75964 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) 5776 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00758.html │ │ │ -rw-r--r-- 0 root (0) root (0) 97542 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) 5727 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00761.html │ │ │ --rw-r--r-- 0 root (0) root (0) 59108 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) 11343 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00764.html │ │ │ --rw-r--r-- 0 root (0) root (0) 295358 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) 5629 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00767.html │ │ │ --rw-r--r-- 0 root (0) root (0) 35212 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) 5461 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00770.html │ │ │ --rw-r--r-- 0 root (0) root (0) 19623 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) 5652 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00773.html │ │ │ --rw-r--r-- 0 root (0) root (0) 25022 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) 6045 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00776.html │ │ │ --rw-r--r-- 0 root (0) root (0) 49270 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) 5925 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00779.html │ │ │ --rw-r--r-- 0 root (0) root (0) 75092 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) 5575 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00782.html │ │ │ --rw-r--r-- 0 root (0) root (0) 20603 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) 7166 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00785.html │ │ │ --rw-r--r-- 0 root (0) root (0) 37020 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) 5609 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00788.html │ │ │ --rw-r--r-- 0 root (0) root (0) 34859 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) 5774 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00791.html │ │ │ --rw-r--r-- 0 root (0) root (0) 26813 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) 9038 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00794.html │ │ │ --rw-r--r-- 0 root (0) root (0) 93744 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) 7113 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00797.html │ │ │ --rw-r--r-- 0 root (0) root (0) 52835 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) 9680 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00800.html │ │ │ --rw-r--r-- 0 root (0) root (0) 93782 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) 5680 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00803.html │ │ │ --rw-r--r-- 0 root (0) root (0) 31397 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) 5404 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00806.html │ │ │ --rw-r--r-- 0 root (0) root (0) 16804 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) 18467 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00809.html │ │ │ --rw-r--r-- 0 root (0) root (0) 70982 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) 5594 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00812.html │ │ │ --rw-r--r-- 0 root (0) root (0) 20372 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) 6970 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00815.html │ │ │ --rw-r--r-- 0 root (0) root (0) 53202 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) 6100 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00818.html │ │ │ --rw-r--r-- 0 root (0) root (0) 90426 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) 4391 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00824.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7040 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) 5775 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00830.html │ │ │ --rw-r--r-- 0 root (0) root (0) 39429 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) 4772 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00833.html │ │ │ --rw-r--r-- 0 root (0) root (0) 21272 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00833_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/a00836.html │ │ │ --rw-r--r-- 0 root (0) root (0) 24439 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00836_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/a00839.html │ │ │ --rw-r--r-- 0 root (0) root (0) 44058 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00839_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/a00842.html │ │ │ --rw-r--r-- 0 root (0) root (0) 208931 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) 6381 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00845.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6652 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00848.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5875 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00851.html │ │ │ --rw-r--r-- 0 root (0) root (0) 50352 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) 5052 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00854.html │ │ │ --rw-r--r-- 0 root (0) root (0) 19581 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) 7173 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00857.html │ │ │ --rw-r--r-- 0 root (0) root (0) 181939 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) 4587 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00860.html │ │ │ --rw-r--r-- 0 root (0) root (0) 33394 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) 5427 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00863.html │ │ │ --rw-r--r-- 0 root (0) root (0) 35447 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00863_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/a00866.html │ │ │ --rw-r--r-- 0 root (0) root (0) 109305 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) 6206 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00869.html │ │ │ --rw-r--r-- 0 root (0) root (0) 83435 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) 6562 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00872.html │ │ │ --rw-r--r-- 0 root (0) root (0) 56957 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) 4792 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00875.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5726 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00878.html │ │ │ --rw-r--r-- 0 root (0) root (0) 49714 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) 5595 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00881.html │ │ │ --rw-r--r-- 0 root (0) root (0) 32468 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) 5608 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00884.html │ │ │ --rw-r--r-- 0 root (0) root (0) 46922 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) 7291 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00887.html │ │ │ --rw-r--r-- 0 root (0) root (0) 63572 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) 5074 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00890.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7072 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) 5418 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00893.html │ │ │ --rw-r--r-- 0 root (0) root (0) 14732 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) 4763 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00896.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5408 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00899.html │ │ │ --rw-r--r-- 0 root (0) root (0) 22811 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) 4796 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) 10389 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00911.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5391 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00914.html │ │ │ --rw-r--r-- 0 root (0) root (0) 18251 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) 5484 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00917.html │ │ │ --rw-r--r-- 0 root (0) root (0) 16905 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) 6877 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00920.html │ │ │ --rw-r--r-- 0 root (0) root (0) 30016 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) 6510 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00926.html │ │ │ --rw-r--r-- 0 root (0) root (0) 38495 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) 4769 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00929.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5670 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00932.html │ │ │ --rw-r--r-- 0 root (0) root (0) 29281 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) 4784 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00935.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5421 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00938.html │ │ │ --rw-r--r-- 0 root (0) root (0) 15609 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) 4766 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00941.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5366 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00944.html │ │ │ --rw-r--r-- 0 root (0) root (0) 12764 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) 4754 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00947.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5456 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00950.html │ │ │ --rw-r--r-- 0 root (0) root (0) 15221 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) 4757 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00953.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5678 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00956.html │ │ │ --rw-r--r-- 0 root (0) root (0) 20081 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) 4778 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00959.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6144 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00962.html │ │ │ --rw-r--r-- 0 root (0) root (0) 67657 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) 4778 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00965.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6378 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00968.html │ │ │ --rw-r--r-- 0 root (0) root (0) 27387 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) 4760 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00971.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4391 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00761.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7040 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) 4772 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00764.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 21272 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) 5608 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00767.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 46922 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) 4766 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00770.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5678 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00773.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 20081 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) 5421 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00776.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16723 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) 4757 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00779.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5418 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00782.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 14732 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) 6877 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00785.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 30016 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) 4778 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00788.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5670 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00791.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 29281 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) 6378 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00794.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 27387 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) 5421 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00797.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 15609 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) 4766 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00800.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6510 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00803.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 38495 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) 5391 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00806.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 18251 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) 5456 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00809.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 15221 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) 4796 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00812.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5484 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00815.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16905 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) 5408 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00818.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 22811 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) 4754 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00821.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4760 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00824.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4796 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00827.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6144 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00830.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 67657 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) 4784 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00833.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4778 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00836.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4769 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00839.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5366 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00842.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 12764 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) 10389 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00845.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4763 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00848.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5595 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00851.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 32468 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) 5726 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00854.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 49714 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) 6562 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00857.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 56957 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) 5875 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00860.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 50352 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) 4587 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00863.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 33394 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00863_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/a00866.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7072 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) 5052 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00869.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 19581 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) 7173 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00872.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 181939 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) 8072 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00875.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 109305 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) 4792 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00887.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5427 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00890.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 35447 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) 6206 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00893.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 83435 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) 6754 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00896.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 24439 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) 5560 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00899.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 44058 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) 5775 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00902.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 39429 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) 10478 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00905.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 208931 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) 5281 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00908.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 29536 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) 5594 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00911.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 20372 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) 18467 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00914.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 70982 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) 9680 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00917.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 93782 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) 5404 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00920.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16804 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) 5925 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00923.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 75092 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) 11343 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00926.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 295358 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) 7166 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00929.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 37020 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) 6045 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00932.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 49270 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) 5629 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00935.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 35212 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) 5727 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00938.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 59108 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) 9038 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00941.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 93744 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) 6100 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00944.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 90426 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) 5609 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00947.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 34859 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) 5652 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00950.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 25022 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) 6970 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00953.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 53202 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) 5575 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00956.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 20603 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) 6275 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00959.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 22623 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) 7113 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00962.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 52835 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) 5774 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00965.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 26813 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) 5461 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00968.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 19623 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) 5680 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00971.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 31397 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) 5796 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00983.html │ │ │ --rw-r--r-- 0 root (0) root (0) 15189 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) 6975 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00986.html │ │ │ --rw-r--r-- 0 root (0) root (0) 72067 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) 5912 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00983.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 35730 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/a00986.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 75427 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) 4929 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00989.html │ │ │ -rw-r--r-- 0 root (0) root (0) 35763 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) 5747 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00995.html │ │ │ --rw-r--r-- 0 root (0) root (0) 75427 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) 4859 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00998.html │ │ │ --rw-r--r-- 0 root (0) root (0) 28012 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) 4585 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01001.html │ │ │ --rw-r--r-- 0 root (0) root (0) 36098 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) 5393 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01004.html │ │ │ --rw-r--r-- 0 root (0) root (0) 13064 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) 6273 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01007.html │ │ │ --rw-r--r-- 0 root (0) root (0) 45890 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) 5912 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01010.html │ │ │ --rw-r--r-- 0 root (0) root (0) 35730 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) 3985 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01013.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7771 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) 6478 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01016.html │ │ │ --rw-r--r-- 0 root (0) root (0) 35420 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) 8465 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01019.html │ │ │ --rw-r--r-- 0 root (0) root (0) 90164 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) 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) 3985 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00992.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7771 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) 6478 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00995.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 35420 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/a00998.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 45890 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) 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) 4859 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01004.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 28012 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) 6056 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01007.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 31607 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) 6975 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01010.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 72067 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) 8465 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01013.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 90164 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) 4585 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01016.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 36098 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) 5796 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01019.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 15189 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) 5393 2024-11-14 20:09:51.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01022.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13064 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) 218366 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) 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) 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/a00152.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: ygrid.hh File Reference │ │ │ +dune-grid: yaspgridgeometry.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,81 +71,47 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces | │ │ │ -Functions
│ │ │ -
ygrid.hh File Reference
│ │ │ +Namespaces
│ │ │ +
yaspgridgeometry.hh File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

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

The YaspGeometry class and its specializations. │ │ │ 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::YaspGeometry< mydim, cdim, GridImp >
 The general version that handles all codimensions but 0 and dim. 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::YaspGeometry< mydim, mydim, GridImp >
 specialize for dim=dimworld, i.e. a volume element 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::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<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 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,82 +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 │ │ │ │ -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 │ │ │ │ +yaspgridgeometry.hh File Reference │ │ │ │ +The YaspGeometry class and its specializations. _M_o_r_e_._._. │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ - class   _D_u_n_e_:_:_Y_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_a_s_p_G_e_o_m_e_t_r_y_<_ _m_y_d_i_m_,_ _c_d_i_m_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ +  The general version that handles all codimensions but 0 and dim. │ │ │ │ + _M_o_r_e_._._. │ │ │ │   │ │ │ │ - class   _D_u_n_e_:_:_Y_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_a_s_p_G_e_o_m_e_t_r_y_<_ _m_y_d_i_m_,_ _m_y_d_i_m_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ +  specialize for dim=dimworld, i.e. a volume element _M_o_r_e_._._. │ │ │ │   │ │ │ │ - class   _D_u_n_e_:_:_Y_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_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::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 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/a00152_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: ygrid.hh Source File │ │ │ +dune-grid: yaspgridgeometry.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,1171 +74,97 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
ygrid.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_YGRID_HH
│ │ │ -
6#define DUNE_GRID_YASPGRID_YGRID_HH
│ │ │ +
5#ifndef DUNE_GRID_YASPGRIDGEOMETRY_HH
│ │ │ +
6#define DUNE_GRID_YASPGRIDGEOMETRY_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>
│ │ │ -
16
│ │ │ -
21namespace Dune {
│ │ │ -
22
│ │ │ -
23 namespace Yasp {
│ │ │ -
28 template<int d, typename ct>
│ │ │ -
│ │ │ -
29 std::array<int,d> sizeArray(const std::array<std::vector<ct>,d>& v)
│ │ │ -
30 {
│ │ │ -
31 std::array<int,d> tmp;
│ │ │ -
32 for (int i=0; i<d; ++i)
│ │ │ -
33 tmp[i] = v[i].size() - 1;
│ │ │ -
34 return tmp;
│ │ │ -
35 }
│ │ │ -
│ │ │ -
36 } //namespace Yasp
│ │ │ -
37
│ │ │ -
73 template<class Coordinates>
│ │ │ -
│ │ │ - │ │ │ -
75 {
│ │ │ -
76 public:
│ │ │ -
77 //extract coordinate type and dimension from the coordinate container
│ │ │ -
78 typedef typename Coordinates::ctype ct;
│ │ │ -
79 static const int d = Coordinates::dimension;
│ │ │ -
80
│ │ │ -
81 typedef std::array<int, d> iTupel;
│ │ │ -
82 typedef FieldVector<ct,d> fTupel;
│ │ │ -
83
│ │ │ -
│ │ │ -
85 YGridComponent () : _shift(0ULL)
│ │ │ -
86 {
│ │ │ -
87 std::fill(_origin.begin(), _origin.end(), 0);
│ │ │ -
88 std::fill(_offset.begin(), _offset.end(), 0);
│ │ │ -
89 std::fill(_size.begin(), _size.end(), 0);
│ │ │ -
90 }
│ │ │ -
│ │ │ -
91
│ │ │ -
│ │ │ - │ │ │ -
100 : _origin(origin), _size(size)
│ │ │ -
101 {}
│ │ │ -
│ │ │ -
102
│ │ │ -
│ │ │ - │ │ │ -
109 : _origin(origin), _shift(enclosing.shift()), _coords(enclosing.getCoords()), _size(size), _supersize(enclosing.supersize())
│ │ │ -
110 {
│ │ │ -
111 for (int i=0; i<d; i++)
│ │ │ -
112 _offset[i] = origin[i] - enclosing.origin(i) + enclosing.offset(i);
│ │ │ -
113
│ │ │ -
114 // compute superincrements
│ │ │ -
115 int inc = 1;
│ │ │ -
116 for (int i=0; i<d; ++i)
│ │ │ -
117 {
│ │ │ -
118 _superincrement[i] = inc;
│ │ │ -
119 inc *= _supersize[i];
│ │ │ -
120 }
│ │ │ -
121 }
│ │ │ -
│ │ │ -
122
│ │ │ -
│ │ │ -
131 YGridComponent (iTupel origin, std::bitset<d> shift, Coordinates* coords, iTupel size, iTupel offset, iTupel supersize)
│ │ │ -
132 : _origin(origin), _shift(shift), _coords(coords), _size(size), _offset(offset), _supersize(supersize)
│ │ │ -
133 {
│ │ │ -
134 // compute superincrements
│ │ │ -
135 int inc = 1;
│ │ │ -
136 for (int i=0; i<d; ++i)
│ │ │ -
137 {
│ │ │ -
138 _superincrement[i] = inc;
│ │ │ -
139 inc *= _supersize[i];
│ │ │ -
140 }
│ │ │ -
141 }
│ │ │ -
│ │ │ -
142
│ │ │ -
│ │ │ -
144 int origin (int i) const
│ │ │ -
145 {
│ │ │ -
146 return _origin[i];
│ │ │ -
147 }
│ │ │ -
│ │ │ -
148
│ │ │ -
│ │ │ -
150 const iTupel& origin () const
│ │ │ -
151 {
│ │ │ -
152 return _origin;
│ │ │ -
153 }
│ │ │ -
│ │ │ -
154
│ │ │ -
│ │ │ -
156 bool shift (int i) const
│ │ │ -
157 {
│ │ │ -
158 return _shift[i];
│ │ │ -
159 }
│ │ │ -
│ │ │ -
160
│ │ │ -
│ │ │ -
162 const std::bitset<d>& shift () const
│ │ │ -
163 {
│ │ │ -
164 return _shift;
│ │ │ -
165 }
│ │ │ -
│ │ │ -
166
│ │ │ -
│ │ │ -
167 Coordinates* getCoords() const
│ │ │ -
168 {
│ │ │ -
169 return _coords;
│ │ │ -
170 }
│ │ │ -
│ │ │ -
171
│ │ │ -
│ │ │ -
173 int offset (int i) const
│ │ │ -
174 {
│ │ │ -
175 return _offset[i];
│ │ │ -
176 }
│ │ │ -
│ │ │ -
177
│ │ │ -
│ │ │ -
179 const iTupel & offset () const
│ │ │ -
180 {
│ │ │ -
181 return _offset;
│ │ │ -
182 }
│ │ │ -
│ │ │ -
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 }
│ │ │ -
│ │ │ -
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
│ │ │ -
│ │ │ - │ │ │ -
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
│ │ │ +
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;
│ │ │ +
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
│ │ │ -
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
│ │ │ +
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,1253 +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 │ │ │ │ -ygrid.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_YGRID_HH │ │ │ │ -6#define DUNE_GRID_YASPGRID_YGRID_HH │ │ │ │ +5#ifndef DUNE_GRID_YASPGRIDGEOMETRY_HH │ │ │ │ +6#define DUNE_GRID_YASPGRIDGEOMETRY_HH │ │ │ │ 7 │ │ │ │ -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 │ │ │ │ -_1_0_8 _Y_G_r_i_d_C_o_m_p_o_n_e_n_t (_i_T_u_p_e_l _o_r_i_g_i_n, _i_T_u_p_e_l _s_i_z_e, const │ │ │ │ -_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_<_C_o_o_r_d_i_n_a_t_e_s_>& enclosing) │ │ │ │ -109 : _origin(_o_r_i_g_i_n), _shift(enclosing._s_h_i_f_t()), _coords(enclosing._g_e_t_C_o_o_r_d_s │ │ │ │ -()), _size(_s_i_z_e), _supersize(enclosing._s_u_p_e_r_s_i_z_e()) │ │ │ │ -110 { │ │ │ │ -111 for (int i=0; i<_d; i++) │ │ │ │ -112 _offset[i] = _o_r_i_g_i_n[i] - enclosing._o_r_i_g_i_n(i) + enclosing._o_f_f_s_e_t(i); │ │ │ │ -113 │ │ │ │ -114 // compute superincrements │ │ │ │ -115 int inc = 1; │ │ │ │ -116 for (int i=0; i<_d; ++i) │ │ │ │ -117 { │ │ │ │ -118 _superincrement[i] = inc; │ │ │ │ -119 inc *= _supersize[i]; │ │ │ │ -120 } │ │ │ │ -121 } │ │ │ │ -122 │ │ │ │ -_1_3_1 _Y_G_r_i_d_C_o_m_p_o_n_e_n_t (_i_T_u_p_e_l _o_r_i_g_i_n, std::bitset _s_h_i_f_t, Coordinates* coords, │ │ │ │ -_i_T_u_p_e_l _s_i_z_e, _i_T_u_p_e_l _o_f_f_s_e_t, _i_T_u_p_e_l _s_u_p_e_r_s_i_z_e) │ │ │ │ -132 : _origin(_o_r_i_g_i_n), _shift(_s_h_i_f_t), _coords(coords), _size(_s_i_z_e), _offset │ │ │ │ -(_o_f_f_s_e_t), _supersize(_s_u_p_e_r_s_i_z_e) │ │ │ │ -133 { │ │ │ │ -134 // compute superincrements │ │ │ │ -135 int inc = 1; │ │ │ │ -136 for (int i=0; i<_d; ++i) │ │ │ │ -137 { │ │ │ │ -138 _superincrement[i] = inc; │ │ │ │ -139 inc *= _supersize[i]; │ │ │ │ -140 } │ │ │ │ -141 } │ │ │ │ -142 │ │ │ │ -_1_4_4 int _o_r_i_g_i_n (int i) const │ │ │ │ -145 { │ │ │ │ -146 return _origin[i]; │ │ │ │ -147 } │ │ │ │ -148 │ │ │ │ -_1_5_0 const _i_T_u_p_e_l& _o_r_i_g_i_n () const │ │ │ │ -151 { │ │ │ │ -152 return _origin; │ │ │ │ -153 } │ │ │ │ -154 │ │ │ │ -_1_5_6 bool _s_h_i_f_t (int i) const │ │ │ │ -157 { │ │ │ │ -158 return _shift[i]; │ │ │ │ -159 } │ │ │ │ -160 │ │ │ │ -_1_6_2 const std::bitset& _s_h_i_f_t () const │ │ │ │ -163 { │ │ │ │ -164 return _shift; │ │ │ │ -165 } │ │ │ │ -166 │ │ │ │ -_1_6_7 Coordinates* _g_e_t_C_o_o_r_d_s() const │ │ │ │ -168 { │ │ │ │ -169 return _coords; │ │ │ │ -170 } │ │ │ │ -171 │ │ │ │ -_1_7_3 int _o_f_f_s_e_t (int i) const │ │ │ │ -174 { │ │ │ │ -175 return _offset[i]; │ │ │ │ -176 } │ │ │ │ -177 │ │ │ │ -_1_7_9 const _i_T_u_p_e_l & _o_f_f_s_e_t () const │ │ │ │ -180 { │ │ │ │ -181 return _offset; │ │ │ │ -182 } │ │ │ │ -183 │ │ │ │ -_1_8_5 int _s_u_p_e_r_s_i_z_e (int i) const │ │ │ │ -186 { │ │ │ │ -187 return _supersize[i]; │ │ │ │ -188 } │ │ │ │ -189 │ │ │ │ -_1_9_1 const _i_T_u_p_e_l & _s_u_p_e_r_s_i_z_e () const │ │ │ │ -192 { │ │ │ │ -193 return _supersize; │ │ │ │ -194 } │ │ │ │ -195 │ │ │ │ -_1_9_7 int _s_i_z_e (int i) const │ │ │ │ -198 { │ │ │ │ -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 │ │ │ │ -_2_0_9 int _t_o_t_a_l_s_i_z_e () const │ │ │ │ -210 { │ │ │ │ -211 int s=1; │ │ │ │ -212 for (int i=0; i<_d; ++i) │ │ │ │ -213 s *= _s_i_z_e(i); │ │ │ │ -214 return s; │ │ │ │ -215 } │ │ │ │ -216 │ │ │ │ -_2_1_8 int _m_i_n (int i) const │ │ │ │ -219 { │ │ │ │ -220 return _origin[i]; │ │ │ │ -221 } │ │ │ │ -222 │ │ │ │ -_2_2_4 int _m_a_x (int i) const │ │ │ │ -225 { │ │ │ │ -226 return _origin[i] + _s_i_z_e(i) - 1; │ │ │ │ -227 } │ │ │ │ -228 │ │ │ │ -_2_3_0 bool _e_m_p_t_y () const │ │ │ │ -231 { │ │ │ │ -232 for (int i=0; i<_d; ++i) │ │ │ │ -233 { │ │ │ │ -234 if (_s_i_z_e(i) == 0) │ │ │ │ -235 return true; │ │ │ │ -236 } │ │ │ │ -237 return false; │ │ │ │ -238 } │ │ │ │ -239 │ │ │ │ -_2_4_1 bool _i_n_s_i_d_e (const _i_T_u_p_e_l& coord) const │ │ │ │ -242 { │ │ │ │ -243 for (int i=0; i<_d; i++) │ │ │ │ -244 { │ │ │ │ -245 if ((coord[i]<_origin[i]) || (coord[i]>=_origin[i]+_size[i])) │ │ │ │ -246 return false; │ │ │ │ -247 } │ │ │ │ -248 return true; │ │ │ │ -249 } │ │ │ │ -250 │ │ │ │ -_2_5_2 int _i_n_d_e_x (const _i_T_u_p_e_l& coord) const │ │ │ │ -253 { │ │ │ │ -254 int _i_n_d_e_x = (coord[_d-1]-_origin[_d-1]); │ │ │ │ -255 │ │ │ │ -256 for (int i=_d-2; i>=0; i--) │ │ │ │ -257 _i_n_d_e_x = _i_n_d_e_x*_size[i] + (coord[i]-_origin[i]); │ │ │ │ -258 │ │ │ │ -259 return _i_n_d_e_x; │ │ │ │ -260 } │ │ │ │ -261 │ │ │ │ -_2_6_3 _Y_G_r_i_d_C_o_m_p_o_n_e_n_t_<_C_o_o_r_d_i_n_a_t_e_s_> _m_o_v_e (_i_T_u_p_e_l v) const │ │ │ │ -264 { │ │ │ │ -265 for (int i=0; i<_d; i++) │ │ │ │ -266 v[i] += _origin[i]; │ │ │ │ -267 return _Y_G_r_i_d_C_o_m_p_o_n_e_n_t_<_C_o_o_r_d_i_n_a_t_e_s_>(v,_size,*this); │ │ │ │ -268 } │ │ │ │ -269 │ │ │ │ -_2_7_1 _Y_G_r_i_d_C_o_m_p_o_n_e_n_t_<_C_o_o_r_d_i_n_a_t_e_s_> _i_n_t_e_r_s_e_c_t_i_o_n (const │ │ │ │ -_Y_G_r_i_d_C_o_m_p_o_n_e_n_t_<_C_o_o_r_d_i_n_a_t_e_s_>& r) const │ │ │ │ -272 { │ │ │ │ -273 for (int i=0; i<_d; i++) │ │ │ │ -274 { │ │ │ │ -275 //empty coordinate vectors result in empty intersections │ │ │ │ -276 if (_e_m_p_t_y() || r._e_m_p_t_y()) │ │ │ │ -277 return _Y_G_r_i_d_C_o_m_p_o_n_e_n_t_<_C_o_o_r_d_i_n_a_t_e_s_>(); │ │ │ │ -278 } │ │ │ │ -279 │ │ │ │ -280 _i_T_u_p_e_l neworigin; │ │ │ │ -281 _i_T_u_p_e_l newsize; │ │ │ │ -282 for (int i=0; i<_d; ++i) │ │ │ │ -283 { │ │ │ │ -284 neworigin[i] = std::max(_o_r_i_g_i_n(i),r._o_r_i_g_i_n(i)); │ │ │ │ -285 newsize[i] = std::min(_m_a_x(i),r._m_a_x(i)) - neworigin[i] + 1; │ │ │ │ -286 } │ │ │ │ -287 │ │ │ │ -288 return _Y_G_r_i_d_C_o_m_p_o_n_e_n_t_<_C_o_o_r_d_i_n_a_t_e_s_>(neworigin,newsize,*this); │ │ │ │ -289 } │ │ │ │ -290 │ │ │ │ -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 │ │ │ │ +23namespace _D_u_n_e { │ │ │ │ +24 │ │ │ │ +29 template │ │ │ │ +_3_0 class _Y_a_s_p_G_e_o_m_e_t_r_y : public AxisAlignedCubeGeometry │ │ │ │ +31 { │ │ │ │ +32 public: │ │ │ │ +_3_4 typedef typename GridImp::ctype _c_t_y_p_e; │ │ │ │ +35 │ │ │ │ +_3_7 _Y_a_s_p_G_e_o_m_e_t_r_y (const FieldVector& ll, const FieldVector& ur, const std::bitset& shift) │ │ │ │ +38 : AxisAlignedCubeGeometry<_c_t_y_p_e,mydim,cdim>(ll,ur,shift) │ │ │ │ +39 { │ │ │ │ +40 assert(mydim == shift.count()); │ │ │ │ +41 } │ │ │ │ +42 }; │ │ │ │ +43 │ │ │ │ +45 template │ │ │ │ +_4_6 class _Y_a_s_p_G_e_o_m_e_t_r_y : public │ │ │ │ +AxisAlignedCubeGeometry │ │ │ │ +47 { │ │ │ │ +48 public: │ │ │ │ +_4_9 typedef typename GridImp::ctype _c_t_y_p_e; │ │ │ │ +50 │ │ │ │ +_5_2 _Y_a_s_p_G_e_o_m_e_t_r_y (const FieldVector& ll, const FieldVector& ur) │ │ │ │ +53 : AxisAlignedCubeGeometry<_c_t_y_p_e,mydim,mydim>(ll,ur) │ │ │ │ +54 {} │ │ │ │ +55 │ │ │ │ +_5_7 _Y_a_s_p_G_e_o_m_e_t_r_y (const _Y_a_s_p_G_e_o_m_e_t_r_y& other) │ │ │ │ +58 : AxisAlignedCubeGeometry<_c_t_y_p_e,mydim,mydim>(other) │ │ │ │ +59 {} │ │ │ │ +60 }; │ │ │ │ +61 │ │ │ │ +63 template │ │ │ │ +_6_4 class _Y_a_s_p_G_e_o_m_e_t_r_y<0,cdim,GridImp> : public AxisAlignedCubeGeometry │ │ │ │ +65 { │ │ │ │ +66 public: │ │ │ │ +_6_7 typedef typename GridImp::ctype _c_t_y_p_e; │ │ │ │ +68 │ │ │ │ +_7_0 explicit _Y_a_s_p_G_e_o_m_e_t_r_y ( const FieldVector< ctype, cdim > &p ) │ │ │ │ +71 : AxisAlignedCubeGeometry( p ) │ │ │ │ +72 {} │ │ │ │ +73 │ │ │ │ +_7_4 _Y_a_s_p_G_e_o_m_e_t_r_y ( const FieldVector< ctype, cdim > &p, const FieldVector< │ │ │ │ +ctype, cdim > &, const std::bitset &) │ │ │ │ +75 : AxisAlignedCubeGeometry( p ) │ │ │ │ +76 {} │ │ │ │ +77 }; │ │ │ │ +78} // namespace Dune │ │ │ │ +79 │ │ │ │ +80#endif // DUNE_GRID_YASPGRIDGEOMETRY_HH │ │ │ │ _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 │ │ │ │ -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 │ │ │ │ +_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/a00161.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: yaspgridintersectioniterator.hh File Reference │ │ │ +dune-grid: torus.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,39 +71,58 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces
│ │ │ -
yaspgridintersectioniterator.hh File Reference
│ │ │ +Namespaces | │ │ │ +Functions
│ │ │ +
torus.hh File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

The YaspIntersectionIterator class. │ │ │ +

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.

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

│ │ │ Classes

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

│ │ │ -

The YaspIntersectionIterator class.

│ │ │ -

YaspIntersectionIterator enables iteration over intersections with neighboring codim 0 entities.

│ │ │ +

This file provides the infrastructure for toroidal communication in YaspGrid.

│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,26 +1,42 @@ │ │ │ │ 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 │ │ │ │ -yaspgridintersectioniterator.hh File Reference │ │ │ │ -The YaspIntersectionIterator class. _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 │ │ │ │ +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" │ │ │ │ _G_o_ _t_o_ _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_:_:_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 │ │ │ │   │ │ │ │ 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 ********** │ │ │ │ -The YaspIntersectionIterator class. │ │ │ │ -YaspIntersectionIterator enables iteration over intersections with neighboring │ │ │ │ -codim 0 entities. │ │ │ │ +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/a00161_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: yaspgridintersectioniterator.hh Source File │ │ │ +dune-grid: torus.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,107 +74,619 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
yaspgridintersectioniterator.hh
│ │ │ +
torus.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_YASPGRIDINTERSECTIONITERATOR_HH
│ │ │ -
6#define DUNE_GRID_YASPGRIDINTERSECTIONITERATOR_HH
│ │ │ +
5#ifndef DUNE_GRID_YASPGRID_TORUS_HH
│ │ │ +
6#define DUNE_GRID_YASPGRID_TORUS_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 }
│ │ │ -
│ │ │ -
47
│ │ │ -
│ │ │ - │ │ │ -
49 {}
│ │ │ -
│ │ │ +
8#include <array>
│ │ │ +
9#include <bitset>
│ │ │ +
10#include <cmath>
│ │ │ +
11#include <deque>
│ │ │ +
12#include <iostream>
│ │ │ +
13#include <vector>
│ │ │ +
14
│ │ │ +
15#if HAVE_MPI
│ │ │ +
16#include <mpi.h>
│ │ │ +
17#endif
│ │ │ +
18
│ │ │ +
19#include <dune/common/binaryfunctions.hh>
│ │ │ +
20#include <dune/common/streamoperators.hh>
│ │ │ + │ │ │ +
22
│ │ │ +
23#include "partitioning.hh"
│ │ │ +
24
│ │ │ +
29namespace Dune
│ │ │ +
30{
│ │ │ +
31
│ │ │ +
45 template<class Communication, int d>
│ │ │ +
│ │ │ +
46 class Torus {
│ │ │ +
47 public:
│ │ │ +
49 typedef std::array<int, d> iTupel;
│ │ │
50
│ │ │ -
│ │ │ - │ │ │ -
53 : intersection_(IntersectionImp(myself, toend))
│ │ │ -
54 {}
│ │ │ -
│ │ │ -
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
│ │ │ +
51
│ │ │ +
52 private:
│ │ │ +
53 struct CommPartner {
│ │ │ +
54 int rank;
│ │ │ +
55 iTupel delta;
│ │ │ +
56 int index;
│ │ │ +
57 };
│ │ │ +
58
│ │ │ +
59 struct CommTask {
│ │ │ +
60 int rank; // process to send to / receive from
│ │ │ +
61 int size; // size of buffer
│ │ │ +
62 void *buffer; // buffer to send / receive
│ │ │ +
63 };
│ │ │ +
64
│ │ │ +
65 public:
│ │ │ +
│ │ │ + │ │ │ +
68 {}
│ │ │ +
│ │ │ +
69
│ │ │ +
│ │ │ +
71 Torus (Communication comm, int tag, iTupel size, int overlap, const Yasp::Partitioning<d>* partitioner)
│ │ │ +
72 : _comm(comm), _tag(tag)
│ │ │ +
73 {
│ │ │ +
74 // determine dimensions
│ │ │ +
75 partitioner->partition(size, _comm.size(), _dims, overlap);
│ │ │ +
76
│ │ │ +
77 // compute increments for lexicographic ordering
│ │ │ +
78 int inc = 1;
│ │ │ +
79 for (int i=0; i<d; i++)
│ │ │ +
80 {
│ │ │ +
81 _increment[i] = inc;
│ │ │ +
82 inc *= _dims[i];
│ │ │ +
83 }
│ │ │ +
84
│ │ │ +
85 // check whether the load balancing matches the size of the communicator
│ │ │ +
86 if (inc != _comm.size())
│ │ │ +
87 DUNE_THROW(Dune::Exception, "Communicator size and result of the given load balancer do not match!");
│ │ │ +
88
│ │ │ +
89 // make full schedule
│ │ │ +
90 proclists();
│ │ │ +
91 }
│ │ │ +
│ │ │ +
92
│ │ │ +
│ │ │ +
94 int rank () const
│ │ │ +
95 {
│ │ │ +
96 return _comm.rank();
│ │ │ +
97 }
│ │ │ +
│ │ │ +
98
│ │ │ +
│ │ │ +
100 iTupel coord () const
│ │ │ +
101 {
│ │ │ +
102 return rank_to_coord(_comm.rank());
│ │ │ +
103 }
│ │ │ +
│ │ │ +
104
│ │ │ +
│ │ │ +
106 int procs () const
│ │ │ +
107 {
│ │ │ +
108 return _comm.size();
│ │ │ +
109 }
│ │ │ +
│ │ │ +
110
│ │ │ +
│ │ │ +
112 const iTupel & dims () const
│ │ │ +
113 {
│ │ │ +
114 return _dims;
│ │ │ +
115 }
│ │ │ +
│ │ │ +
116
│ │ │ +
│ │ │ +
118 int dims (int i) const
│ │ │ +
119 {
│ │ │ +
120 return _dims[i];
│ │ │ +
121 }
│ │ │ +
│ │ │ +
122
│ │ │ +
│ │ │ +
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
│ │ │
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
│ │ │ +
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,128 +1,680 @@ │ │ │ │ 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 │ │ │ │ +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_GRID_YASPGRIDINTERSECTIONITERATOR_HH │ │ │ │ -6#define DUNE_GRID_YASPGRIDINTERSECTIONITERATOR_HH │ │ │ │ +5#ifndef DUNE_GRID_YASPGRID_TORUS_HH │ │ │ │ +6#define DUNE_GRID_YASPGRID_TORUS_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 } │ │ │ │ -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 {} │ │ │ │ +8#include │ │ │ │ +9#include │ │ │ │ +10#include │ │ │ │ +11#include │ │ │ │ +12#include │ │ │ │ +13#include │ │ │ │ +14 │ │ │ │ +15#if HAVE_MPI │ │ │ │ +16#include │ │ │ │ +17#endif │ │ │ │ +18 │ │ │ │ +19#include │ │ │ │ +20#include │ │ │ │ +21#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_e_x_c_e_p_t_i_o_n_s_._h_h> │ │ │ │ +22 │ │ │ │ +23#include "_p_a_r_t_i_t_i_o_n_i_n_g_._h_h" │ │ │ │ +24 │ │ │ │ +29namespace _D_u_n_e │ │ │ │ +30{ │ │ │ │ +31 │ │ │ │ +45 template │ │ │ │ +_4_6 class _T_o_r_u_s { │ │ │ │ +47 public: │ │ │ │ +_4_9 typedef std::array _i_T_u_p_e_l; │ │ │ │ 50 │ │ │ │ -_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_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 │ │ │ │ +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=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 │ │ │ │ _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_:_:_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/a00164.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: yaspgridintersection.hh File Reference │ │ │ +dune-grid: coordinates.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,39 +71,63 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces
│ │ │ -
yaspgridintersection.hh File Reference
│ │ │ +Namespaces | │ │ │ +Functions
│ │ │ +
coordinates.hh File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

The YaspIntersection class. │ │ │ +

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

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

Go to the source code of this file.

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

│ │ │ Classes

class  Dune::YaspIntersection< GridImp >
 YaspIntersection provides data about intersection with neighboring codim 0 entities. More...
class  Dune::EquidistantCoordinates< ct, dim >
 Container for equidistant coordinates in a YaspGrid. More...
 
class  Dune::EquidistantOffsetCoordinates< ct, dim >
 Container for equidistant coordinates in a YaspGrid with non-trivial origin. 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

│ │ │ -

The YaspIntersection class.

│ │ │ -

YaspIntersection provides data about intersection with neighboring codim 0 entities.

│ │ │ +

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,26 +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 │ │ │ │ -yaspgridintersection.hh File Reference │ │ │ │ -The YaspIntersection class. _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 │ │ │ │ _G_o_ _t_o_ _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_:_:_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_:_:_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_:_:_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 ********** │ │ │ │ -The YaspIntersection class. │ │ │ │ -YaspIntersection provides data about intersection with neighboring codim 0 │ │ │ │ -entities. │ │ │ │ +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/a00164_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: yaspgridintersection.hh Source File │ │ │ +dune-grid: coordinates.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,401 +74,384 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
yaspgridintersection.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// -*- 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_GRID_YASPGRID_COORDINATES_HH
│ │ │ +
6#define DUNE_GRID_YASPGRID_COORDINATES_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;
│ │ │ -
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 bool conforming () const
│ │ │ -
86 {
│ │ │ -
87 return true;
│ │ │ -
88 }
│ │ │ +
8#include <array>
│ │ │ +
9#include <bitset>
│ │ │ +
10#include <vector>
│ │ │ +
11
│ │ │ +
12#include <dune/common/fvector.hh>
│ │ │ +
13
│ │ │ +
21namespace Dune
│ │ │ +
22{
│ │ │ +
27 template<class ct, int dim>
│ │ │ +
│ │ │ + │ │ │ +
29 {
│ │ │ +
30 public:
│ │ │ +
32 typedef ct ctype;
│ │ │ +
34 static const int dimension = dim;
│ │ │ +
35
│ │ │ + │ │ │ +
38
│ │ │ +
│ │ │ +
45 EquidistantCoordinates(const Dune::FieldVector<ct,dim>& upperRight, const std::array<int,dim>& s)
│ │ │ +
46 : _s(s)
│ │ │ +
47 {
│ │ │ +
48 for (int i=0; i<dim; i++)
│ │ │ +
49 _h[i] = upperRight[i] / _s[i];
│ │ │ +
50 }
│ │ │
│ │ │ +
51
│ │ │ +
│ │ │ +
56 inline ct meshsize(int d, [[maybe_unused]] int i) const
│ │ │ +
57 {
│ │ │ +
58 return _h[d];
│ │ │ +
59 }
│ │ │ +
│ │ │ +
60
│ │ │ +
│ │ │ +
65 inline ct coordinate(int d, int i) const
│ │ │ +
66 {
│ │ │ +
67 return i*_h[d];
│ │ │ +
68 }
│ │ │ +
│ │ │ +
69
│ │ │ +
│ │ │ +
73 inline int size(int d) const
│ │ │ +
74 {
│ │ │ +
75 return _s[d];
│ │ │ +
76 }
│ │ │ +
│ │ │ +
77
│ │ │ +
│ │ │ +
84 EquidistantCoordinates<ct,dim> refine(std::bitset<dim> ovlp_low, std::bitset<dim> ovlp_up, int overlap, bool keep_ovlp) const
│ │ │ +
85 {
│ │ │ +
86 //determine new size and meshsize
│ │ │ +
87 std::array<int,dim> news;
│ │ │ +
88 Dune::FieldVector<ct,dim> newUpperRight;
│ │ │
89
│ │ │ -
│ │ │ -
92 Entity inside() const
│ │ │ -
93 {
│ │ │ -
94 return Entity(_inside);
│ │ │ -
95 }
│ │ │ -
│ │ │ -
96
│ │ │ -
│ │ │ - │ │ │ -
99 {
│ │ │ -
100 return Entity(_outside);
│ │ │ -
101 }
│ │ │ -
│ │ │ -
102
│ │ │ -
│ │ │ - │ │ │ -
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 }
│ │ │ +
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 }
│ │ │
│ │ │ -
175
│ │ │ +
173
│ │ │
│ │ │ -
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
│ │ │ -
│ │ │ -
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;
│ │ │ +
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 // 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;
│ │ │ -
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;
│ │ │ +
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
│ │ │ -
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);
│ │ │ +
243 template<class ct, int dim>
│ │ │ +
│ │ │ + │ │ │ +
245 {
│ │ │ +
246 public:
│ │ │ +
248 typedef ct ctype;
│ │ │ +
250 static const int dimension = dim;
│ │ │
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 }
│ │ │ + │ │ │ +
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 }
│ │ │
│ │ │ -
276
│ │ │ +
273
│ │ │
│ │ │ -
278 int indexInInside () const
│ │ │ +
278 inline ct coordinate(int d, int i) const
│ │ │
279 {
│ │ │ -
280 return _count;
│ │ │ +
280 return _c[d][i-_offset[d]];
│ │ │
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 {}
│ │ │ +
│ │ │ +
286 inline int size(int d) const
│ │ │ +
287 {
│ │ │ +
288 return _c[d].size() - 1;
│ │ │ +
289 }
│ │ │
│ │ │ -
295
│ │ │ +
290
│ │ │
│ │ │ -
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 }
│ │ │ -
│ │ │ +
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
│ │ │ -
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.
│ │ │ +
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
│ │ │ -
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
│ │ │ +
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,453 +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 │ │ │ │ -yaspgridintersection.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// -*- 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_GRID_YASPGRID_COORDINATES_HH │ │ │ │ +6#define DUNE_GRID_YASPGRID_COORDINATES_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; │ │ │ │ -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; │ │ │ │ +8#include │ │ │ │ +9#include │ │ │ │ +10#include │ │ │ │ +11 │ │ │ │ +12#include │ │ │ │ +13 │ │ │ │ +21namespace _D_u_n_e │ │ │ │ +22{ │ │ │ │ +27 template │ │ │ │ +_2_8 class _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ +29 { │ │ │ │ +30 public: │ │ │ │ +_3_2 typedef ct _c_t_y_p_e; │ │ │ │ +_3_4 static const int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ +35 │ │ │ │ +_3_7 _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s() {} │ │ │ │ +38 │ │ │ │ +_4_5 _E_q_u_i_d_i_s_t_a_n_t_C_o_o_r_d_i_n_a_t_e_s(const Dune::FieldVector& upperRight, const │ │ │ │ +std::array& s) │ │ │ │ +46 : _s(s) │ │ │ │ +47 { │ │ │ │ +48 for (int i=0; img->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 } │ │ │ │ +_5_6 inline ct _m_e_s_h_s_i_z_e(int d, [[maybe_unused]] int i) const │ │ │ │ +57 { │ │ │ │ +58 return _h[d]; │ │ │ │ +59 } │ │ │ │ +60 │ │ │ │ +_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 │ │ │ │ -_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 │ │ │ │ -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 │ │ │ │ -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 │ │ │ │ +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 normal(0); │ │ │ │ -180 normal[_dir] = (_face==0) ? -1.0 : 1.0; │ │ │ │ -181 return normal; │ │ │ │ -182 } │ │ │ │ -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; │ │ │ │ +179 return _s[d]; │ │ │ │ +180 } │ │ │ │ +181 │ │ │ │ +_1_8_5 inline ct _o_r_i_g_i_n(int d) const │ │ │ │ +186 { │ │ │ │ +187 return _origin[d]; │ │ │ │ +188 } │ │ │ │ +189 │ │ │ │ +_1_9_6 _E_q_u_i_d_i_s_t_a_n_t_O_f_f_s_e_t_C_o_o_r_d_i_n_a_t_e_s_<_c_t_,_d_i_m_> _r_e_f_i_n_e(std::bitset ovlp_low, │ │ │ │ +std::bitset ovlp_up, int overlap, bool keep_ovlp) const │ │ │ │ +197 { │ │ │ │ +198 //determine new size and meshsize │ │ │ │ +199 std::array news; │ │ │ │ +200 Dune::FieldVector newUpperRight; │ │ │ │ 201 │ │ │ │ -202 // 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; │ │ │ │ -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; │ │ │ │ +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 │ │ │ │ -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); │ │ │ │ +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 │ │ │ │ -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 │ │ │ │ +_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 _count; │ │ │ │ +280 return _c[d][i-_offset[d]]; │ │ │ │ 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) │ │ │ │ +_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 *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. │ │ │ │ +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 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_:_:_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/a00170.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: yaspgrididset.hh File Reference │ │ │ +dune-grid: yaspgridleveliterator.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,32 +72,37 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
yaspgrididset.hh File Reference
│ │ │ +
yaspgridleveliterator.hh File Reference
│ │ │
│ │ │
│ │ │ │ │ │ +

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

│ │ │ + │ │ │

Go to the source code of this file.

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

│ │ │ Classes

class  Dune::YaspGlobalIdSet< GridImp >
 persistent, globally unique Ids More...
class  Dune::YaspLevelIterator< codim, pitype, GridImp >
 Iterates over entities of one grid level. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

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

Detailed Description

│ │ │ +

The YaspLevelIterator class.

│ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -2,19 +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 │ │ │ │ -yaspgrididset.hh File Reference │ │ │ │ +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_G_l_o_b_a_l_I_d_S_e_t_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ -  persistent, globally unique Ids _M_o_r_e_._._. │ │ │ │ +class   _D_u_n_e_:_:_Y_a_s_p_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 ********** │ │ │ │ +The YaspLevelIterator class. │ │ │ │ =============================================================================== │ │ │ │ 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: yaspgrididset.hh Source File │ │ │ +dune-grid: yaspgridleveliterator.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,88 +74,91 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
yaspgrididset.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_YASPGRIDIDSET_HH
│ │ │ -
6#define DUNE_GRID_YASPGRIDIDSET_HH
│ │ │ +
5#ifndef DUNE_GRID_YASPGRIDLEVELITERATOR_HH
│ │ │ +
6#define DUNE_GRID_YASPGRIDLEVELITERATOR_HH
│ │ │
7
│ │ │ -
8
│ │ │ -
9namespace Dune {
│ │ │ -
10
│ │ │ -
11 //========================================================================
│ │ │ -
16 //========================================================================
│ │ │ -
17
│ │ │ -
18 template<class GridImp>
│ │ │ -
│ │ │ -
19 class YaspGlobalIdSet : public IdSet<GridImp,YaspGlobalIdSet<GridImp>,
│ │ │ -
20 typename std::remove_const<GridImp>::type::PersistentIndexType >
│ │ │ -
21 /*
│ │ │ -
22 We used the remove_const to extract the Type from the mutable class,
│ │ │ -
23 because the const class is not instantiated yet.
│ │ │ -
24 */
│ │ │ -
25 {
│ │ │ - │ │ │ -
27
│ │ │ -
28 public:
│ │ │ -
30 typedef typename std::remove_const<GridImp>::type::PersistentIndexType IdType;
│ │ │ -
31
│ │ │ -
32 using IdSet<GridImp, This, IdType>::subId;
│ │ │ +
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
│ │ │
│ │ │ - │ │ │ -
36 {}
│ │ │ -
│ │ │ -
37
│ │ │ -
39 /*
│ │ │ -
40 We use the remove_const to extract the Type from the mutable class,
│ │ │ -
41 because the const class is not instantiated yet.
│ │ │ -
42 */
│ │ │ -
43 template<int cd>
│ │ │ -
│ │ │ -
44 IdType id (const typename std::remove_const<GridImp>::type::Traits::template Codim<cd>::Entity& e) const
│ │ │ -
45 {
│ │ │ -
46 return e.impl().persistentIndex();
│ │ │ -
47 }
│ │ │ -
│ │ │ -
48
│ │ │ -
50 /*
│ │ │ -
51 We use the remove_const to extract the Type from the mutable class,
│ │ │ -
52 because the const class is not instantiated yet.
│ │ │ -
53 */
│ │ │ -
│ │ │ -
54 IdType subId (const typename std::remove_const<GridImp>::type::Traits::template Codim< 0 >::Entity &e,
│ │ │ -
55 int i, unsigned int codim ) const
│ │ │ -
56 {
│ │ │ -
57 return e.impl().subPersistentIndex(i,codim);
│ │ │ -
58 }
│ │ │ -
│ │ │ -
59
│ │ │ -
60 };
│ │ │ -
│ │ │ -
61
│ │ │ -
62} // namespace Dune
│ │ │ -
63
│ │ │ -
64#endif // DUNE_GRID_YASPGRIDIDSET_HH
│ │ │ +
35 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
│ │ │ -
Id Set Interface.
Definition common/indexidset.hh:447
│ │ │ -
persistent, globally unique Ids
Definition yaspgrididset.hh:25
│ │ │ -
IdType subId(const typename std::remove_const< GridImp >::type::Traits::template Codim< 0 >::Entity &e, int i, unsigned int codim) const
get id of subentity
Definition yaspgrididset.hh:54
│ │ │ -
std::remove_const< GridImp >::type::PersistentIndexType IdType
define the type used for persistent indices
Definition yaspgrididset.hh:30
│ │ │ -
YaspGlobalIdSet()
Only default-constructible.
Definition yaspgrididset.hh:35
│ │ │ -
IdType id(const typename std::remove_const< GridImp >::type::Traits::template Codim< cd >::Entity &e) const
get id of an entity
Definition yaspgrididset.hh:44
│ │ │ +
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,98 +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 │ │ │ │ -yaspgrididset.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_YASPGRIDIDSET_HH │ │ │ │ -6#define DUNE_GRID_YASPGRIDIDSET_HH │ │ │ │ +5#ifndef DUNE_GRID_YASPGRIDLEVELITERATOR_HH │ │ │ │ +6#define DUNE_GRID_YASPGRIDLEVELITERATOR_HH │ │ │ │ 7 │ │ │ │ -8 │ │ │ │ -9namespace _D_u_n_e { │ │ │ │ -10 │ │ │ │ -11 //======================================================================== │ │ │ │ -16 //======================================================================== │ │ │ │ -17 │ │ │ │ -18 template │ │ │ │ -_1_9 class _Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t : public _I_d_S_e_t, │ │ │ │ -20 typename std::remove_const::type::PersistentIndexType > │ │ │ │ -21 /* │ │ │ │ -22 We used the remove_const to extract the Type from the mutable class, │ │ │ │ -23 because the const class is not instantiated yet. │ │ │ │ -24 */ │ │ │ │ -25 { │ │ │ │ -26 typedef _Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t_<_ _G_r_i_d_I_m_p_ _> _T_h_i_s; │ │ │ │ -27 │ │ │ │ -28 public: │ │ │ │ -_3_0 typedef typename std::remove_const::type::PersistentIndexType │ │ │ │ -_I_d_T_y_p_e; │ │ │ │ -31 │ │ │ │ -32 using _I_d_S_e_t_:_:_s_u_b_I_d; │ │ │ │ +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_G_l_o_b_a_l_I_d_S_e_t() │ │ │ │ -36 {} │ │ │ │ -37 │ │ │ │ -39 /* │ │ │ │ -40 We use the remove_const to extract the Type from the mutable class, │ │ │ │ -41 because the const class is not instantiated yet. │ │ │ │ -42 */ │ │ │ │ -43 template │ │ │ │ -_4_4 _I_d_T_y_p_e _i_d (const typename std::remove_const::type::Traits::template │ │ │ │ -Codim::Entity& e) const │ │ │ │ -45 { │ │ │ │ -46 return e.impl().persistentIndex(); │ │ │ │ -47 } │ │ │ │ -48 │ │ │ │ -50 /* │ │ │ │ -51 We use the remove_const to extract the Type from the mutable class, │ │ │ │ -52 because the const class is not instantiated yet. │ │ │ │ -53 */ │ │ │ │ -_5_4 _I_d_T_y_p_e _s_u_b_I_d (const typename std::remove_const::type::Traits:: │ │ │ │ -template Codim< 0 >::Entity &e, │ │ │ │ -55 int i, unsigned int codim ) const │ │ │ │ -56 { │ │ │ │ -57 return e.impl().subPersistentIndex(i,codim); │ │ │ │ -58 } │ │ │ │ -59 │ │ │ │ -60 }; │ │ │ │ -61 │ │ │ │ -62} // namespace Dune │ │ │ │ -63 │ │ │ │ -64#endif // DUNE_GRID_YASPGRIDIDSET_HH │ │ │ │ +_3_5 _Y_a_s_p_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_d_S_e_t │ │ │ │ -Id Set Interface. │ │ │ │ -DDeeffiinniittiioonn common/indexidset.hh:447 │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t │ │ │ │ -persistent, globally unique Ids │ │ │ │ -DDeeffiinniittiioonn yaspgrididset.hh:25 │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t_:_:_s_u_b_I_d │ │ │ │ -IdType subId(const typename std::remove_const< GridImp >::type::Traits:: │ │ │ │ -template Codim< 0 >::Entity &e, int i, unsigned int codim) const │ │ │ │ -get id of subentity │ │ │ │ -DDeeffiinniittiioonn yaspgrididset.hh:54 │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t_:_:_I_d_T_y_p_e │ │ │ │ -std::remove_const< GridImp >::type::PersistentIndexType IdType │ │ │ │ -define the type used for persistent indices │ │ │ │ -DDeeffiinniittiioonn yaspgrididset.hh:30 │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t_:_:_Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t │ │ │ │ -YaspGlobalIdSet() │ │ │ │ -Only default-constructible. │ │ │ │ -DDeeffiinniittiioonn yaspgrididset.hh:35 │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t_:_:_i_d │ │ │ │ -IdType id(const typename std::remove_const< GridImp >::type::Traits::template │ │ │ │ -Codim< cd >::Entity &e) const │ │ │ │ -get id of an entity │ │ │ │ -DDeeffiinniittiioonn yaspgrididset.hh:44 │ │ │ │ +_D_u_n_e_:_:_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/a00179.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: yaspgridentityseed.hh File Reference │ │ │ +dune-grid: yaspgridentity.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,37 +72,52 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
yaspgridentityseed.hh File Reference
│ │ │ +
yaspgridentity.hh File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

The YaspEntitySeed class. │ │ │ +

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

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

Go to the source code of this file.

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

│ │ │ Classes

class  Dune::YaspEntitySeed< codim, GridImp >
 Describes the minimal information necessary to create a fully functional YaspEntity. More...
class  Dune::YaspEntity< codim, dim, GridImp >
 
class  Dune::YaspEntity< 0, dim, GridImp >
 
struct  Dune::YaspEntity< 0, dim, GridImp >::Codim< cd >
 
class  Dune::YaspEntity< dim, dim, GridImp >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ + │ │ │

│ │ │ Namespaces

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

Detailed Description

│ │ │ -

The YaspEntitySeed class.

│ │ │ +

the YaspEntity class and its specializations

│ │ │ +

YaspEntity realizes the concept a mesh entity.

│ │ │ +

We have specializations for

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

The general version implements all other codimensions.

│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -2,23 +2,38 @@ │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_r_i_d │ │ │ │ * _y_a_s_p_g_r_i_d │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -yaspgridentityseed.hh File Reference │ │ │ │ -The YaspEntitySeed class. _M_o_r_e_._._. │ │ │ │ +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_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_E_n_t_i_t_y_<_ _c_o_d_i_m_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ +  │ │ │ │ + class   _D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ +  │ │ │ │ +struct   _D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_C_o_d_i_m_<_ _c_d_ _> │ │ │ │ +  │ │ │ │ + class   _D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _d_i_m_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _> │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │   Include standard header files. │ │ │ │   │ │ │ │ +namespace   _D_u_n_e_:_:_Y_a_s_p │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -The YaspEntitySeed class. │ │ │ │ +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/a00179_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: yaspgridentityseed.hh Source File │ │ │ +dune-grid: yaspgridentity.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,82 +74,1064 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
yaspgridentityseed.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_YASPGRIDENTITYSEED_HH
│ │ │ -
6#define DUNE_GRID_YASPGRIDENTITYSEED_HH
│ │ │ +
5#ifndef DUNE_GRID_YASPGRIDENTITY_HH
│ │ │ +
6#define DUNE_GRID_YASPGRIDENTITY_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;
│ │ │ +
8#include <dune/common/math.hh>
│ │ │ +
9#include <dune/geometry/type.hh>
│ │ │ +
10
│ │ │ +
24//========================================================================
│ │ │
25
│ │ │ -
│ │ │ - │ │ │ -
28 : _l(-1), _o(0)
│ │ │ -
29 {
│ │ │ -
30 std::fill(_c.begin(),_c.end(),0);
│ │ │ -
31 }
│ │ │ -
│ │ │ +
26
│ │ │ +
27
│ │ │ +
28
│ │ │ +
29namespace Dune {
│ │ │ +
30
│ │ │ +
31 namespace Yasp {
│ │ │
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
│ │ │ +
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 }
│ │ │ +
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);
│ │ │ +
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 {}
│ │ │ +
│ │ │ +
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
│ │ │ +
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
│ │ │ -
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
│ │ │ +
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,98 +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 │ │ │ │ -yaspgridentityseed.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_YASPGRIDENTITYSEED_HH │ │ │ │ -6#define DUNE_GRID_YASPGRIDENTITYSEED_HH │ │ │ │ +5#ifndef DUNE_GRID_YASPGRIDENTITY_HH │ │ │ │ +6#define DUNE_GRID_YASPGRIDENTITY_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; │ │ │ │ +8#include │ │ │ │ +9#include │ │ │ │ +10 │ │ │ │ +24//======================================================================== │ │ │ │ 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 } │ │ │ │ +26 │ │ │ │ +27 │ │ │ │ +28 │ │ │ │ +29namespace _D_u_n_e { │ │ │ │ +30 │ │ │ │ +31 namespace Yasp { │ │ │ │ 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 │ │ │ │ +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 } │ │ │ │ +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, 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--; │ │ │ │ +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_:_:_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 │ │ │ │ +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_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 │ │ │ │ +_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 │ │ │ │ -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 │ │ │ │ +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/a00182.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: yaspgridentity.hh File Reference │ │ │ +dune-grid: structuredyaspgridfactory.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,52 +72,42 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
yaspgridentity.hh File Reference
│ │ │ +
structuredyaspgridfactory.hh File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

the YaspEntity class and its specializations │ │ │ +

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

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

Go to the source code of this file.

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

│ │ │ Classes

class  Dune::YaspEntity< codim, dim, GridImp >
class  Dune::StructuredGridFactory< YaspGrid< dim, EquidistantCoordinates< ctype, dim > > >
 Specialization of the StructuredGridFactory for YaspGrid. More...
 
class  Dune::YaspEntity< 0, dim, GridImp >
 
struct  Dune::YaspEntity< 0, dim, GridImp >::Codim< cd >
 
class  Dune::YaspEntity< dim, dim, GridImp >
class  Dune::StructuredGridFactory< YaspGrid< dim, EquidistantOffsetCoordinates< ctype, dim > > >
 Specialization of the StructuredGridFactory for YaspGrid<EquidistantOffsetCoordinates> More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │

│ │ │ Namespaces

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

Detailed Description

│ │ │ -

the YaspEntity class and its specializations

│ │ │ -

YaspEntity realizes the concept a mesh entity.

│ │ │ -

We have specializations for

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

The general version implements all other codimensions.

│ │ │ +

Specialization of the StructuredGridFactory class for YaspGrid.

│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -2,38 +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 │ │ │ │ -yaspgridentity.hh File Reference │ │ │ │ -the YaspEntity class and its specializations _M_o_r_e_._._. │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ +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_E_n_t_i_t_y_<_ _c_o_d_i_m_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ -  │ │ │ │ - class   _D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ -  │ │ │ │ -struct   _D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_C_o_d_i_m_<_ _c_d_ _> │ │ │ │ -  │ │ │ │ - class   _D_u_n_e_:_:_Y_a_s_p_E_n_t_i_t_y_<_ _d_i_m_,_ _d_i_m_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ +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. │ │ │ │   │ │ │ │ -namespace   _D_u_n_e_:_:_Y_a_s_p │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -the YaspEntity class and its specializations │ │ │ │ -YaspEntity realizes the concept a mesh entity. │ │ │ │ -We have specializations for │ │ │ │ - * codim==0 (elements), because they have an extended interface │ │ │ │ - * codim==dim (vertices), because they use a special constructor of the │ │ │ │ - AxisAlignedCubeGeometry and are the only entities in a globally refined │ │ │ │ - grid, that may also exist on another level. │ │ │ │ -The general version implements all other codimensions. │ │ │ │ +Specialization of the StructuredGridFactory class for YaspGrid. │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00182_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: yaspgridentity.hh Source File │ │ │ +dune-grid: structuredyaspgridfactory.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,1064 +74,126 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
yaspgridentity.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_YASPGRIDENTITY_HH
│ │ │ -
6#define DUNE_GRID_YASPGRIDENTITY_HH
│ │ │ +
5#ifndef DUNE_GRID_YASPGRID_STRUCTUREDYASPGRIDFACTORY_HH
│ │ │ +
6#define DUNE_GRID_YASPGRID_STRUCTUREDYASPGRIDFACTORY_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 {
│ │ │ +
8#include <memory>
│ │ │ +
9
│ │ │ + │ │ │ +
11
│ │ │ +
16namespace Dune
│ │ │ +
17{
│ │ │ +
27 template<class ctype, int dim>
│ │ │ +
│ │ │ + │ │ │ +
29 {
│ │ │ + │ │ │ +
31 static const int dimworld = GridType::dimensionworld;
│ │ │
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 }
│ │ │ +
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 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 // 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 }
│ │ │ -
│ │ │ -
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 {}
│ │ │ -
│ │ │ -
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.
│ │ │ +
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 }
│ │ │ +
│ │ │ +
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
│ │ │ -
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
│ │ │ +
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
│ │ │ -
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
│ │ │ +
[ 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,1266 +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 │ │ │ │ -yaspgridentity.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_YASPGRIDENTITY_HH │ │ │ │ -6#define DUNE_GRID_YASPGRIDENTITY_HH │ │ │ │ +5#ifndef DUNE_GRID_YASPGRID_STRUCTUREDYASPGRIDFACTORY_HH │ │ │ │ +6#define DUNE_GRID_YASPGRID_STRUCTUREDYASPGRIDFACTORY_HH │ │ │ │ 7 │ │ │ │ -8#include │ │ │ │ -9#include │ │ │ │ -10 │ │ │ │ -24//======================================================================== │ │ │ │ -25 │ │ │ │ -26 │ │ │ │ -27 │ │ │ │ -28 │ │ │ │ -29namespace _D_u_n_e { │ │ │ │ -30 │ │ │ │ -31 namespace Yasp { │ │ │ │ +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#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 } │ │ │ │ +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 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 // 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 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. │ │ │ │ +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 } │ │ │ │ +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_:_:_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_:_:_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_:_:_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 │ │ │ │ -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 │ │ │ │ +_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/a00185.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: torus.hh File Reference │ │ │ +dune-grid: yaspgrididset.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,58 +71,33 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces | │ │ │ -Functions
│ │ │ -
torus.hh File Reference
│ │ │ +Namespaces
│ │ │ +
yaspgrididset.hh File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

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.

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

│ │ │ Classes

class  Dune::Torus< Communication, d >
 
class  Dune::Torus< Communication, d >::ProcListIterator
class  Dune::YaspGlobalIdSet< GridImp >
 persistent, globally unique Ids 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.

│ │ │ -
│ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,42 +1,20 @@ │ │ │ │ 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 │ │ │ │ +yaspgrididset.hh File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -class   _D_u_n_e_:_:_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_G_l_o_b_a_l_I_d_S_e_t_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ +  persistent, globally unique Ids _M_o_r_e_._._. │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │   Include standard header files. │ │ │ │   │ │ │ │ -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/a00185_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: torus.hh Source File │ │ │ +dune-grid: yaspgrididset.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,619 +74,88 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
torus.hh
│ │ │ +
yaspgrididset.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_YASPGRIDIDSET_HH
│ │ │ +
6#define DUNE_GRID_YASPGRIDIDSET_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{
│ │ │ +
8
│ │ │ +
9namespace Dune {
│ │ │ +
10
│ │ │ +
11 //========================================================================
│ │ │ +
16 //========================================================================
│ │ │ +
17
│ │ │ +
18 template<class GridImp>
│ │ │ +
│ │ │ +
19 class YaspGlobalIdSet : public IdSet<GridImp,YaspGlobalIdSet<GridImp>,
│ │ │ +
20 typename std::remove_const<GridImp>::type::PersistentIndexType >
│ │ │ +
21 /*
│ │ │ +
22 We used the remove_const to extract the Type from the mutable class,
│ │ │ +
23 because the const class is not instantiated yet.
│ │ │ +
24 */
│ │ │ +
25 {
│ │ │ + │ │ │ +
27
│ │ │ +
28 public:
│ │ │ +
30 typedef typename std::remove_const<GridImp>::type::PersistentIndexType IdType;
│ │ │
31
│ │ │ -
45 template<class Communication, int d>
│ │ │ -
│ │ │ -
46 class Torus {
│ │ │ -
47 public:
│ │ │ -
49 typedef std::array<int, d> iTupel;
│ │ │ -
50
│ │ │ -
51
│ │ │ -
52 private:
│ │ │ -
53 struct CommPartner {
│ │ │ -
54 int rank;
│ │ │ -
55 iTupel delta;
│ │ │ -
56 int index;
│ │ │ -
57 };
│ │ │ -
58
│ │ │ -
59 struct CommTask {
│ │ │ -
60 int rank; // process to send to / receive from
│ │ │ -
61 int size; // size of buffer
│ │ │ -
62 void *buffer; // buffer to send / receive
│ │ │ -
63 };
│ │ │ -
64
│ │ │ -
65 public:
│ │ │ -
│ │ │ - │ │ │ -
68 {}
│ │ │ -
│ │ │ -
69
│ │ │ -
│ │ │ -
71 Torus (Communication comm, int tag, iTupel size, int overlap, const Yasp::Partitioning<d>* partitioner)
│ │ │ -
72 : _comm(comm), _tag(tag)
│ │ │ -
73 {
│ │ │ -
74 // determine dimensions
│ │ │ -
75 partitioner->partition(size, _comm.size(), _dims, overlap);
│ │ │ -
76
│ │ │ -
77 // compute increments for lexicographic ordering
│ │ │ -
78 int inc = 1;
│ │ │ -
79 for (int i=0; i<d; i++)
│ │ │ -
80 {
│ │ │ -
81 _increment[i] = inc;
│ │ │ -
82 inc *= _dims[i];
│ │ │ -
83 }
│ │ │ -
84
│ │ │ -
85 // check whether the load balancing matches the size of the communicator
│ │ │ -
86 if (inc != _comm.size())
│ │ │ -
87 DUNE_THROW(Dune::Exception, "Communicator size and result of the given load balancer do not match!");
│ │ │ -
88
│ │ │ -
89 // make full schedule
│ │ │ -
90 proclists();
│ │ │ -
91 }
│ │ │ -
│ │ │ -
92
│ │ │ -
│ │ │ -
94 int rank () const
│ │ │ -
95 {
│ │ │ -
96 return _comm.rank();
│ │ │ -
97 }
│ │ │ -
│ │ │ -
98
│ │ │ -
│ │ │ -
100 iTupel coord () const
│ │ │ -
101 {
│ │ │ -
102 return rank_to_coord(_comm.rank());
│ │ │ -
103 }
│ │ │ -
│ │ │ -
104
│ │ │ -
│ │ │ -
106 int procs () const
│ │ │ -
107 {
│ │ │ -
108 return _comm.size();
│ │ │ -
109 }
│ │ │ -
│ │ │ -
110
│ │ │ -
│ │ │ -
112 const iTupel & dims () const
│ │ │ -
113 {
│ │ │ -
114 return _dims;
│ │ │ -
115 }
│ │ │ -
│ │ │ -
116
│ │ │ -
│ │ │ -
118 int dims (int i) const
│ │ │ -
119 {
│ │ │ -
120 return _dims[i];
│ │ │ -
121 }
│ │ │ -
│ │ │ -
122
│ │ │ -
│ │ │ -
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
│ │ │ +
32 using IdSet<GridImp, This, IdType>::subId;
│ │ │ +
33
│ │ │ +
│ │ │ + │ │ │ +
36 {}
│ │ │ +
│ │ │ +
37
│ │ │ +
39 /*
│ │ │ +
40 We use the remove_const to extract the Type from the mutable class,
│ │ │ +
41 because the const class is not instantiated yet.
│ │ │ +
42 */
│ │ │ +
43 template<int cd>
│ │ │ +
│ │ │ +
44 IdType id (const typename std::remove_const<GridImp>::type::Traits::template Codim<cd>::Entity& e) const
│ │ │ +
45 {
│ │ │ +
46 return e.impl().persistentIndex();
│ │ │ +
47 }
│ │ │ +
│ │ │ +
48
│ │ │ +
50 /*
│ │ │ +
51 We use the remove_const to extract the Type from the mutable class,
│ │ │ +
52 because the const class is not instantiated yet.
│ │ │ +
53 */
│ │ │ +
│ │ │ +
54 IdType subId (const typename std::remove_const<GridImp>::type::Traits::template Codim< 0 >::Entity &e,
│ │ │ +
55 int i, unsigned int codim ) const
│ │ │ +
56 {
│ │ │ +
57 return e.impl().subPersistentIndex(i,codim);
│ │ │ +
58 }
│ │ │ +
│ │ │ +
59
│ │ │ +
60 };
│ │ │ +
│ │ │ +
61
│ │ │ +
62} // namespace Dune
│ │ │ +
63
│ │ │ +
64#endif // DUNE_GRID_YASPGRIDIDSET_HH
│ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ -
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
│ │ │ +
Id Set Interface.
Definition common/indexidset.hh:447
│ │ │ +
persistent, globally unique Ids
Definition yaspgrididset.hh:25
│ │ │ +
IdType subId(const typename std::remove_const< GridImp >::type::Traits::template Codim< 0 >::Entity &e, int i, unsigned int codim) const
get id of subentity
Definition yaspgrididset.hh:54
│ │ │ +
std::remove_const< GridImp >::type::PersistentIndexType IdType
define the type used for persistent indices
Definition yaspgrididset.hh:30
│ │ │ +
YaspGlobalIdSet()
Only default-constructible.
Definition yaspgrididset.hh:35
│ │ │ +
IdType id(const typename std::remove_const< GridImp >::type::Traits::template Codim< cd >::Entity &e) const
get id of an entity
Definition yaspgrididset.hh:44
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,680 +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 │ │ │ │ -torus.hh │ │ │ │ +yaspgrididset.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ 3// -*- 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_YASPGRIDIDSET_HH │ │ │ │ +6#define DUNE_GRID_YASPGRIDIDSET_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{ │ │ │ │ +8 │ │ │ │ +9namespace _D_u_n_e { │ │ │ │ +10 │ │ │ │ +11 //======================================================================== │ │ │ │ +16 //======================================================================== │ │ │ │ +17 │ │ │ │ +18 template │ │ │ │ +_1_9 class _Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t : public _I_d_S_e_t, │ │ │ │ +20 typename std::remove_const::type::PersistentIndexType > │ │ │ │ +21 /* │ │ │ │ +22 We used the remove_const to extract the Type from the mutable class, │ │ │ │ +23 because the const class is not instantiated yet. │ │ │ │ +24 */ │ │ │ │ +25 { │ │ │ │ +26 typedef _Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t_<_ _G_r_i_d_I_m_p_ _> _T_h_i_s; │ │ │ │ +27 │ │ │ │ +28 public: │ │ │ │ +_3_0 typedef typename std::remove_const::type::PersistentIndexType │ │ │ │ +_I_d_T_y_p_e; │ │ │ │ 31 │ │ │ │ -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=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 │ │ │ │ +32 using _I_d_S_e_t_:_:_s_u_b_I_d; │ │ │ │ +33 │ │ │ │ +_3_5 _Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t() │ │ │ │ +36 {} │ │ │ │ +37 │ │ │ │ +39 /* │ │ │ │ +40 We use the remove_const to extract the Type from the mutable class, │ │ │ │ +41 because the const class is not instantiated yet. │ │ │ │ +42 */ │ │ │ │ +43 template │ │ │ │ +_4_4 _I_d_T_y_p_e _i_d (const typename std::remove_const::type::Traits::template │ │ │ │ +Codim::Entity& e) const │ │ │ │ +45 { │ │ │ │ +46 return e.impl().persistentIndex(); │ │ │ │ +47 } │ │ │ │ +48 │ │ │ │ +50 /* │ │ │ │ +51 We use the remove_const to extract the Type from the mutable class, │ │ │ │ +52 because the const class is not instantiated yet. │ │ │ │ +53 */ │ │ │ │ +_5_4 _I_d_T_y_p_e _s_u_b_I_d (const typename std::remove_const::type::Traits:: │ │ │ │ +template Codim< 0 >::Entity &e, │ │ │ │ +55 int i, unsigned int codim ) const │ │ │ │ +56 { │ │ │ │ +57 return e.impl().subPersistentIndex(i,codim); │ │ │ │ +58 } │ │ │ │ +59 │ │ │ │ +60 }; │ │ │ │ +61 │ │ │ │ +62} // namespace Dune │ │ │ │ +63 │ │ │ │ +64#endif // DUNE_GRID_YASPGRIDIDSET_HH │ │ │ │ _D_u_n_e │ │ │ │ Include standard header files. │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ -_D_u_n_e_:_:_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_d_S_e_t │ │ │ │ +Id Set Interface. │ │ │ │ +DDeeffiinniittiioonn common/indexidset.hh:447 │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t │ │ │ │ +persistent, globally unique Ids │ │ │ │ +DDeeffiinniittiioonn yaspgrididset.hh:25 │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t_:_:_s_u_b_I_d │ │ │ │ +IdType subId(const typename std::remove_const< GridImp >::type::Traits:: │ │ │ │ +template Codim< 0 >::Entity &e, int i, unsigned int codim) const │ │ │ │ +get id of subentity │ │ │ │ +DDeeffiinniittiioonn yaspgrididset.hh:54 │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t_:_:_I_d_T_y_p_e │ │ │ │ +std::remove_const< GridImp >::type::PersistentIndexType IdType │ │ │ │ +define the type used for persistent indices │ │ │ │ +DDeeffiinniittiioonn yaspgrididset.hh:30 │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t_:_:_Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t │ │ │ │ +YaspGlobalIdSet() │ │ │ │ +Only default-constructible. │ │ │ │ +DDeeffiinniittiioonn yaspgrididset.hh:35 │ │ │ │ +_D_u_n_e_:_:_Y_a_s_p_G_l_o_b_a_l_I_d_S_e_t_:_:_i_d │ │ │ │ +IdType id(const typename std::remove_const< GridImp >::type::Traits::template │ │ │ │ +Codim< cd >::Entity &e) const │ │ │ │ +get id of an entity │ │ │ │ +DDeeffiinniittiioonn yaspgrididset.hh:44 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00209.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: partitioning.hh File Reference │ │ │ +dune-grid: yaspgridindexsets.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,49 +72,37 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
partitioning.hh File Reference
│ │ │ +
yaspgridindexsets.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. │ │ │ +

level-wise, non-persistent, consecutive indices for YaspGrid │ │ │ More...

│ │ │ -
#include <array>
│ │ │ -#include <dune/common/math.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::Yasp::DefaultPartitioning< d >
 
class  Dune::Yasp::PowerDPartitioning< d >
 Implement yaspgrid load balance strategy for P=x^{dim} processors. More...
 
class  Dune::Yasp::FixedSizePartitioning< d >
 Implement partitioner that gets a fixed partitioning from an array If the given partitioning doesn't match the number of processors, the grid should be distributed to, an exception is thrown. More...
class  Dune::YaspIndexSet< GridImp, isLeafIndexSet >
 Implementation of Level- and LeafIndexSets for YaspGrid. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │

│ │ │ Namespaces

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

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.

│ │ │ +

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

│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -2,43 +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 │ │ │ │ -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 │ │ │ │ +yaspgridindexsets.hh File Reference │ │ │ │ +level-wise, non-persistent, consecutive indices for YaspGrid _M_o_r_e_._._. │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -class   _D_u_n_e_:_:_Y_a_s_p_:_:_P_a_r_t_i_t_i_o_n_i_n_g_<_ _d_ _> │ │ │ │ -  a base class for the yaspgrid partitioning strategy _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -class   _D_u_n_e_:_:_Y_a_s_p_:_:_D_e_f_a_u_l_t_P_a_r_t_i_t_i_o_n_i_n_g_<_ _d_ _> │ │ │ │ -  │ │ │ │ -class   _D_u_n_e_:_:_Y_a_s_p_:_:_P_o_w_e_r_D_P_a_r_t_i_t_i_o_n_i_n_g_<_ _d_ _> │ │ │ │ -  Implement yaspgrid load balance strategy for P=x^{dim} processors. │ │ │ │ - _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -class   _D_u_n_e_:_:_Y_a_s_p_:_:_F_i_x_e_d_S_i_z_e_P_a_r_t_i_t_i_o_n_i_n_g_<_ _d_ _> │ │ │ │ - Implement partitioner that gets a fixed partitioning from an array If │ │ │ │ -  the given partitioning doesn't match the number of processors, the grid │ │ │ │ - should be distributed to, an exception is thrown. _M_o_r_e_._._. │ │ │ │ +class   _D_u_n_e_:_:_Y_a_s_p_I_n_d_e_x_S_e_t_<_ _G_r_i_d_I_m_p_,_ _i_s_L_e_a_f_I_n_d_e_x_S_e_t_ _> │ │ │ │ +  Implementation of Level- and LeafIndexSets for _Y_a_s_p_G_r_i_d. _M_o_r_e_._._. │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │   Include standard header files. │ │ │ │   │ │ │ │ -namespace   _D_u_n_e_:_:_Y_a_s_p │ │ │ │ -  │ │ │ │ ********** 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. │ │ │ │ +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/a00209_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: partitioning.hh Source File │ │ │ +dune-grid: yaspgridindexsets.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,187 +74,131 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
partitioning.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#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>
│ │ │ -
│ │ │ - │ │ │ +
3// -*- 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
│ │ │ +
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;
│ │ │ +
33
│ │ │ +
│ │ │ +
35 YaspIndexSet ( const GridImp &g, int l )
│ │ │ +
36 : grid( g ),
│ │ │ +
37 level( l )
│ │ │
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);
│ │ │ +
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
│ │ │ -
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
│ │ │ +
│ │ │ +
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
│ │ │
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
│ │ │ +
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,211 +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 │ │ │ │ -partitioning.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#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 │ │ │ │ +3// -*- 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 │ │ │ │ +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; │ │ │ │ +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 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); │ │ │ │ +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 │ │ │ │ -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 ) │ │ │ │ +_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 // P divisible by k │ │ │ │ -85 trydims[i] = k; │ │ │ │ -86 optimize_dims(i-1,size,P/k,dims,trydims,opt,overlap); │ │ │ │ +84 return (isLeafIndexSet) │ │ │ │ +85 ? e.level() == grid.maxLevel() │ │ │ │ +86 : e.level() == level; │ │ │ │ 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 │ │ │ │ +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 │ │ │ │ _D_u_n_e │ │ │ │ Include standard header files. │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_E_r_r_o_r │ │ │ │ -Base class for exceptions in Dune grid modules. │ │ │ │ -DDeeffiinniittiioonn exceptions.hh:20 │ │ │ │ -_D_u_n_e_:_:_Y_a_s_p_:_:_P_a_r_t_i_t_i_o_n_i_n_g │ │ │ │ -a base class for the yaspgrid partitioning strategy │ │ │ │ -DDeeffiinniittiioonn partitioning.hh: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 │ │ │ │ +_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/a00257.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: mapper.hh File Reference │ │ │ +dune-grid: datahandleif.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,40 +72,42 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
mapper.hh File Reference
│ │ │ +
datahandleif.hh File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

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

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

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

Go to the source code of this file.

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

│ │ │ Classes

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

│ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │

Detailed Description

│ │ │ -

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

│ │ │ -
Author
Peter Bastian
│ │ │ +

Describes the parallel communication interface class for MessageBuffers and DataHandles.

│ │ │ +
Author
Robert Kloefkorn
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -2,27 +2,40 @@ │ │ │ │ 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 │ │ │ │ +datahandleif.hh File Reference │ │ │ │ +Describes the parallel communication interface class for MessageBuffers and │ │ │ │ +DataHandles. _M_o_r_e_._._. │ │ │ │ #include │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -class   _D_u_n_e_:_:_M_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_:_:_M_e_s_s_a_g_e_B_u_f_f_e_r_I_F_<_ _M_e_s_s_a_g_e_B_u_f_f_e_r_I_m_p_ _> │ │ │ │ + Communication message buffer interface. This class describes the │ │ │ │ + interface for reading and writing data to the communication message │ │ │ │ + buffer. As message buffers might be deeply implemented in various │ │ │ │ +  packages the message buffers implementations cannot be derived from │ │ │ │ + this interface class. Therefore we just apply the engine concept to │ │ │ │ + wrap the message buffer call and make sure that the interface is │ │ │ │ + fulfilled. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +class   _D_u_n_e_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F_<_ _D_a_t_a_H_a_n_d_l_e_I_m_p_,_ _D_a_t_a_T_y_p_e_I_m_p_ _> │ │ │ │ + _C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F describes the features of a data handle for │ │ │ │ + communication in parallel runs using the Grid::communicate methods. │ │ │ │ +  Here the Barton-Nackman trick is used to interpret data handle objects │ │ │ │ + as its interface. Therefore usable data handle classes need to be │ │ │ │ + derived from this class. _M_o_r_e_._._. │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │   Include standard header files. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Provides classes with basic mappers which are used to attach data to a grid. │ │ │ │ +Describes the parallel communication interface class for MessageBuffers and │ │ │ │ +DataHandles. │ │ │ │ Author │ │ │ │ - Peter Bastian │ │ │ │ + Robert Kloefkorn │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00257_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: mapper.hh Source File │ │ │ +dune-grid: datahandleif.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,114 +74,139 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
mapper.hh
│ │ │ +
datahandleif.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_MAPPER_HH
│ │ │ -
6#define DUNE_GRID_COMMON_MAPPER_HH
│ │ │ +
5#ifndef DUNE_GRID_COMMON_DATAHANDLEIF_HH
│ │ │ +
6#define DUNE_GRID_COMMON_DATAHANDLEIF_HH
│ │ │
7
│ │ │ -
8#include <utility>
│ │ │ -
9
│ │ │ -
10#include <dune/common/bartonnackmanifcheck.hh>
│ │ │ -
11
│ │ │ -
89namespace Dune
│ │ │ -
90{
│ │ │ -
108 template <typename G, typename MapperImp, typename IndexType=int>
│ │ │ -
│ │ │ -
109 class Mapper
│ │ │ -
110 {
│ │ │ -
111 public:
│ │ │ +
14#include <dune/common/bartonnackmanifcheck.hh>
│ │ │ +
15
│ │ │ +
16namespace Dune
│ │ │ +
17{
│ │ │ +
18
│ │ │ +
31 template <class MessageBufferImp>
│ │ │ +
│ │ │ + │ │ │ +
33 {
│ │ │ +
34 MessageBufferImp & buff_;
│ │ │ +
35 public:
│ │ │ +
37 MessageBufferIF(MessageBufferImp & buff) : buff_(buff) {}
│ │ │ +
38
│ │ │ +
44 template <class T>
│ │ │ +
│ │ │ +
45 void write(const T & val)
│ │ │ +
46 {
│ │ │ +
47 buff_.write(val);
│ │ │ +
48 }
│ │ │ +
│ │ │ +
49
│ │ │ +
58 template <class T>
│ │ │ +
│ │ │ +
59 void read(T & val)
│ │ │ +
60 {
│ │ │ +
61 buff_.read(val);
│ │ │ +
62 }
│ │ │ +
│ │ │ +
63 }; // end class MessageBufferIF
│ │ │ +
│ │ │ +
64
│ │ │ +
65
│ │ │ +
76 template <class DataHandleImp, class DataTypeImp>
│ │ │ +
│ │ │ + │ │ │ +
78 {
│ │ │ +
79
│ │ │ +
80 public:
│ │ │ +
82 typedef DataTypeImp DataType;
│ │ │ +
83
│ │ │ +
84 protected:
│ │ │ +
85 // one should not create an explicit instance of this interface object
│ │ │ + │ │ │ +
87
│ │ │ +
88 public:
│ │ │ +
│ │ │ +
94 bool contains (int dim, int codim) const
│ │ │ +
95 {
│ │ │ +
96 CHECK_INTERFACE_IMPLEMENTATION((asImp().contains(dim,codim)));
│ │ │ +
97 return asImp().contains(dim,codim);
│ │ │ +
98 }
│ │ │ +
│ │ │ +
99
│ │ │ +
│ │ │ +
107 bool fixedSize (int dim, int codim) const
│ │ │ +
108 {
│ │ │ +
109 CHECK_INTERFACE_IMPLEMENTATION((asImp().fixedSize(dim, codim)));
│ │ │ +
110 return asImp().fixedSize(dim, codim);
│ │ │ +
111 }
│ │ │ +
│ │ │
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();
│ │ │ +
117 template<class EntityType>
│ │ │ +
│ │ │ +
118 size_t size (const EntityType& e) const
│ │ │ +
119 {
│ │ │ +
120 CHECK_INTERFACE_IMPLEMENTATION((asImp().size(e)));
│ │ │ +
121 return asImp().size(e);
│ │ │ +
122 }
│ │ │ +
│ │ │ +
123
│ │ │ +
128 template<class MessageBufferImp, class EntityType>
│ │ │ +
│ │ │ +
129 void gather (MessageBufferImp& buff, const EntityType& e) const
│ │ │ +
130 {
│ │ │ + │ │ │ +
132 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp().gather(buffIF,e)));
│ │ │ +
133 }
│ │ │ +
│ │ │ +
134
│ │ │ +
142 template<class MessageBufferImp, class EntityType>
│ │ │ +
│ │ │ +
143 void scatter (MessageBufferImp& buff, const EntityType& e, size_t n)
│ │ │ +
144 {
│ │ │ + │ │ │ +
146 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp().scatter(buffIF,e,n)));
│ │ │ +
147 }
│ │ │ +
│ │ │ +
148
│ │ │ +
149 private:
│ │ │ +
151 DataHandleImp& asImp () {return static_cast<DataHandleImp &> (*this);}
│ │ │ +
153 const DataHandleImp& asImp () const
│ │ │ +
154 {
│ │ │ +
155 return static_cast<const DataHandleImp &>(*this);
│ │ │
156 }
│ │ │ +
157 }; // end class CommDataHandleIF
│ │ │
│ │ │ -
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
│ │ │ +
159#undef CHECK_INTERFACE_IMPLEMENTATION
│ │ │ +
160#undef CHECK_AND_CALL_INTERFACE_IMPLEMENTATION
│ │ │ +
161
│ │ │ +
162} // end namespace Dune
│ │ │ +
163#endif
│ │ │
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
│ │ │ +
Communication message buffer interface. This class describes the interface for reading and writing da...
Definition datahandleif.hh:33
│ │ │ +
MessageBufferIF(MessageBufferImp &buff)
stores reference to original buffer buff
Definition datahandleif.hh:37
│ │ │ +
void write(const T &val)
just wraps the call of the internal buffer method write which writes the data of type T from the buff...
Definition datahandleif.hh:45
│ │ │ +
void read(T &val)
just wraps the call of the internal buffer method read which reads the data of type T from the buffer...
Definition datahandleif.hh:59
│ │ │ +
CommDataHandleIF describes the features of a data handle for communication in parallel runs using the...
Definition datahandleif.hh:78
│ │ │ +
CommDataHandleIF()
Definition datahandleif.hh:86
│ │ │ +
void scatter(MessageBufferImp &buff, const EntityType &e, size_t n)
unpack data from message buffer to user.
Definition datahandleif.hh:143
│ │ │ +
bool contains(int dim, int codim) const
returns true if data for given valid codim should be communicated
Definition datahandleif.hh:94
│ │ │ +
size_t size(const EntityType &e) const
how many objects of type DataType have to be sent for a given entity
Definition datahandleif.hh:118
│ │ │ +
void gather(MessageBufferImp &buff, const EntityType &e) const
pack data from user to message buffer
Definition datahandleif.hh:129
│ │ │ +
bool fixedSize(int dim, int codim) const
returns true if size of data per entity of given dim and codim is a constant
Definition datahandleif.hh:107
│ │ │ +
DataTypeImp DataType
data type of data to communicate
Definition datahandleif.hh:82
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,129 +1,155 @@ │ │ │ │ dune-grid 2.10 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_r_i_d │ │ │ │ * _c_o_m_m_o_n │ │ │ │ -mapper.hh │ │ │ │ +datahandleif.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ -5#ifndef DUNE_GRID_COMMON_MAPPER_HH │ │ │ │ -6#define DUNE_GRID_COMMON_MAPPER_HH │ │ │ │ +5#ifndef DUNE_GRID_COMMON_DATAHANDLEIF_HH │ │ │ │ +6#define DUNE_GRID_COMMON_DATAHANDLEIF_HH │ │ │ │ 7 │ │ │ │ -8#include │ │ │ │ -9 │ │ │ │ -10#include │ │ │ │ -11 │ │ │ │ -89namespace _D_u_n_e │ │ │ │ -90{ │ │ │ │ -108 template │ │ │ │ -_1_0_9 class _M_a_p_p_e_r │ │ │ │ -110 { │ │ │ │ -111 public: │ │ │ │ +14#include │ │ │ │ +15 │ │ │ │ +16namespace _D_u_n_e │ │ │ │ +17{ │ │ │ │ +18 │ │ │ │ +31 template │ │ │ │ +_3_2 class _M_e_s_s_a_g_e_B_u_f_f_e_r_I_F │ │ │ │ +33 { │ │ │ │ +34 MessageBufferImp & buff_; │ │ │ │ +35 public: │ │ │ │ +_3_7 _M_e_s_s_a_g_e_B_u_f_f_e_r_I_F(MessageBufferImp & buff) : buff_(buff) {} │ │ │ │ +38 │ │ │ │ +44 template │ │ │ │ +_4_5 void _w_r_i_t_e(const T & val) │ │ │ │ +46 { │ │ │ │ +47 buff_.write(val); │ │ │ │ +48 } │ │ │ │ +49 │ │ │ │ +58 template │ │ │ │ +_5_9 void _r_e_a_d(T & val) │ │ │ │ +60 { │ │ │ │ +61 buff_.read(val); │ │ │ │ +62 } │ │ │ │ +63 }; // end class MessageBufferIF │ │ │ │ +64 │ │ │ │ +65 │ │ │ │ +76 template │ │ │ │ +_7_7 class _C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F │ │ │ │ +78 { │ │ │ │ +79 │ │ │ │ +80 public: │ │ │ │ +_8_2 typedef DataTypeImp _D_a_t_a_T_y_p_e; │ │ │ │ +83 │ │ │ │ +84 protected: │ │ │ │ +85 // one should not create an explicit instance of this interface object │ │ │ │ +_8_6 _C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F() {} │ │ │ │ +87 │ │ │ │ +88 public: │ │ │ │ +_9_4 bool _c_o_n_t_a_i_n_s (int dim, int codim) const │ │ │ │ +95 { │ │ │ │ +96 CHECK_INTERFACE_IMPLEMENTATION((asImp()._c_o_n_t_a_i_n_s(dim,codim))); │ │ │ │ +97 return asImp().contains(dim,codim); │ │ │ │ +98 } │ │ │ │ +99 │ │ │ │ +_1_0_7 bool _f_i_x_e_d_S_i_z_e (int dim, int codim) const │ │ │ │ +108 { │ │ │ │ +109 CHECK_INTERFACE_IMPLEMENTATION((asImp()._f_i_x_e_d_S_i_z_e(dim, codim))); │ │ │ │ +110 return asImp().fixedSize(dim, codim); │ │ │ │ +111 } │ │ │ │ 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(); │ │ │ │ +117 template │ │ │ │ +_1_1_8 size_t _s_i_z_e (const EntityType& e) const │ │ │ │ +119 { │ │ │ │ +120 CHECK_INTERFACE_IMPLEMENTATION((asImp()._s_i_z_e(e))); │ │ │ │ +121 return asImp().size(e); │ │ │ │ +122 } │ │ │ │ +123 │ │ │ │ +128 template │ │ │ │ +_1_2_9 void _g_a_t_h_e_r (MessageBufferImp& buff, const EntityType& e) const │ │ │ │ +130 { │ │ │ │ +131 _M_e_s_s_a_g_e_B_u_f_f_e_r_I_F_<_M_e_s_s_a_g_e_B_u_f_f_e_r_I_m_p_> buffIF(buff); │ │ │ │ +132 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp()._g_a_t_h_e_r(buffIF,e))); │ │ │ │ +133 } │ │ │ │ +134 │ │ │ │ +142 template │ │ │ │ +_1_4_3 void _s_c_a_t_t_e_r (MessageBufferImp& buff, const EntityType& e, size_t n) │ │ │ │ +144 { │ │ │ │ +145 _M_e_s_s_a_g_e_B_u_f_f_e_r_I_F_<_M_e_s_s_a_g_e_B_u_f_f_e_r_I_m_p_> buffIF(buff); │ │ │ │ +146 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp()._s_c_a_t_t_e_r(buffIF,e,n))); │ │ │ │ +147 } │ │ │ │ +148 │ │ │ │ +149 private: │ │ │ │ +151 DataHandleImp& asImp () {return static_cast (*this);} │ │ │ │ +153 const DataHandleImp& asImp () const │ │ │ │ +154 { │ │ │ │ +155 return static_cast(*this); │ │ │ │ 156 } │ │ │ │ -157 │ │ │ │ +157 }; // end class CommDataHandleIF │ │ │ │ 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 │ │ │ │ +159#undef CHECK_INTERFACE_IMPLEMENTATION │ │ │ │ +160#undef CHECK_AND_CALL_INTERFACE_IMPLEMENTATION │ │ │ │ +161 │ │ │ │ +162} // end namespace Dune │ │ │ │ +163#endif │ │ │ │ _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_:_:_M_e_s_s_a_g_e_B_u_f_f_e_r_I_F │ │ │ │ +Communication message buffer interface. This class describes the interface for │ │ │ │ +reading and writing da... │ │ │ │ +DDeeffiinniittiioonn datahandleif.hh:33 │ │ │ │ +_D_u_n_e_:_:_M_e_s_s_a_g_e_B_u_f_f_e_r_I_F_:_:_M_e_s_s_a_g_e_B_u_f_f_e_r_I_F │ │ │ │ +MessageBufferIF(MessageBufferImp &buff) │ │ │ │ +stores reference to original buffer buff │ │ │ │ +DDeeffiinniittiioonn datahandleif.hh:37 │ │ │ │ +_D_u_n_e_:_:_M_e_s_s_a_g_e_B_u_f_f_e_r_I_F_:_:_w_r_i_t_e │ │ │ │ +void write(const T &val) │ │ │ │ +just wraps the call of the internal buffer method write which writes the data │ │ │ │ +of type T from the buff... │ │ │ │ +DDeeffiinniittiioonn datahandleif.hh:45 │ │ │ │ +_D_u_n_e_:_:_M_e_s_s_a_g_e_B_u_f_f_e_r_I_F_:_:_r_e_a_d │ │ │ │ +void read(T &val) │ │ │ │ +just wraps the call of the internal buffer method read which reads the data of │ │ │ │ +type T from the buffer... │ │ │ │ +DDeeffiinniittiioonn datahandleif.hh:59 │ │ │ │ +_D_u_n_e_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F │ │ │ │ +CommDataHandleIF describes the features of a data handle for communication in │ │ │ │ +parallel runs using the... │ │ │ │ +DDeeffiinniittiioonn datahandleif.hh:78 │ │ │ │ +_D_u_n_e_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F │ │ │ │ +CommDataHandleIF() │ │ │ │ +DDeeffiinniittiioonn datahandleif.hh:86 │ │ │ │ +_D_u_n_e_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F_:_:_s_c_a_t_t_e_r │ │ │ │ +void scatter(MessageBufferImp &buff, const EntityType &e, size_t n) │ │ │ │ +unpack data from message buffer to user. │ │ │ │ +DDeeffiinniittiioonn datahandleif.hh:143 │ │ │ │ +_D_u_n_e_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F_:_:_c_o_n_t_a_i_n_s │ │ │ │ +bool contains(int dim, int codim) const │ │ │ │ +returns true if data for given valid codim should be communicated │ │ │ │ +DDeeffiinniittiioonn datahandleif.hh:94 │ │ │ │ +_D_u_n_e_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F_:_:_s_i_z_e │ │ │ │ +size_t size(const EntityType &e) const │ │ │ │ +how many objects of type DataType have to be sent for a given entity │ │ │ │ +DDeeffiinniittiioonn datahandleif.hh:118 │ │ │ │ +_D_u_n_e_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F_:_:_g_a_t_h_e_r │ │ │ │ +void gather(MessageBufferImp &buff, const EntityType &e) const │ │ │ │ +pack data from user to message buffer │ │ │ │ +DDeeffiinniittiioonn datahandleif.hh:129 │ │ │ │ +_D_u_n_e_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F_:_:_f_i_x_e_d_S_i_z_e │ │ │ │ +bool fixedSize(int dim, int codim) const │ │ │ │ +returns true if size of data per entity of given dim and codim is a constant │ │ │ │ +DDeeffiinniittiioonn datahandleif.hh:107 │ │ │ │ +_D_u_n_e_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F_:_:_D_a_t_a_T_y_p_e │ │ │ │ +DataTypeImp DataType │ │ │ │ +data type of data to communicate │ │ │ │ +DDeeffiinniittiioonn datahandleif.hh:82 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00314.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: gridenums.hh File Reference │ │ │ +dune-grid: boundarysegment.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,88 +70,46 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -Namespaces | │ │ │ -Enumerations | │ │ │ -Functions
│ │ │ -
gridenums.hh File Reference
│ │ │ +Classes | │ │ │ +Namespaces
│ │ │ +
boundarysegment.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <iostream>
│ │ │ -#include <dune/common/exceptions.hh>
│ │ │ + │ │ │ +

Base class for grid boundary segments of arbitrary geometry. │ │ │ +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.

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

│ │ │ +Classes

class  Dune::BoundarySegmentBackupRestore< BndSeg >
 
struct  Dune::BoundarySegment< dim, dimworld, ctype >
 Base class for classes implementing geometries of boundary segments. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ Namespaces

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

│ │ │ -Enumerations

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

│ │ │ -Functions

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

Detailed Description

│ │ │ +

Base class for grid boundary segments of arbitrary geometry.

│ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,59 +1,31 @@ │ │ │ │ dune-grid 2.10 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_r_i_d │ │ │ │ * _c_o_m_m_o_n │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _E_n_u_m_e_r_a_t_i_o_n_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -gridenums.hh File Reference │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +boundarysegment.hh File Reference │ │ │ │ +Base class for grid boundary segments of arbitrary geometry. _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_:_:_B_o_u_n_d_a_r_y_S_e_g_m_e_n_t_B_a_c_k_u_p_R_e_s_t_o_r_e_<_ _B_n_d_S_e_g_ _> │ │ │ │ +  │ │ │ │ +struct   _D_u_n_e_:_:_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_,_ _c_t_y_p_e_ _> │ │ │ │ +  Base class for classes implementing geometries of boundary segments. │ │ │ │ + _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │   Include standard header files. │ │ │ │   │ │ │ │ -EEnnuummeerraattiioonnss │ │ │ │ -enum   _D_u_n_e_:_:_P_a_r_t_i_t_i_o_n_T_y_p_e { │ │ │ │ -   _D_u_n_e_:_:_I_n_t_e_r_i_o_r_E_n_t_i_t_y =0 , _D_u_n_e_:_:_B_o_r_d_e_r_E_n_t_i_t_y =1 , _D_u_n_e_:_:_O_v_e_r_l_a_p_E_n_t_i_t_y │ │ │ │ - =2 , _D_u_n_e_:_:_F_r_o_n_t_E_n_t_i_t_y =3 , │ │ │ │ -   _D_u_n_e_:_:_G_h_o_s_t_E_n_t_i_t_y =4 │ │ │ │ - } │ │ │ │ -  Attributes used in the generic overlap model. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -enum   _D_u_n_e_:_:_I_n_t_e_r_f_a_c_e_T_y_p_e { │ │ │ │ -   _D_u_n_e_:_:_I_n_t_e_r_i_o_r_B_o_r_d_e_r___I_n_t_e_r_i_o_r_B_o_r_d_e_r___I_n_t_e_r_f_a_c_e =0 , _D_u_n_e_:_: │ │ │ │ - _I_n_t_e_r_i_o_r_B_o_r_d_e_r___A_l_l___I_n_t_e_r_f_a_c_e =1 , _D_u_n_e_:_:_O_v_e_r_l_a_p___O_v_e_r_l_a_p_F_r_o_n_t___I_n_t_e_r_f_a_c_e │ │ │ │ - =2 , _D_u_n_e_:_:_O_v_e_r_l_a_p___A_l_l___I_n_t_e_r_f_a_c_e =3 , │ │ │ │ -   _D_u_n_e_:_:_A_l_l___A_l_l___I_n_t_e_r_f_a_c_e =4 │ │ │ │ - } │ │ │ │ -  Parameter to be used for the communication functions. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -enum   _D_u_n_e_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_T_y_p_e { │ │ │ │ -   _D_u_n_e_:_:_I_n_t_e_r_i_o_r___P_a_r_t_i_t_i_o_n =0 , _D_u_n_e_:_:_I_n_t_e_r_i_o_r_B_o_r_d_e_r___P_a_r_t_i_t_i_o_n =1 , │ │ │ │ - _D_u_n_e_:_:_O_v_e_r_l_a_p___P_a_r_t_i_t_i_o_n =2 , _D_u_n_e_:_:_O_v_e_r_l_a_p_F_r_o_n_t___P_a_r_t_i_t_i_o_n =3 , │ │ │ │ -   _D_u_n_e_:_:_A_l_l___P_a_r_t_i_t_i_o_n =4 , _D_u_n_e_:_:_G_h_o_s_t___P_a_r_t_i_t_i_o_n =5 │ │ │ │ - } │ │ │ │ -  Parameter to be used for the parallel level- and leaf iterators. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -enum   _D_u_n_e_:_:_C_o_m_m_u_n_i_c_a_t_i_o_n_D_i_r_e_c_t_i_o_n { _D_u_n_e_:_:_F_o_r_w_a_r_d_C_o_m_m_u_n_i_c_a_t_i_o_n , _D_u_n_e_:_: │ │ │ │ - _B_a_c_k_w_a_r_d_C_o_m_m_u_n_i_c_a_t_i_o_n } │ │ │ │ -  Define a type for communication direction parameter. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -FFuunnccttiioonnss │ │ │ │ - std::string  _D_u_n_e_:_:_P_a_r_t_i_t_i_o_n_N_a_m_e (_P_a_r_t_i_t_i_o_n_T_y_p_e type) │ │ │ │ -  Provide names for the partition types. │ │ │ │ -  │ │ │ │ -std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &out, const _P_a_r_t_i_t_i_o_n_T_y_p_e &type) │ │ │ │ -  write a PartitionType to a stream │ │ │ │ -  │ │ │ │ -std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &out, const _I_n_t_e_r_f_a_c_e_T_y_p_e &type) │ │ │ │ -  write an InterfaceType to a stream │ │ │ │ -  │ │ │ │ -std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &out, const │ │ │ │ - _P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_T_y_p_e &type) │ │ │ │ -  write a PartitionIteratorType to a stream │ │ │ │ -  │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ +Base class for grid boundary segments of arbitrary geometry. │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00314_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: gridenums.hh Source File │ │ │ +dune-grid: boundarysegment.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,165 +74,130 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
gridenums.hh
│ │ │ +
boundarysegment.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_GRIDENUMS_HH
│ │ │ -
6#define DUNE_GRID_COMMON_GRIDENUMS_HH
│ │ │ +
5#ifndef DUNE_GRID_COMMON_BOUNDARY_SEGMENT_HH
│ │ │ +
6#define DUNE_GRID_COMMON_BOUNDARY_SEGMENT_HH
│ │ │
7
│ │ │ -
8#include <iostream>
│ │ │ -
9
│ │ │ -
10#include <dune/common/exceptions.hh>
│ │ │ -
11
│ │ │ -
12namespace Dune {
│ │ │ -
13
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
36 };
│ │ │ -
│ │ │ -
37
│ │ │ -
│ │ │ -
46 inline std::string PartitionName(PartitionType type)
│ │ │ -
47 {
│ │ │ -
48 switch(type) {
│ │ │ -
49 case InteriorEntity :
│ │ │ -
50 return "interior";
│ │ │ -
51 case BorderEntity :
│ │ │ -
52 return "border";
│ │ │ -
53 case OverlapEntity :
│ │ │ -
54 return "overlap";
│ │ │ -
55 case FrontEntity :
│ │ │ -
56 return "front";
│ │ │ -
57 case GhostEntity :
│ │ │ -
58 return "ghost";
│ │ │ -
59 default :
│ │ │ -
60 DUNE_THROW(NotImplemented, "name of unknown partition type requested");
│ │ │ -
61 }
│ │ │ -
62 }
│ │ │ -
│ │ │ -
63
│ │ │ -
65
│ │ │ -
│ │ │ -
72 inline std::ostream &operator<< ( std::ostream &out, const PartitionType &type )
│ │ │ -
73 {
│ │ │ -
74 return out << PartitionName( type );
│ │ │ -
75 }
│ │ │ -
│ │ │ -
76
│ │ │ -
77
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
92 };
│ │ │ -
│ │ │ -
93
│ │ │ -
94
│ │ │ -
96
│ │ │ -
│ │ │ -
103 inline std::ostream &operator<< ( std::ostream &out, const InterfaceType &type )
│ │ │ -
104 {
│ │ │ -
105 switch( type )
│ │ │ -
106 {
│ │ │ - │ │ │ -
108 return out << "interior-border / interior-border interface";
│ │ │ -
109
│ │ │ - │ │ │ -
111 return out << "interior-border / all interface";
│ │ │ -
112
│ │ │ - │ │ │ -
114 return out << "overlap / overlap-front interface";
│ │ │ -
115
│ │ │ - │ │ │ -
117 return out << "overlap / all interface";
│ │ │ -
118
│ │ │ -
119 case All_All_Interface :
│ │ │ -
120 return out << "all / all interface";
│ │ │ -
121
│ │ │ -
122 default :
│ │ │ -
123 return out << "unknown interface";
│ │ │ -
124 }
│ │ │ -
125 }
│ │ │ -
│ │ │ -
126
│ │ │ -
127
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
143 };
│ │ │ -
│ │ │ -
144
│ │ │ -
145
│ │ │ -
147
│ │ │ -
│ │ │ -
154 inline std::ostream &operator<< ( std::ostream &out, const PartitionIteratorType &type )
│ │ │ -
155 {
│ │ │ -
156 static std::string name[ 6 ] = { "interior partition", "interior-border partition", "overlap partition",
│ │ │ -
157 "overlap-front partition", "all partition", "ghost partition" };
│ │ │ -
158 return out << name[ type ];
│ │ │ -
159 }
│ │ │ -
│ │ │ -
160
│ │ │ -
161
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
173 };
│ │ │ -
│ │ │ -
174
│ │ │ -
180}
│ │ │ -
181#endif
│ │ │ -
std::string PartitionName(PartitionType type)
Provide names for the partition types.
Definition gridenums.hh:46
│ │ │ -
PartitionIteratorType
Parameter to be used for the parallel level- and leaf iterators.
Definition gridenums.hh:136
│ │ │ -
std::ostream & operator<<(std::ostream &out, const PartitionType &type)
write a PartitionType to a stream
Definition gridenums.hh:72
│ │ │ -
PartitionType
Attributes used in the generic overlap model.
Definition gridenums.hh:30
│ │ │ -
CommunicationDirection
Define a type for communication direction parameter.
Definition gridenums.hh:170
│ │ │ -
InterfaceType
Parameter to be used for the communication functions.
Definition gridenums.hh:86
│ │ │ -
@ All_Partition
all entities
Definition gridenums.hh:141
│ │ │ -
@ OverlapFront_Partition
interior, border, overlap and front entities
Definition gridenums.hh:140
│ │ │ -
@ Interior_Partition
only interior entities
Definition gridenums.hh:137
│ │ │ -
@ InteriorBorder_Partition
interior and border entities
Definition gridenums.hh:138
│ │ │ -
@ Overlap_Partition
interior, border, and overlap entities
Definition gridenums.hh:139
│ │ │ -
@ Ghost_Partition
only ghost entities
Definition gridenums.hh:142
│ │ │ -
@ FrontEntity
on boundary between overlap and ghost
Definition gridenums.hh:34
│ │ │ -
@ InteriorEntity
all interior entities
Definition gridenums.hh:31
│ │ │ -
@ GhostEntity
ghost entities
Definition gridenums.hh:35
│ │ │ -
@ BorderEntity
on boundary between interior and overlap
Definition gridenums.hh:32
│ │ │ -
@ OverlapEntity
all entities lying in the overlap zone
Definition gridenums.hh:33
│ │ │ -
@ BackwardCommunication
reverse communication direction
Definition gridenums.hh:172
│ │ │ -
@ ForwardCommunication
communicate as given in InterfaceType
Definition gridenums.hh:171
│ │ │ -
@ InteriorBorder_All_Interface
send interior and border, receive all entities
Definition gridenums.hh:88
│ │ │ -
@ All_All_Interface
send all and receive all entities
Definition gridenums.hh:91
│ │ │ -
@ Overlap_All_Interface
send overlap, receive all entities
Definition gridenums.hh:90
│ │ │ -
@ Overlap_OverlapFront_Interface
send overlap, receive overlap and front entities
Definition gridenums.hh:89
│ │ │ -
@ InteriorBorder_InteriorBorder_Interface
send/receive interior and border entities
Definition gridenums.hh:87
│ │ │ +
8#include <map>
│ │ │ +
9#include <sstream>
│ │ │ +
10
│ │ │ +
11#include <dune/common/singleton.hh>
│ │ │ +
12#include <dune/common/parameterizedobject.hh>
│ │ │ +
13#include <dune/common/fvector.hh>
│ │ │ +
14
│ │ │ +
19namespace Dune {
│ │ │ +
20
│ │ │ +
36 template< int dim, int dimworld = dim, class ctype = double >
│ │ │ +
37 struct BoundarySegment;
│ │ │ +
38
│ │ │ +
39 template <class BndSeg>
│ │ │ +
│ │ │ + │ │ │ +
41 {
│ │ │ +
42 public:
│ │ │ +
43 // type of object stream used for storing boundary segment information
│ │ │ +
44 typedef std::stringstream ObjectStreamType ;
│ │ │ +
45
│ │ │ +
46 protected:
│ │ │ +
48 typedef BndSeg BoundarySegment;
│ │ │ +
49
│ │ │ +
51 typedef Dune::ParameterizedObjectFactory< std::unique_ptr< BoundarySegment > ( ObjectStreamType& ), int > FactoryType;
│ │ │ +
52
│ │ │ +
│ │ │ +
59 static std::unique_ptr< BoundarySegment > restore( ObjectStreamType& in )
│ │ │ +
60 {
│ │ │ +
61 int key = -1;
│ │ │ +
62 // read class key for restore
│ │ │ +
63 in.read( (char *) &key, sizeof( int ) );
│ │ │ +
64
│ │ │ +
65 // factory creates a unique_ptr which can be released later on
│ │ │ +
66 return factory().create( key, in );
│ │ │ +
67 }
│ │ │ +
│ │ │ +
68
│ │ │ +
69 template <class DerivedType>
│ │ │ +
│ │ │ +
70 static int registerFactory()
│ │ │ +
71 {
│ │ │ +
72 const int key = createKey();
│ │ │ +
73 // create factory method that produces unique_ptr
│ │ │ +
74 factory().template define< DerivedType >( key );
│ │ │ +
75 // return key for storage in derived class
│ │ │ +
76 return key;
│ │ │ +
77 }
│ │ │ +
│ │ │ +
78
│ │ │ +
79 private:
│ │ │ +
80 static int createKey()
│ │ │ +
81 {
│ │ │ +
82 static int key = 0;
│ │ │ +
83 return key++;
│ │ │ +
84 }
│ │ │ +
85
│ │ │ +
86 static FactoryType& factory()
│ │ │ +
87 {
│ │ │ +
88 return Dune::Singleton< FactoryType > :: instance();
│ │ │ +
89 }
│ │ │ +
90 };
│ │ │ +
│ │ │ +
91
│ │ │ +
92 template< int dim, int dimworld, class ctype >
│ │ │ +
│ │ │ +
93 struct BoundarySegment : public BoundarySegmentBackupRestore< BoundarySegment< dim, dimworld, ctype > >
│ │ │ +
94 {
│ │ │ + │ │ │ + │ │ │ +
97
│ │ │ +
98 typedef typename BaseType :: ObjectStreamType ObjectStreamType;
│ │ │ +
99
│ │ │ +
100 using BaseType :: restore;
│ │ │ + │ │ │ +
102
│ │ │ +
104 virtual ~BoundarySegment() {}
│ │ │ +
105
│ │ │ +
108 virtual FieldVector< ctype, dimworld >
│ │ │ +
109 operator() ( const FieldVector< ctype, dim-1> &local ) const = 0;
│ │ │ +
110
│ │ │ +
│ │ │ +
114 virtual void backup( [[maybe_unused]] ObjectStreamType& buffer ) const
│ │ │ +
115 {
│ │ │ +
116 DUNE_THROW(NotImplemented,"BoundarySegment::backup needs to be overloaded!");
│ │ │ +
117 }
│ │ │ +
│ │ │ +
118 };
│ │ │ +
│ │ │ +
119
│ │ │ +
120
│ │ │ +
121} // end namespace Dune
│ │ │ +
122
│ │ │ +
123#endif
│ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ +
BaseType::ObjectStreamType ObjectStreamType
Definition boundarysegment.hh:98
│ │ │ +
BoundarySegment< dim, dimworld, ctype > ThisType
Definition boundarysegment.hh:95
│ │ │ +
virtual void backup(ObjectStreamType &buffer) const
write BoundarySegment's data to stream buffer
Definition boundarysegment.hh:114
│ │ │ +
BoundarySegmentBackupRestore< BoundarySegment< dim, dimworld, ctype > > BaseType
Definition boundarysegment.hh:96
│ │ │ +
virtual FieldVector< ctype, dimworld > operator()(const FieldVector< ctype, dim-1 > &local) const =0
A function mapping local coordinates on a boundary segment to world coordinates.
│ │ │ +
virtual ~BoundarySegment()
Dummy virtual destructor.
Definition boundarysegment.hh:104
│ │ │ +
Definition boundarysegment.hh:41
│ │ │ +
static std::unique_ptr< BoundarySegment > restore(ObjectStreamType &in)
create an object of BoundarySegment type from a previously registered factory linked to key.
Definition boundarysegment.hh:59
│ │ │ +
Dune::ParameterizedObjectFactory< std::unique_ptr< BoundarySegment >(ObjectStreamType &), int > FactoryType
type of factory creating a unique_ptr from an ObjectStreamType
Definition boundarysegment.hh:51
│ │ │ +
BndSeg BoundarySegment
type of BoundarySegment interface class
Definition boundarysegment.hh:48
│ │ │ +
std::stringstream ObjectStreamType
Definition boundarysegment.hh:44
│ │ │ +
static int registerFactory()
Definition boundarysegment.hh:70
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,222 +1,154 @@ │ │ │ │ dune-grid 2.10 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_r_i_d │ │ │ │ * _c_o_m_m_o_n │ │ │ │ -gridenums.hh │ │ │ │ +boundarysegment.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _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_GRIDENUMS_HH │ │ │ │ -6#define DUNE_GRID_COMMON_GRIDENUMS_HH │ │ │ │ +5#ifndef DUNE_GRID_COMMON_BOUNDARY_SEGMENT_HH │ │ │ │ +6#define DUNE_GRID_COMMON_BOUNDARY_SEGMENT_HH │ │ │ │ 7 │ │ │ │ -8#include │ │ │ │ -9 │ │ │ │ -10#include │ │ │ │ -11 │ │ │ │ -12namespace _D_u_n_e { │ │ │ │ -13 │ │ │ │ -_3_0 enum _P_a_r_t_i_t_i_o_n_T_y_p_e { │ │ │ │ -_3_1 _I_n_t_e_r_i_o_r_E_n_t_i_t_y=0, │ │ │ │ -_3_2 _B_o_r_d_e_r_E_n_t_i_t_y=1 , │ │ │ │ -_3_3 _O_v_e_r_l_a_p_E_n_t_i_t_y=2 , │ │ │ │ -_3_4 _F_r_o_n_t_E_n_t_i_t_y=3 , │ │ │ │ -35 _G_h_o_s_t_E_n_t_i_t_y=4 │ │ │ │ -_3_6 }; │ │ │ │ -37 │ │ │ │ -_4_6 inline std::string _P_a_r_t_i_t_i_o_n_N_a_m_e(_P_a_r_t_i_t_i_o_n_T_y_p_e type) │ │ │ │ -47 { │ │ │ │ -48 switch(type) { │ │ │ │ -49 case _I_n_t_e_r_i_o_r_E_n_t_i_t_y : │ │ │ │ -50 return "interior"; │ │ │ │ -51 case _B_o_r_d_e_r_E_n_t_i_t_y : │ │ │ │ -52 return "border"; │ │ │ │ -53 case _O_v_e_r_l_a_p_E_n_t_i_t_y : │ │ │ │ -54 return "overlap"; │ │ │ │ -55 case _F_r_o_n_t_E_n_t_i_t_y : │ │ │ │ -56 return "front"; │ │ │ │ -57 case _G_h_o_s_t_E_n_t_i_t_y : │ │ │ │ -58 return "ghost"; │ │ │ │ -59 default : │ │ │ │ -60 DUNE_THROW(NotImplemented, "name of unknown partition type requested"); │ │ │ │ -61 } │ │ │ │ -62 } │ │ │ │ -63 │ │ │ │ -65 │ │ │ │ -_7_2 inline std::ostream &_o_p_e_r_a_t_o_r_<_<_ ( std::ostream &out, const _P_a_r_t_i_t_i_o_n_T_y_p_e │ │ │ │ -&type ) │ │ │ │ -73 { │ │ │ │ -74 return out << _P_a_r_t_i_t_i_o_n_N_a_m_e( type ); │ │ │ │ -75 } │ │ │ │ -76 │ │ │ │ -77 │ │ │ │ -_8_6 enum _I_n_t_e_r_f_a_c_e_T_y_p_e { │ │ │ │ -_8_7 _I_n_t_e_r_i_o_r_B_o_r_d_e_r___I_n_t_e_r_i_o_r_B_o_r_d_e_r___I_n_t_e_r_f_a_c_e=0, │ │ │ │ -_8_8 _I_n_t_e_r_i_o_r_B_o_r_d_e_r___A_l_l___I_n_t_e_r_f_a_c_e=1, │ │ │ │ -_8_9 _O_v_e_r_l_a_p___O_v_e_r_l_a_p_F_r_o_n_t___I_n_t_e_r_f_a_c_e=2, │ │ │ │ -_9_0 _O_v_e_r_l_a_p___A_l_l___I_n_t_e_r_f_a_c_e=3, │ │ │ │ -91 _A_l_l___A_l_l___I_n_t_e_r_f_a_c_e=4 │ │ │ │ -_9_2 }; │ │ │ │ -93 │ │ │ │ -94 │ │ │ │ -96 │ │ │ │ -_1_0_3 inline std::ostream &_o_p_e_r_a_t_o_r_<_<_ ( std::ostream &out, const _I_n_t_e_r_f_a_c_e_T_y_p_e │ │ │ │ -&type ) │ │ │ │ -104 { │ │ │ │ -105 switch( type ) │ │ │ │ -106 { │ │ │ │ -107 case _I_n_t_e_r_i_o_r_B_o_r_d_e_r___I_n_t_e_r_i_o_r_B_o_r_d_e_r___I_n_t_e_r_f_a_c_e : │ │ │ │ -108 return out << "interior-border / interior-border interface"; │ │ │ │ -109 │ │ │ │ -110 case _I_n_t_e_r_i_o_r_B_o_r_d_e_r___A_l_l___I_n_t_e_r_f_a_c_e : │ │ │ │ -111 return out << "interior-border / all interface"; │ │ │ │ -112 │ │ │ │ -113 case _O_v_e_r_l_a_p___O_v_e_r_l_a_p_F_r_o_n_t___I_n_t_e_r_f_a_c_e : │ │ │ │ -114 return out << "overlap / overlap-front interface"; │ │ │ │ -115 │ │ │ │ -116 case _O_v_e_r_l_a_p___A_l_l___I_n_t_e_r_f_a_c_e : │ │ │ │ -117 return out << "overlap / all interface"; │ │ │ │ -118 │ │ │ │ -119 case _A_l_l___A_l_l___I_n_t_e_r_f_a_c_e : │ │ │ │ -120 return out << "all / all interface"; │ │ │ │ -121 │ │ │ │ -122 default : │ │ │ │ -123 return out << "unknown interface"; │ │ │ │ -124 } │ │ │ │ -125 } │ │ │ │ -126 │ │ │ │ -127 │ │ │ │ -_1_3_6 enum _P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_T_y_p_e { │ │ │ │ -_1_3_7 _I_n_t_e_r_i_o_r___P_a_r_t_i_t_i_o_n=0, │ │ │ │ -_1_3_8 _I_n_t_e_r_i_o_r_B_o_r_d_e_r___P_a_r_t_i_t_i_o_n=1, │ │ │ │ -_1_3_9 _O_v_e_r_l_a_p___P_a_r_t_i_t_i_o_n=2, │ │ │ │ -_1_4_0 _O_v_e_r_l_a_p_F_r_o_n_t___P_a_r_t_i_t_i_o_n=3, │ │ │ │ -_1_4_1 _A_l_l___P_a_r_t_i_t_i_o_n=4, │ │ │ │ -142 _G_h_o_s_t___P_a_r_t_i_t_i_o_n=5 │ │ │ │ -_1_4_3 }; │ │ │ │ -144 │ │ │ │ -145 │ │ │ │ -147 │ │ │ │ -_1_5_4 inline std::ostream &_o_p_e_r_a_t_o_r_<_<_ ( std::ostream &out, const │ │ │ │ -_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_T_y_p_e &type ) │ │ │ │ -155 { │ │ │ │ -156 static std::string name[ 6 ] = { "interior partition", "interior-border │ │ │ │ -partition", "overlap partition", │ │ │ │ -157 "overlap-front partition", "all partition", "ghost partition" }; │ │ │ │ -158 return out << name[ type ]; │ │ │ │ -159 } │ │ │ │ -160 │ │ │ │ -161 │ │ │ │ -_1_7_0 enum _C_o_m_m_u_n_i_c_a_t_i_o_n_D_i_r_e_c_t_i_o_n { │ │ │ │ -_1_7_1 _F_o_r_w_a_r_d_C_o_m_m_u_n_i_c_a_t_i_o_n, │ │ │ │ -172 _B_a_c_k_w_a_r_d_C_o_m_m_u_n_i_c_a_t_i_o_n │ │ │ │ -_1_7_3 }; │ │ │ │ -174 │ │ │ │ -180} │ │ │ │ -181#endif │ │ │ │ -_D_u_n_e_:_:_P_a_r_t_i_t_i_o_n_N_a_m_e │ │ │ │ -std::string PartitionName(PartitionType type) │ │ │ │ -Provide names for the partition types. │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:46 │ │ │ │ -_D_u_n_e_:_:_P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_T_y_p_e │ │ │ │ -PartitionIteratorType │ │ │ │ -Parameter to be used for the parallel level- and leaf iterators. │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:136 │ │ │ │ -_D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< │ │ │ │ -std::ostream & operator<<(std::ostream &out, const PartitionType &type) │ │ │ │ -write a PartitionType to a stream │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:72 │ │ │ │ -_D_u_n_e_:_:_P_a_r_t_i_t_i_o_n_T_y_p_e │ │ │ │ -PartitionType │ │ │ │ -Attributes used in the generic overlap model. │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:30 │ │ │ │ -_D_u_n_e_:_:_C_o_m_m_u_n_i_c_a_t_i_o_n_D_i_r_e_c_t_i_o_n │ │ │ │ -CommunicationDirection │ │ │ │ -Define a type for communication direction parameter. │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:170 │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_f_a_c_e_T_y_p_e │ │ │ │ -InterfaceType │ │ │ │ -Parameter to be used for the communication functions. │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:86 │ │ │ │ -_D_u_n_e_:_:_A_l_l___P_a_r_t_i_t_i_o_n │ │ │ │ -@ All_Partition │ │ │ │ -all entities │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:141 │ │ │ │ -_D_u_n_e_:_:_O_v_e_r_l_a_p_F_r_o_n_t___P_a_r_t_i_t_i_o_n │ │ │ │ -@ OverlapFront_Partition │ │ │ │ -interior, border, overlap and front entities │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:140 │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_i_o_r___P_a_r_t_i_t_i_o_n │ │ │ │ -@ Interior_Partition │ │ │ │ -only interior entities │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:137 │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_i_o_r_B_o_r_d_e_r___P_a_r_t_i_t_i_o_n │ │ │ │ -@ InteriorBorder_Partition │ │ │ │ -interior and border entities │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:138 │ │ │ │ -_D_u_n_e_:_:_O_v_e_r_l_a_p___P_a_r_t_i_t_i_o_n │ │ │ │ -@ Overlap_Partition │ │ │ │ -interior, border, and overlap entities │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:139 │ │ │ │ -_D_u_n_e_:_:_G_h_o_s_t___P_a_r_t_i_t_i_o_n │ │ │ │ -@ Ghost_Partition │ │ │ │ -only ghost entities │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:142 │ │ │ │ -_D_u_n_e_:_:_F_r_o_n_t_E_n_t_i_t_y │ │ │ │ -@ FrontEntity │ │ │ │ -on boundary between overlap and ghost │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:34 │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_i_o_r_E_n_t_i_t_y │ │ │ │ -@ InteriorEntity │ │ │ │ -all interior entities │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:31 │ │ │ │ -_D_u_n_e_:_:_G_h_o_s_t_E_n_t_i_t_y │ │ │ │ -@ GhostEntity │ │ │ │ -ghost entities │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:35 │ │ │ │ -_D_u_n_e_:_:_B_o_r_d_e_r_E_n_t_i_t_y │ │ │ │ -@ BorderEntity │ │ │ │ -on boundary between interior and overlap │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:32 │ │ │ │ -_D_u_n_e_:_:_O_v_e_r_l_a_p_E_n_t_i_t_y │ │ │ │ -@ OverlapEntity │ │ │ │ -all entities lying in the overlap zone │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:33 │ │ │ │ -_D_u_n_e_:_:_B_a_c_k_w_a_r_d_C_o_m_m_u_n_i_c_a_t_i_o_n │ │ │ │ -@ BackwardCommunication │ │ │ │ -reverse communication direction │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:172 │ │ │ │ -_D_u_n_e_:_:_F_o_r_w_a_r_d_C_o_m_m_u_n_i_c_a_t_i_o_n │ │ │ │ -@ ForwardCommunication │ │ │ │ -communicate as given in InterfaceType │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:171 │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_i_o_r_B_o_r_d_e_r___A_l_l___I_n_t_e_r_f_a_c_e │ │ │ │ -@ InteriorBorder_All_Interface │ │ │ │ -send interior and border, receive all entities │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:88 │ │ │ │ -_D_u_n_e_:_:_A_l_l___A_l_l___I_n_t_e_r_f_a_c_e │ │ │ │ -@ All_All_Interface │ │ │ │ -send all and receive all entities │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:91 │ │ │ │ -_D_u_n_e_:_:_O_v_e_r_l_a_p___A_l_l___I_n_t_e_r_f_a_c_e │ │ │ │ -@ Overlap_All_Interface │ │ │ │ -send overlap, receive all entities │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:90 │ │ │ │ -_D_u_n_e_:_:_O_v_e_r_l_a_p___O_v_e_r_l_a_p_F_r_o_n_t___I_n_t_e_r_f_a_c_e │ │ │ │ -@ Overlap_OverlapFront_Interface │ │ │ │ -send overlap, receive overlap and front entities │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:89 │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_i_o_r_B_o_r_d_e_r___I_n_t_e_r_i_o_r_B_o_r_d_e_r___I_n_t_e_r_f_a_c_e │ │ │ │ -@ InteriorBorder_InteriorBorder_Interface │ │ │ │ -send/receive interior and border entities │ │ │ │ -DDeeffiinniittiioonn gridenums.hh:87 │ │ │ │ +8#include │ │ │ │ +9#include │ │ │ │ +10 │ │ │ │ +11#include │ │ │ │ +12#include │ │ │ │ +13#include │ │ │ │ +14 │ │ │ │ +19namespace _D_u_n_e { │ │ │ │ +20 │ │ │ │ +36 template< int dim, int dimworld = dim, class ctype = double > │ │ │ │ +37 struct BoundarySegment; │ │ │ │ +38 │ │ │ │ +39 template │ │ │ │ +_4_0 class _B_o_u_n_d_a_r_y_S_e_g_m_e_n_t_B_a_c_k_u_p_R_e_s_t_o_r_e │ │ │ │ +41 { │ │ │ │ +42 public: │ │ │ │ +43 // type of object stream used for storing boundary segment information │ │ │ │ +_4_4 typedef std::stringstream _O_b_j_e_c_t_S_t_r_e_a_m_T_y_p_e ; │ │ │ │ +45 │ │ │ │ +46 protected: │ │ │ │ +_4_8 typedef BndSeg _B_o_u_n_d_a_r_y_S_e_g_m_e_n_t; │ │ │ │ +49 │ │ │ │ +_5_1 typedef Dune::ParameterizedObjectFactory< std::unique_ptr< BoundarySegment > │ │ │ │ +( _O_b_j_e_c_t_S_t_r_e_a_m_T_y_p_e& ), int > _F_a_c_t_o_r_y_T_y_p_e; │ │ │ │ +52 │ │ │ │ +_5_9 static std::unique_ptr< BoundarySegment > _r_e_s_t_o_r_e( _O_b_j_e_c_t_S_t_r_e_a_m_T_y_p_e& in ) │ │ │ │ +60 { │ │ │ │ +61 int key = -1; │ │ │ │ +62 // read class key for restore │ │ │ │ +63 in.read( (char *) &key, sizeof( int ) ); │ │ │ │ +64 │ │ │ │ +65 // factory creates a unique_ptr which can be released later on │ │ │ │ +66 return factory().create( key, in ); │ │ │ │ +67 } │ │ │ │ +68 │ │ │ │ +69 template │ │ │ │ +_7_0 static int _r_e_g_i_s_t_e_r_F_a_c_t_o_r_y() │ │ │ │ +71 { │ │ │ │ +72 const int key = createKey(); │ │ │ │ +73 // create factory method that produces unique_ptr │ │ │ │ +74 factory().template define< DerivedType >( key ); │ │ │ │ +75 // return key for storage in derived class │ │ │ │ +76 return key; │ │ │ │ +77 } │ │ │ │ +78 │ │ │ │ +79 private: │ │ │ │ +80 static int createKey() │ │ │ │ +81 { │ │ │ │ +82 static int key = 0; │ │ │ │ +83 return key++; │ │ │ │ +84 } │ │ │ │ +85 │ │ │ │ +86 static _F_a_c_t_o_r_y_T_y_p_e& factory() │ │ │ │ +87 { │ │ │ │ +88 return Dune::Singleton< FactoryType > :: instance(); │ │ │ │ +89 } │ │ │ │ +90 }; │ │ │ │ +91 │ │ │ │ +92 template< int dim, int dimworld, class ctype > │ │ │ │ +_9_3 struct _B_o_u_n_d_a_r_y_S_e_g_m_e_n_t : public _B_o_u_n_d_a_r_y_S_e_g_m_e_n_t_B_a_c_k_u_p_R_e_s_t_o_r_e< │ │ │ │ +BoundarySegment< dim, dimworld, ctype > > │ │ │ │ +94 { │ │ │ │ +_9_5 typedef _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_,_ _c_t_y_p_e_ _> _T_h_i_s_T_y_p_e; │ │ │ │ +_9_6 typedef _B_o_u_n_d_a_r_y_S_e_g_m_e_n_t_B_a_c_k_u_p_R_e_s_t_o_r_e_<_ _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_,_ _c_t_y_p_e │ │ │ │ +_> > _B_a_s_e_T_y_p_e; │ │ │ │ +97 │ │ │ │ +_9_8 typedef typename BaseType :: ObjectStreamType _O_b_j_e_c_t_S_t_r_e_a_m_T_y_p_e; │ │ │ │ +99 │ │ │ │ +100 using _B_a_s_e_T_y_p_e _:_:_ _r_e_s_t_o_r_e; │ │ │ │ +101 using _B_a_s_e_T_y_p_e _:_:_ _r_e_g_i_s_t_e_r_F_a_c_t_o_r_y; │ │ │ │ +102 │ │ │ │ +_1_0_4 virtual _~_B_o_u_n_d_a_r_y_S_e_g_m_e_n_t() {} │ │ │ │ +105 │ │ │ │ +108 virtual FieldVector< ctype, dimworld > │ │ │ │ +_1_0_9 _o_p_e_r_a_t_o_r_(_)_ ( const FieldVector< ctype, dim-1> &local ) const = 0; │ │ │ │ +110 │ │ │ │ +_1_1_4 virtual void _b_a_c_k_u_p( [[maybe_unused]] _O_b_j_e_c_t_S_t_r_e_a_m_T_y_p_e& buffer ) const │ │ │ │ +115 { │ │ │ │ +116 DUNE_THROW(NotImplemented,"BoundarySegment::backup needs to be │ │ │ │ +overloaded!"); │ │ │ │ +117 } │ │ │ │ +118 }; │ │ │ │ +119 │ │ │ │ +120 │ │ │ │ +121} // end namespace Dune │ │ │ │ +122 │ │ │ │ +123#endif │ │ │ │ _D_u_n_e │ │ │ │ Include standard header files. │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ +_D_u_n_e_:_:_B_o_u_n_d_a_r_y_S_e_g_m_e_n_t_:_:_O_b_j_e_c_t_S_t_r_e_a_m_T_y_p_e │ │ │ │ +BaseType::ObjectStreamType ObjectStreamType │ │ │ │ +DDeeffiinniittiioonn boundarysegment.hh:98 │ │ │ │ +_D_u_n_e_:_:_B_o_u_n_d_a_r_y_S_e_g_m_e_n_t_:_:_T_h_i_s_T_y_p_e │ │ │ │ +BoundarySegment< dim, dimworld, ctype > ThisType │ │ │ │ +DDeeffiinniittiioonn boundarysegment.hh:95 │ │ │ │ +_D_u_n_e_:_:_B_o_u_n_d_a_r_y_S_e_g_m_e_n_t_:_:_b_a_c_k_u_p │ │ │ │ +virtual void backup(ObjectStreamType &buffer) const │ │ │ │ +write BoundarySegment's data to stream buffer │ │ │ │ +DDeeffiinniittiioonn boundarysegment.hh:114 │ │ │ │ +_D_u_n_e_:_:_B_o_u_n_d_a_r_y_S_e_g_m_e_n_t_:_:_B_a_s_e_T_y_p_e │ │ │ │ +BoundarySegmentBackupRestore< BoundarySegment< dim, dimworld, ctype > > │ │ │ │ +BaseType │ │ │ │ +DDeeffiinniittiioonn boundarysegment.hh:96 │ │ │ │ +_D_u_n_e_:_:_B_o_u_n_d_a_r_y_S_e_g_m_e_n_t_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ +virtual FieldVector< ctype, dimworld > operator()(const FieldVector< ctype, │ │ │ │ +dim-1 > &local) const =0 │ │ │ │ +A function mapping local coordinates on a boundary segment to world │ │ │ │ +coordinates. │ │ │ │ +_D_u_n_e_:_:_B_o_u_n_d_a_r_y_S_e_g_m_e_n_t_:_:_~_B_o_u_n_d_a_r_y_S_e_g_m_e_n_t │ │ │ │ +virtual ~BoundarySegment() │ │ │ │ +Dummy virtual destructor. │ │ │ │ +DDeeffiinniittiioonn boundarysegment.hh:104 │ │ │ │ +_D_u_n_e_:_:_B_o_u_n_d_a_r_y_S_e_g_m_e_n_t_B_a_c_k_u_p_R_e_s_t_o_r_e │ │ │ │ +DDeeffiinniittiioonn boundarysegment.hh:41 │ │ │ │ +_D_u_n_e_:_:_B_o_u_n_d_a_r_y_S_e_g_m_e_n_t_B_a_c_k_u_p_R_e_s_t_o_r_e_:_:_r_e_s_t_o_r_e │ │ │ │ +static std::unique_ptr< BoundarySegment > restore(ObjectStreamType &in) │ │ │ │ +create an object of BoundarySegment type from a previously registered factory │ │ │ │ +linked to key. │ │ │ │ +DDeeffiinniittiioonn boundarysegment.hh:59 │ │ │ │ +_D_u_n_e_:_:_B_o_u_n_d_a_r_y_S_e_g_m_e_n_t_B_a_c_k_u_p_R_e_s_t_o_r_e_:_:_F_a_c_t_o_r_y_T_y_p_e │ │ │ │ +Dune::ParameterizedObjectFactory< std::unique_ptr< BoundarySegment > │ │ │ │ +(ObjectStreamType &), int > FactoryType │ │ │ │ +type of factory creating a unique_ptr from an ObjectStreamType │ │ │ │ +DDeeffiinniittiioonn boundarysegment.hh:51 │ │ │ │ +_D_u_n_e_:_:_B_o_u_n_d_a_r_y_S_e_g_m_e_n_t_B_a_c_k_u_p_R_e_s_t_o_r_e_:_:_B_o_u_n_d_a_r_y_S_e_g_m_e_n_t │ │ │ │ +BndSeg BoundarySegment │ │ │ │ +type of BoundarySegment interface class │ │ │ │ +DDeeffiinniittiioonn boundarysegment.hh:48 │ │ │ │ +_D_u_n_e_:_:_B_o_u_n_d_a_r_y_S_e_g_m_e_n_t_B_a_c_k_u_p_R_e_s_t_o_r_e_:_:_O_b_j_e_c_t_S_t_r_e_a_m_T_y_p_e │ │ │ │ +std::stringstream ObjectStreamType │ │ │ │ +DDeeffiinniittiioonn boundarysegment.hh:44 │ │ │ │ +_D_u_n_e_:_:_B_o_u_n_d_a_r_y_S_e_g_m_e_n_t_B_a_c_k_u_p_R_e_s_t_o_r_e_:_:_r_e_g_i_s_t_e_r_F_a_c_t_o_r_y │ │ │ │ +static int registerFactory() │ │ │ │ +DDeeffiinniittiioonn boundarysegment.hh:70 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00338.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: datahandleif.hh File Reference │ │ │ +dune-grid: mapper.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,42 +72,40 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
datahandleif.hh File Reference
│ │ │ +
mapper.hh File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

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

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

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

Go to the source code of this file.

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

│ │ │ Classes

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

│ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │

Detailed Description

│ │ │ -

Describes the parallel communication interface class for MessageBuffers and DataHandles.

│ │ │ -
Author
Robert Kloefkorn
│ │ │ +

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

│ │ │ +
Author
Peter Bastian
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -2,40 +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 │ │ │ │ -datahandleif.hh File Reference │ │ │ │ -Describes the parallel communication interface class for MessageBuffers and │ │ │ │ -DataHandles. _M_o_r_e_._._. │ │ │ │ +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_:_:_M_e_s_s_a_g_e_B_u_f_f_e_r_I_F_<_ _M_e_s_s_a_g_e_B_u_f_f_e_r_I_m_p_ _> │ │ │ │ - Communication message buffer interface. This class describes the │ │ │ │ - interface for reading and writing data to the communication message │ │ │ │ - buffer. As message buffers might be deeply implemented in various │ │ │ │ -  packages the message buffers implementations cannot be derived from │ │ │ │ - this interface class. Therefore we just apply the engine concept to │ │ │ │ - wrap the message buffer call and make sure that the interface is │ │ │ │ - fulfilled. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -class   _D_u_n_e_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F_<_ _D_a_t_a_H_a_n_d_l_e_I_m_p_,_ _D_a_t_a_T_y_p_e_I_m_p_ _> │ │ │ │ - _C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F describes the features of a data handle for │ │ │ │ - communication in parallel runs using the Grid::communicate methods. │ │ │ │ -  Here the Barton-Nackman trick is used to interpret data handle objects │ │ │ │ - as its interface. Therefore usable data handle classes need to be │ │ │ │ - derived from this class. _M_o_r_e_._._. │ │ │ │ +class   _D_u_n_e_:_:_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 ********** │ │ │ │ -Describes the parallel communication interface class for MessageBuffers and │ │ │ │ -DataHandles. │ │ │ │ +Provides classes with basic mappers which are used to attach data to a grid. │ │ │ │ Author │ │ │ │ - Robert Kloefkorn │ │ │ │ + Peter Bastian │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00338_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: datahandleif.hh Source File │ │ │ +dune-grid: mapper.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,139 +74,114 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
datahandleif.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_DATAHANDLEIF_HH
│ │ │ -
6#define DUNE_GRID_COMMON_DATAHANDLEIF_HH
│ │ │ +
5#ifndef DUNE_GRID_COMMON_MAPPER_HH
│ │ │ +
6#define DUNE_GRID_COMMON_MAPPER_HH
│ │ │
7
│ │ │ -
14#include <dune/common/bartonnackmanifcheck.hh>
│ │ │ -
15
│ │ │ -
16namespace Dune
│ │ │ -
17{
│ │ │ -
18
│ │ │ -
31 template <class MessageBufferImp>
│ │ │ -
│ │ │ - │ │ │ -
33 {
│ │ │ -
34 MessageBufferImp & buff_;
│ │ │ -
35 public:
│ │ │ -
37 MessageBufferIF(MessageBufferImp & buff) : buff_(buff) {}
│ │ │ -
38
│ │ │ -
44 template <class T>
│ │ │ -
│ │ │ -
45 void write(const T & val)
│ │ │ -
46 {
│ │ │ -
47 buff_.write(val);
│ │ │ -
48 }
│ │ │ -
│ │ │ -
49
│ │ │ -
58 template <class T>
│ │ │ -
│ │ │ -
59 void read(T & val)
│ │ │ -
60 {
│ │ │ -
61 buff_.read(val);
│ │ │ -
62 }
│ │ │ -
│ │ │ -
63 }; // end class MessageBufferIF
│ │ │ -
│ │ │ -
64
│ │ │ -
65
│ │ │ -
76 template <class DataHandleImp, class DataTypeImp>
│ │ │ -
│ │ │ - │ │ │ -
78 {
│ │ │ -
79
│ │ │ -
80 public:
│ │ │ -
82 typedef DataTypeImp DataType;
│ │ │ -
83
│ │ │ -
84 protected:
│ │ │ -
85 // one should not create an explicit instance of this interface object
│ │ │ - │ │ │ -
87
│ │ │ -
88 public:
│ │ │ -
│ │ │ -
94 bool contains (int dim, int codim) const
│ │ │ -
95 {
│ │ │ -
96 CHECK_INTERFACE_IMPLEMENTATION((asImp().contains(dim,codim)));
│ │ │ -
97 return asImp().contains(dim,codim);
│ │ │ -
98 }
│ │ │ -
│ │ │ -
99
│ │ │ -
│ │ │ -
107 bool fixedSize (int dim, int codim) const
│ │ │ -
108 {
│ │ │ -
109 CHECK_INTERFACE_IMPLEMENTATION((asImp().fixedSize(dim, codim)));
│ │ │ -
110 return asImp().fixedSize(dim, codim);
│ │ │ -
111 }
│ │ │ -
│ │ │ +
8#include <utility>
│ │ │ +
9
│ │ │ +
10#include <dune/common/bartonnackmanifcheck.hh>
│ │ │ +
11
│ │ │ +
89namespace Dune
│ │ │ +
90{
│ │ │ +
108 template <typename G, typename MapperImp, typename IndexType=int>
│ │ │ +
│ │ │ +
109 class Mapper
│ │ │ +
110 {
│ │ │ +
111 public:
│ │ │
112
│ │ │ -
117 template<class EntityType>
│ │ │ -
│ │ │ -
118 size_t size (const EntityType& e) const
│ │ │ -
119 {
│ │ │ -
120 CHECK_INTERFACE_IMPLEMENTATION((asImp().size(e)));
│ │ │ -
121 return asImp().size(e);
│ │ │ -
122 }
│ │ │ -
│ │ │ -
123
│ │ │ -
128 template<class MessageBufferImp, class EntityType>
│ │ │ -
│ │ │ -
129 void gather (MessageBufferImp& buff, const EntityType& e) const
│ │ │ -
130 {
│ │ │ - │ │ │ -
132 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp().gather(buffIF,e)));
│ │ │ -
133 }
│ │ │ -
│ │ │ -
134
│ │ │ -
142 template<class MessageBufferImp, class EntityType>
│ │ │ -
│ │ │ -
143 void scatter (MessageBufferImp& buff, const EntityType& e, size_t n)
│ │ │ -
144 {
│ │ │ - │ │ │ -
146 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp().scatter(buffIF,e,n)));
│ │ │ -
147 }
│ │ │ -
│ │ │ -
148
│ │ │ -
149 private:
│ │ │ -
151 DataHandleImp& asImp () {return static_cast<DataHandleImp &> (*this);}
│ │ │ -
153 const DataHandleImp& asImp () const
│ │ │ -
154 {
│ │ │ -
155 return static_cast<const DataHandleImp &>(*this);
│ │ │ +
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 }; // end class CommDataHandleIF
│ │ │
│ │ │ +
157
│ │ │
158
│ │ │ -
159#undef CHECK_INTERFACE_IMPLEMENTATION
│ │ │ -
160#undef CHECK_AND_CALL_INTERFACE_IMPLEMENTATION
│ │ │ -
161
│ │ │ -
162} // end namespace Dune
│ │ │ -
163#endif
│ │ │ +
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
│ │ │ -
Communication message buffer interface. This class describes the interface for reading and writing da...
Definition datahandleif.hh:33
│ │ │ -
MessageBufferIF(MessageBufferImp &buff)
stores reference to original buffer buff
Definition datahandleif.hh:37
│ │ │ -
void write(const T &val)
just wraps the call of the internal buffer method write which writes the data of type T from the buff...
Definition datahandleif.hh:45
│ │ │ -
void read(T &val)
just wraps the call of the internal buffer method read which reads the data of type T from the buffer...
Definition datahandleif.hh:59
│ │ │ -
CommDataHandleIF describes the features of a data handle for communication in parallel runs using the...
Definition datahandleif.hh:78
│ │ │ -
CommDataHandleIF()
Definition datahandleif.hh:86
│ │ │ -
void scatter(MessageBufferImp &buff, const EntityType &e, size_t n)
unpack data from message buffer to user.
Definition datahandleif.hh:143
│ │ │ -
bool contains(int dim, int codim) const
returns true if data for given valid codim should be communicated
Definition datahandleif.hh:94
│ │ │ -
size_t size(const EntityType &e) const
how many objects of type DataType have to be sent for a given entity
Definition datahandleif.hh:118
│ │ │ -
void gather(MessageBufferImp &buff, const EntityType &e) const
pack data from user to message buffer
Definition datahandleif.hh:129
│ │ │ -
bool fixedSize(int dim, int codim) const
returns true if size of data per entity of given dim and codim is a constant
Definition datahandleif.hh:107
│ │ │ -
DataTypeImp DataType
data type of data to communicate
Definition datahandleif.hh:82
│ │ │ +
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,155 +1,129 @@ │ │ │ │ dune-grid 2.10 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_r_i_d │ │ │ │ * _c_o_m_m_o_n │ │ │ │ -datahandleif.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_DATAHANDLEIF_HH │ │ │ │ -6#define DUNE_GRID_COMMON_DATAHANDLEIF_HH │ │ │ │ +5#ifndef DUNE_GRID_COMMON_MAPPER_HH │ │ │ │ +6#define DUNE_GRID_COMMON_MAPPER_HH │ │ │ │ 7 │ │ │ │ -14#include │ │ │ │ -15 │ │ │ │ -16namespace _D_u_n_e │ │ │ │ -17{ │ │ │ │ -18 │ │ │ │ -31 template │ │ │ │ -_3_2 class _M_e_s_s_a_g_e_B_u_f_f_e_r_I_F │ │ │ │ -33 { │ │ │ │ -34 MessageBufferImp & buff_; │ │ │ │ -35 public: │ │ │ │ -_3_7 _M_e_s_s_a_g_e_B_u_f_f_e_r_I_F(MessageBufferImp & buff) : buff_(buff) {} │ │ │ │ -38 │ │ │ │ -44 template │ │ │ │ -_4_5 void _w_r_i_t_e(const T & val) │ │ │ │ -46 { │ │ │ │ -47 buff_.write(val); │ │ │ │ -48 } │ │ │ │ -49 │ │ │ │ -58 template │ │ │ │ -_5_9 void _r_e_a_d(T & val) │ │ │ │ -60 { │ │ │ │ -61 buff_.read(val); │ │ │ │ -62 } │ │ │ │ -63 }; // end class MessageBufferIF │ │ │ │ -64 │ │ │ │ -65 │ │ │ │ -76 template │ │ │ │ -_7_7 class _C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F │ │ │ │ -78 { │ │ │ │ -79 │ │ │ │ -80 public: │ │ │ │ -_8_2 typedef DataTypeImp _D_a_t_a_T_y_p_e; │ │ │ │ -83 │ │ │ │ -84 protected: │ │ │ │ -85 // one should not create an explicit instance of this interface object │ │ │ │ -_8_6 _C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F() {} │ │ │ │ -87 │ │ │ │ -88 public: │ │ │ │ -_9_4 bool _c_o_n_t_a_i_n_s (int dim, int codim) const │ │ │ │ -95 { │ │ │ │ -96 CHECK_INTERFACE_IMPLEMENTATION((asImp()._c_o_n_t_a_i_n_s(dim,codim))); │ │ │ │ -97 return asImp().contains(dim,codim); │ │ │ │ -98 } │ │ │ │ -99 │ │ │ │ -_1_0_7 bool _f_i_x_e_d_S_i_z_e (int dim, int codim) const │ │ │ │ -108 { │ │ │ │ -109 CHECK_INTERFACE_IMPLEMENTATION((asImp()._f_i_x_e_d_S_i_z_e(dim, codim))); │ │ │ │ -110 return asImp().fixedSize(dim, codim); │ │ │ │ -111 } │ │ │ │ +8#include │ │ │ │ +9 │ │ │ │ +10#include │ │ │ │ +11 │ │ │ │ +89namespace _D_u_n_e │ │ │ │ +90{ │ │ │ │ +108 template │ │ │ │ +_1_0_9 class _M_a_p_p_e_r │ │ │ │ +110 { │ │ │ │ +111 public: │ │ │ │ 112 │ │ │ │ -117 template │ │ │ │ -_1_1_8 size_t _s_i_z_e (const EntityType& e) const │ │ │ │ -119 { │ │ │ │ -120 CHECK_INTERFACE_IMPLEMENTATION((asImp()._s_i_z_e(e))); │ │ │ │ -121 return asImp().size(e); │ │ │ │ -122 } │ │ │ │ -123 │ │ │ │ -128 template │ │ │ │ -_1_2_9 void _g_a_t_h_e_r (MessageBufferImp& buff, const EntityType& e) const │ │ │ │ -130 { │ │ │ │ -131 _M_e_s_s_a_g_e_B_u_f_f_e_r_I_F_<_M_e_s_s_a_g_e_B_u_f_f_e_r_I_m_p_> buffIF(buff); │ │ │ │ -132 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp()._g_a_t_h_e_r(buffIF,e))); │ │ │ │ -133 } │ │ │ │ -134 │ │ │ │ -142 template │ │ │ │ -_1_4_3 void _s_c_a_t_t_e_r (MessageBufferImp& buff, const EntityType& e, size_t n) │ │ │ │ -144 { │ │ │ │ -145 _M_e_s_s_a_g_e_B_u_f_f_e_r_I_F_<_M_e_s_s_a_g_e_B_u_f_f_e_r_I_m_p_> buffIF(buff); │ │ │ │ -146 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp()._s_c_a_t_t_e_r(buffIF,e,n))); │ │ │ │ -147 } │ │ │ │ -148 │ │ │ │ -149 private: │ │ │ │ -151 DataHandleImp& asImp () {return static_cast (*this);} │ │ │ │ -153 const DataHandleImp& asImp () const │ │ │ │ -154 { │ │ │ │ -155 return static_cast(*this); │ │ │ │ +_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 }; // end class CommDataHandleIF │ │ │ │ +157 │ │ │ │ 158 │ │ │ │ -159#undef CHECK_INTERFACE_IMPLEMENTATION │ │ │ │ -160#undef CHECK_AND_CALL_INTERFACE_IMPLEMENTATION │ │ │ │ -161 │ │ │ │ -162} // end namespace Dune │ │ │ │ -163#endif │ │ │ │ +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_:_:_M_e_s_s_a_g_e_B_u_f_f_e_r_I_F │ │ │ │ -Communication message buffer interface. This class describes the interface for │ │ │ │ -reading and writing da... │ │ │ │ -DDeeffiinniittiioonn datahandleif.hh:33 │ │ │ │ -_D_u_n_e_:_:_M_e_s_s_a_g_e_B_u_f_f_e_r_I_F_:_:_M_e_s_s_a_g_e_B_u_f_f_e_r_I_F │ │ │ │ -MessageBufferIF(MessageBufferImp &buff) │ │ │ │ -stores reference to original buffer buff │ │ │ │ -DDeeffiinniittiioonn datahandleif.hh:37 │ │ │ │ -_D_u_n_e_:_:_M_e_s_s_a_g_e_B_u_f_f_e_r_I_F_:_:_w_r_i_t_e │ │ │ │ -void write(const T &val) │ │ │ │ -just wraps the call of the internal buffer method write which writes the data │ │ │ │ -of type T from the buff... │ │ │ │ -DDeeffiinniittiioonn datahandleif.hh:45 │ │ │ │ -_D_u_n_e_:_:_M_e_s_s_a_g_e_B_u_f_f_e_r_I_F_:_:_r_e_a_d │ │ │ │ -void read(T &val) │ │ │ │ -just wraps the call of the internal buffer method read which reads the data of │ │ │ │ -type T from the buffer... │ │ │ │ -DDeeffiinniittiioonn datahandleif.hh:59 │ │ │ │ -_D_u_n_e_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F │ │ │ │ -CommDataHandleIF describes the features of a data handle for communication in │ │ │ │ -parallel runs using the... │ │ │ │ -DDeeffiinniittiioonn datahandleif.hh:78 │ │ │ │ -_D_u_n_e_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F │ │ │ │ -CommDataHandleIF() │ │ │ │ -DDeeffiinniittiioonn datahandleif.hh:86 │ │ │ │ -_D_u_n_e_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F_:_:_s_c_a_t_t_e_r │ │ │ │ -void scatter(MessageBufferImp &buff, const EntityType &e, size_t n) │ │ │ │ -unpack data from message buffer to user. │ │ │ │ -DDeeffiinniittiioonn datahandleif.hh:143 │ │ │ │ -_D_u_n_e_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F_:_:_c_o_n_t_a_i_n_s │ │ │ │ -bool contains(int dim, int codim) const │ │ │ │ -returns true if data for given valid codim should be communicated │ │ │ │ -DDeeffiinniittiioonn datahandleif.hh:94 │ │ │ │ -_D_u_n_e_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F_:_:_s_i_z_e │ │ │ │ -size_t size(const EntityType &e) const │ │ │ │ -how many objects of type DataType have to be sent for a given entity │ │ │ │ -DDeeffiinniittiioonn datahandleif.hh:118 │ │ │ │ -_D_u_n_e_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F_:_:_g_a_t_h_e_r │ │ │ │ -void gather(MessageBufferImp &buff, const EntityType &e) const │ │ │ │ -pack data from user to message buffer │ │ │ │ -DDeeffiinniittiioonn datahandleif.hh:129 │ │ │ │ -_D_u_n_e_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F_:_:_f_i_x_e_d_S_i_z_e │ │ │ │ -bool fixedSize(int dim, int codim) const │ │ │ │ -returns true if size of data per entity of given dim and codim is a constant │ │ │ │ -DDeeffiinniittiioonn datahandleif.hh:107 │ │ │ │ -_D_u_n_e_:_:_C_o_m_m_D_a_t_a_H_a_n_d_l_e_I_F_:_:_D_a_t_a_T_y_p_e │ │ │ │ -DataTypeImp DataType │ │ │ │ -data type of data to communicate │ │ │ │ -DDeeffiinniittiioonn datahandleif.hh:82 │ │ │ │ +_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/a00359.html │ │ │ @@ -79,17 +79,17 @@ │ │ │
boundaryprojection.hh File Reference
│ │ │
│ │ │
│ │ │
#include <cmath>
│ │ │ #include <memory>
│ │ │ #include <dune/common/fvector.hh>
│ │ │ #include <dune/geometry/multilineargeometry.hh>
│ │ │ -#include <dune/grid/common/boundarysegment.hh>
│ │ │ -#include <dune/grid/common/datahandleif.hh>
│ │ │ -#include <dune/grid/io/file/gmshreader.hh>
│ │ │ +#include <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.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00359_source.html │ │ │ @@ -93,17 +93,17 @@ │ │ │
10#include <memory>
│ │ │
11
│ │ │
12//- Dune includes
│ │ │
13#include <dune/common/fvector.hh>
│ │ │
14
│ │ │
15#include <dune/geometry/multilineargeometry.hh>
│ │ │
16
│ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │
20
│ │ │
21namespace Dune
│ │ │
22{
│ │ │
25 template <int dimworld>
│ │ │
26 struct DuneBoundaryProjection;
│ │ │
27
│ │ │
30 template <int dimworld>
│ │ │ @@ -359,17 +359,17 @@ │ │ │
264 const double radius_;
│ │ │
265 };
│ │ │ │ │ │
266
│ │ │
267} // end namespace
│ │ │
268
│ │ │
269#endif // #ifndef DUNE_GRID_COMMON_BOUNDARYPROJECTION_HH
│ │ │ -
Describes the parallel communication interface class for MessageBuffers and DataHandles.
│ │ │ -
Base class for grid boundary segments of arbitrary geometry.
│ │ │ - │ │ │ +
Describes the parallel communication interface class for MessageBuffers and DataHandles.
│ │ │ +
Base class for grid boundary segments of arbitrary geometry.
│ │ │ + │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │
Interface class for vertex projection at the boundary.
Definition boundaryprojection.hh:33
│ │ │
DuneBoundaryProjection< dimworld > ThisType
Definition boundaryprojection.hh:34
│ │ │
virtual void backup(ObjectStreamType &buffer) const
write DuneBoundaryProjection's data to stream buffer
Definition boundaryprojection.hh:52
│ │ │
static std::unique_ptr< ThisType > restoreFromBuffer(MessageBufferIF< BufferImp > &buffer)
Definition boundaryprojection.hh:85
│ │ │
virtual CoordinateType operator()(const CoordinateType &global) const =0
projection operator projection a global coordinate
│ │ │
void toBuffer(BufferImp &buffer) const
Definition boundaryprojection.hh:58
│ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00569.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: iterator.hh File Reference │ │ │ +dune-grid: cachedcoordfunction.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,46 +72,32 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
iterator.hh File Reference
│ │ │ +
cachedcoordfunction.hh File Reference
│ │ │
│ │ │
│ │ │
#include <cassert>
│ │ │ -#include <type_traits>
│ │ │ -#include <utility>
│ │ │ -#include <dune/geometry/referenceelements.hh>
│ │ │ +#include <memory>
│ │ │ +#include <dune/common/typetraits.hh>
│ │ │ +#include <dune/grid/common/gridenums.hh>
│ │ │ #include <dune/grid/geometrygrid/capabilities.hh>
│ │ │ -#include <dune/grid/geometrygrid/declaration.hh>
│ │ │ -#include <dune/grid/geometrygrid/entity.hh>
│ │ │ +#include <dune/grid/geometrygrid/coordfunctioncaller.hh>
│ │ │ +#include <dune/grid/utility/persistentcontainer.hh>
│ │ │
│ │ │

Go to the source code of this file.

│ │ │

│ │ │ Classes

struct  Dune::DuneBoundaryProjection< dimworld >
 Interface class for vertex projection at the boundary. More...
│ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ │ │ │

│ │ │ Classes

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

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/a00593_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 │ │ │ │ +_c_o_o_r_d_f_u_n_c_t_i_o_n_._h_h │ │ │ │ +_h_o_s_t_c_o_r_n_e_r_s_._h_h │ │ │ │ _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/a00602.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: coordfunctioncaller.hh File Reference │ │ │ +dune-grid: idset.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,23 +70,28 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ +Classes | │ │ │ Namespaces
│ │ │ -
coordfunctioncaller.hh File Reference
│ │ │ +
idset.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <dune/grid/geometrygrid/hostcorners.hh>
│ │ │ -#include <dune/grid/geometrygrid/coordfunction.hh>
│ │ │ +
#include <dune/grid/common/indexidset.hh>
│ │ │
│ │ │

Go to the source code of this file.

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

│ │ │ +Classes

class  Dune::GeoGrid::IdSet< Grid, HostIdSet >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,19 +1,21 @@ │ │ │ │ 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 │ │ │ │ +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_:_:_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/a00602_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: coordfunctioncaller.hh Source File │ │ │ +dune-grid: idset.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,123 +74,132 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
coordfunctioncaller.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_COORDFUNCTIONCALLER_HH
│ │ │ -
6#define DUNE_GEOGRID_COORDFUNCTIONCALLER_HH
│ │ │ +
5#ifndef DUNE_GEOGRID_IDSET_HH
│ │ │ +
6#define DUNE_GEOGRID_IDSET_HH
│ │ │
7
│ │ │ - │ │ │ - │ │ │ -
10
│ │ │ -
11namespace Dune
│ │ │ -
12{
│ │ │ -
13
│ │ │ -
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;
│ │ │ + │ │ │ +
9
│ │ │ +
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 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 }
│ │ │ +
31 using Base::subId;
│ │ │ +
32
│ │ │ +
│ │ │ + │ │ │ +
34 : hostIdSet_( 0 )
│ │ │ +
35 {}
│ │ │ +
│ │ │ +
36
│ │ │ +
│ │ │ +
37 explicit IdSet ( const HostIdSet &hostIdSet )
│ │ │ +
38 : hostIdSet_( &hostIdSet )
│ │ │ +
39 {}
│ │ │ +
│ │ │ +
40
│ │ │ +
│ │ │ +
41 IdSet ( const This &other )
│ │ │ +
42 : hostIdSet_( other.hostIdSet_ )
│ │ │ +
43 {}
│ │ │ +
│ │ │
44
│ │ │ -
45 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;
│ │ │ +
│ │ │ +
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 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 }
│ │ │ +
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 GeometryType type () const
│ │ │ -
81 {
│ │ │ -
82 return hostEntity_.type();
│ │ │ -
83 }
│ │ │ -
84
│ │ │ -
85 std::size_t size () const
│ │ │ -
86 {
│ │ │ -
87 auto refElement = referenceElement< ct, HostEntity::mydimension >( type() );
│ │ │ -
88 return refElement.size( HostEntity::mydimension );
│ │ │ -
89 }
│ │ │ -
90
│ │ │ -
91 private:
│ │ │ -
92 const HostEntity &hostEntity_;
│ │ │ -
93 const CoordFunctionInterface &coordFunction_;
│ │ │ -
94 };
│ │ │ -
95
│ │ │ -
96 } // namespace GeoGrid
│ │ │ -
97
│ │ │ -
98} // namespace Dune
│ │ │ -
99
│ │ │ -
100#endif // #ifndef DUNE_GEOGRID_COORDFUNCTIONCALLER_HH
│ │ │ - │ │ │ - │ │ │ +
80 } // namespace GeoGrid
│ │ │ +
81
│ │ │ +
82} // namespace Dune
│ │ │ +
83
│ │ │ +
84#endif // #ifndef DUNE_GEOGRID_IDSET_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
│ │ │ +
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,132 +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 │ │ │ │ -coordfunctioncaller.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_COORDFUNCTIONCALLER_HH │ │ │ │ -6#define DUNE_GEOGRID_COORDFUNCTIONCALLER_HH │ │ │ │ +5#ifndef DUNE_GEOGRID_IDSET_HH │ │ │ │ +6#define DUNE_GEOGRID_IDSET_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 │ │ │ │ -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; │ │ │ │ +8#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_i_n_d_e_x_i_d_s_e_t_._h_h> │ │ │ │ +9 │ │ │ │ +10namespace _D_u_n_e │ │ │ │ +11{ │ │ │ │ +12 │ │ │ │ +13 namespace GeoGrid │ │ │ │ +14 { │ │ │ │ +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 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 } │ │ │ │ +31 using _B_a_s_e_:_:_s_u_b_I_d; │ │ │ │ +32 │ │ │ │ +_3_3 _I_d_S_e_t () │ │ │ │ +34 : hostIdSet_( 0 ) │ │ │ │ +35 {} │ │ │ │ +36 │ │ │ │ +_3_7 explicit _I_d_S_e_t ( const HostIdSet &hostIdSet ) │ │ │ │ +38 : hostIdSet_( &hostIdSet ) │ │ │ │ +39 {} │ │ │ │ +40 │ │ │ │ +_4_1 _I_d_S_e_t ( const _T_h_i_s &other ) │ │ │ │ +42 : hostIdSet_( other.hostIdSet_ ) │ │ │ │ +43 {} │ │ │ │ 44 │ │ │ │ -45 GeometryType type () const │ │ │ │ +_4_5 const _T_h_i_s &_o_p_e_r_a_t_o_r_=_ ( const _T_h_i_s &other ) │ │ │ │ 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; │ │ │ │ +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 │ │ │ │ -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 } │ │ │ │ +_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 _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 │ │ │ │ +80 } // namespace GeoGrid │ │ │ │ +81 │ │ │ │ +82} // namespace Dune │ │ │ │ +83 │ │ │ │ +84#endif // #ifndef DUNE_GEOGRID_IDSET_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_:_:_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/a00614.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: undefine-3.0.hh File Reference │ │ │ +dune-grid: entity.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -69,25 +69,49 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
undefine-3.0.hh File Reference
│ │ │ +
│ │ │ +Namespaces | │ │ │ +Macros
│ │ │ +
entity.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.

│ │ │ -
│ │ │ +

│ │ │ Namespaces

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

│ │ │ +Namespaces

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

│ │ │ +Macros

#define DUNE_ALBERTA_ENTITY_CC
 
│ │ │ +

Macro Definition Documentation

│ │ │ + │ │ │ +

◆ DUNE_ALBERTA_ENTITY_CC

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define DUNE_ALBERTA_ENTITY_CC
│ │ │ +
│ │ │ + │ │ │ +
│ │ │ +
│ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,15 +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 │ │ │ │ -undefine-3.0.hh File Reference │ │ │ │ -Contains #undefs for all preprocessor macros defined by alberta. _M_o_r_e_._._. │ │ │ │ +_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_. │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Contains #undefs for all preprocessor macros defined by alberta. │ │ │ │ -This file is created automatically by the perl script undefAllMacros.pl. │ │ │ │ +NNaammeessppaacceess │ │ │ │ +namespace   _D_u_n_e │ │ │ │ +  Include standard header files. │ │ │ │ +  │ │ │ │ +MMaaccrrooss │ │ │ │ +#define  _D_U_N_E___A_L_B_E_R_T_A___E_N_T_I_T_Y___C_C │ │ │ │ +  │ │ │ │ +********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ +********** _?◆_? DDUUNNEE__AALLBBEERRTTAA__EENNTTIITTYY__CCCC ********** │ │ │ │ +#define DUNE_ALBERTA_ENTITY_CC │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00614_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: undefine-3.0.hh Source File │ │ │ +dune-grid: entity.cc Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,900 +74,493 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
undefine-3.0.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:
│ │ │ -
12#ifdef _ALBERTA_H_
│ │ │ -
13 #undef _ALBERTA_H_
│ │ │ -
14#endif // _ALBERTA_H_
│ │ │ -
15
│ │ │ -
16#ifdef ALBERTA_MAGIC
│ │ │ -
17 #undef ALBERTA_MAGIC
│ │ │ -
18#endif // ALBERTA_MAGIC
│ │ │ -
19
│ │ │ -
20#ifdef ALBERTA_VERSION
│ │ │ -
21 #undef ALBERTA_VERSION
│ │ │ -
22#endif // ALBERTA_VERSION
│ │ │ -
23
│ │ │ -
24#ifdef DIM_LIMIT
│ │ │ -
25 #undef DIM_LIMIT
│ │ │ -
26#endif // DIM_LIMIT
│ │ │ -
27
│ │ │ -
28#ifdef DIM_MAX
│ │ │ -
29 #undef DIM_MAX
│ │ │ -
30#endif // DIM_MAX
│ │ │ -
31
│ │ │ -
32#ifdef N_VERTICES
│ │ │ -
33 #undef N_VERTICES
│ │ │ -
34#endif // N_VERTICES
│ │ │ -
35
│ │ │ -
36#ifdef N_EDGES
│ │ │ -
37 #undef N_EDGES
│ │ │ -
38#endif // N_EDGES
│ │ │ -
39
│ │ │ -
40#ifdef N_WALLS
│ │ │ -
41 #undef N_WALLS
│ │ │ -
42#endif // N_WALLS
│ │ │ -
43
│ │ │ -
44#ifdef N_FACES
│ │ │ -
45 #undef N_FACES
│ │ │ -
46#endif // N_FACES
│ │ │ -
47
│ │ │ -
48#ifdef N_NEIGH
│ │ │ -
49 #undef N_NEIGH
│ │ │ -
50#endif // N_NEIGH
│ │ │ -
51
│ │ │ -
52#ifdef N_LAMBDA
│ │ │ -
53 #undef N_LAMBDA
│ │ │ -
54#endif // N_LAMBDA
│ │ │ -
55
│ │ │ -
56#ifdef DIM_FAC
│ │ │ -
57 #undef DIM_FAC
│ │ │ -
58#endif // DIM_FAC
│ │ │ +
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 {}
│ │ │ +
│ │ │ +
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
│ │ │ +
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#ifdef VERTEX_OF_EDGE
│ │ │ -
61 #undef VERTEX_OF_EDGE
│ │ │ -
62#endif // VERTEX_OF_EDGE
│ │ │ -
63
│ │ │ -
64#ifdef VERTEX_OF_WALL
│ │ │ -
65 #undef VERTEX_OF_WALL
│ │ │ -
66#endif // VERTEX_OF_WALL
│ │ │ +
60 template< int codim, int dim, class Grid >
│ │ │ +
61 inline ALBERTA EL_INFO *
│ │ │ +
│ │ │ + │ │ │ +
63 {
│ │ │ +
64 return &(elementInfo_.elInfo());
│ │ │ +
65 }
│ │ │ +
│ │ │ +
66
│ │ │
67
│ │ │ -
68#ifdef N_VERTICES_0D
│ │ │ -
69 #undef N_VERTICES_0D
│ │ │ -
70#endif // N_VERTICES_0D
│ │ │ -
71
│ │ │ -
72#ifdef N_EDGES_0D
│ │ │ -
73 #undef N_EDGES_0D
│ │ │ -
74#endif // N_EDGES_0D
│ │ │ +
68 template< int codim, int dim, class Grid >
│ │ │ +
69 inline void
│ │ │ +
│ │ │ + │ │ │ +
71 {
│ │ │ +
72 elementInfo_ = ElementInfo();
│ │ │ +
73 }
│ │ │ +
│ │ │ +
74
│ │ │
75
│ │ │ -
76#ifdef N_FACES_0D
│ │ │ -
77 #undef N_FACES_0D
│ │ │ -
78#endif // N_FACES_0D
│ │ │ -
79
│ │ │ -
80#ifdef N_NEIGH_0D
│ │ │ -
81 #undef N_NEIGH_0D
│ │ │ -
82#endif // N_NEIGH_0D
│ │ │ +
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#ifdef N_WALLS_0D
│ │ │ -
85 #undef N_WALLS_0D
│ │ │ -
86#endif // N_WALLS_0D
│ │ │ -
87
│ │ │ -
88#ifdef N_LAMBDA_0D
│ │ │ -
89 #undef N_LAMBDA_0D
│ │ │ -
90#endif // N_LAMBDA_0D
│ │ │ +
84
│ │ │ +
85 template< int codim, int dim, class Grid >
│ │ │ +
86 inline void
│ │ │ +
│ │ │ + │ │ │ +
88 {
│ │ │ +
89 setElement( other.elementInfo_, other.subEntity_ );
│ │ │ +
90 }
│ │ │ +
│ │ │
91
│ │ │ -
92#ifdef DIM_FAC_0D
│ │ │ -
93 #undef DIM_FAC_0D
│ │ │ -
94#endif // DIM_FAC_0D
│ │ │ -
95
│ │ │ -
96#ifdef VERTEX_OF_EDGE_0D
│ │ │ -
97 #undef VERTEX_OF_EDGE_0D
│ │ │ -
98#endif // VERTEX_OF_EDGE_0D
│ │ │ +
92
│ │ │ +
93 template< int codim, int dim, class Grid >
│ │ │ +
│ │ │ + │ │ │ +
95 {
│ │ │ +
96 assert( elementInfo_.level() == grid().levelProvider() ( elementInfo_ ) );
│ │ │ +
97 return elementInfo_.level();
│ │ │ +
98 }
│ │ │ +
│ │ │
99
│ │ │ -
100#ifdef VERTEX_OF_WALL_0D
│ │ │ -
101 #undef VERTEX_OF_WALL_0D
│ │ │ -
102#endif // VERTEX_OF_WALL_0D
│ │ │ -
103
│ │ │ -
104#ifdef N_VERTICES_1D
│ │ │ -
105 #undef N_VERTICES_1D
│ │ │ -
106#endif // N_VERTICES_1D
│ │ │ -
107
│ │ │ -
108#ifdef N_EDGES_1D
│ │ │ -
109 #undef N_EDGES_1D
│ │ │ -
110#endif // N_EDGES_1D
│ │ │ +
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#ifdef N_FACES_1D
│ │ │ -
113 #undef N_FACES_1D
│ │ │ -
114#endif // N_FACES_1D
│ │ │ -
115
│ │ │ -
116#ifdef N_NEIGH_1D
│ │ │ -
117 #undef N_NEIGH_1D
│ │ │ -
118#endif // N_NEIGH_1D
│ │ │ +
112
│ │ │ +
113 template< int codim, int dim, class Grid >
│ │ │ +
│ │ │ + │ │ │ +
115 {
│ │ │ +
116 return GeometryTypes::simplex( mydimension );
│ │ │ +
117 }
│ │ │ +
│ │ │ +
118
│ │ │
119
│ │ │ -
120#ifdef N_WALLS_1D
│ │ │ -
121 #undef N_WALLS_1D
│ │ │ -
122#endif // N_WALLS_1D
│ │ │ +
120
│ │ │ +
121 // AlbertaGridEntity (for codim = 0)
│ │ │ +
122 // ---------------------------------
│ │ │
123
│ │ │ -
124#ifdef N_LAMBDA_1D
│ │ │ -
125 #undef N_LAMBDA_1D
│ │ │ -
126#endif // N_LAMBDA_1D
│ │ │ -
127
│ │ │ -
128#ifdef DIM_FAC_1D
│ │ │ -
129 #undef DIM_FAC_1D
│ │ │ -
130#endif // DIM_FAC_1D
│ │ │ -
131
│ │ │ -
132#ifdef VERTEX_OF_EDGE_1D
│ │ │ -
133 #undef VERTEX_OF_EDGE_1D
│ │ │ -
134#endif // VERTEX_OF_EDGE_1D
│ │ │ -
135
│ │ │ -
136#ifdef VERTEX_OF_WALL_1D
│ │ │ -
137 #undef VERTEX_OF_WALL_1D
│ │ │ -
138#endif // VERTEX_OF_WALL_1D
│ │ │ +
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#ifdef N_VERTICES_2D
│ │ │ -
141 #undef N_VERTICES_2D
│ │ │ -
142#endif // N_VERTICES_2D
│ │ │ -
143
│ │ │ -
144#ifdef N_EDGES_2D
│ │ │ -
145 #undef N_EDGES_2D
│ │ │ -
146#endif // N_EDGES_2D
│ │ │ +
140 template< int dim, class Grid >
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
143 : grid_( NULL ),
│ │ │ +
144 elementInfo_()
│ │ │ +
145 {}
│ │ │ +
│ │ │ +
146
│ │ │
147
│ │ │ -
148#ifdef N_FACES_2D
│ │ │ -
149 #undef N_FACES_2D
│ │ │ -
150#endif // N_FACES_2D
│ │ │ -
151
│ │ │ -
152#ifdef N_NEIGH_2D
│ │ │ -
153 #undef N_NEIGH_2D
│ │ │ -
154#endif // N_NEIGH_2D
│ │ │ +
148 template< int dim, class Grid >
│ │ │ +
│ │ │ + │ │ │ +
150 {
│ │ │ +
151 // elements are always inside of our Domain
│ │ │ +
152 return 0;
│ │ │ +
153 }
│ │ │ +
│ │ │ +
154
│ │ │
155
│ │ │ -
156#ifdef N_WALLS_2D
│ │ │ -
157 #undef N_WALLS_2D
│ │ │ -
158#endif // N_WALLS_2D
│ │ │ -
159
│ │ │ -
160#ifdef N_LAMBDA_2D
│ │ │ -
161 #undef N_LAMBDA_2D
│ │ │ -
162#endif // N_LAMBDA_2D
│ │ │ -
163
│ │ │ -
164#ifdef DIM_FAC_2D
│ │ │ -
165 #undef DIM_FAC_2D
│ │ │ -
166#endif // DIM_FAC_2D
│ │ │ -
167
│ │ │ -
168#ifdef VERTEX_OF_EDGE_2D
│ │ │ -
169 #undef VERTEX_OF_EDGE_2D
│ │ │ -
170#endif // VERTEX_OF_EDGE_2D
│ │ │ -
171
│ │ │ -
172#ifdef VERTEX_OF_WALL_2D
│ │ │ -
173 #undef VERTEX_OF_WALL_2D
│ │ │ -
174#endif // VERTEX_OF_WALL_2D
│ │ │ -
175
│ │ │ -
176#ifdef N_VERTICES_3D
│ │ │ -
177 #undef N_VERTICES_3D
│ │ │ -
178#endif // N_VERTICES_3D
│ │ │ -
179
│ │ │ -
180#ifdef N_EDGES_3D
│ │ │ -
181 #undef N_EDGES_3D
│ │ │ -
182#endif // N_EDGES_3D
│ │ │ -
183
│ │ │ -
184#ifdef N_FACES_3D
│ │ │ -
185 #undef N_FACES_3D
│ │ │ -
186#endif // N_FACES_3D
│ │ │ -
187
│ │ │ -
188#ifdef N_NEIGH_3D
│ │ │ -
189 #undef N_NEIGH_3D
│ │ │ -
190#endif // N_NEIGH_3D
│ │ │ -
191
│ │ │ -
192#ifdef N_WALLS_3D
│ │ │ -
193 #undef N_WALLS_3D
│ │ │ -
194#endif // N_WALLS_3D
│ │ │ +
156 template< int dim, class Grid >
│ │ │ +
│ │ │ + │ │ │ +
158 {
│ │ │ +
159 return grid().levelProvider().isNew( elementInfo_ );
│ │ │ +
160 }
│ │ │ +
│ │ │ +
161
│ │ │ +
162
│ │ │ +
163 template< int dim, class Grid >
│ │ │ +
│ │ │ + │ │ │ +
165 {
│ │ │ +
166 return elementInfo_.mightVanish();
│ │ │ +
167 }
│ │ │ +
│ │ │ +
168
│ │ │ +
169
│ │ │ +
170 template< int dim, class Grid >
│ │ │ +
171 inline bool
│ │ │ +
│ │ │ + │ │ │ +
173 {
│ │ │ +
174 assert( elementInfo_ );
│ │ │ +
175 bool isBoundary = false;
│ │ │ +
176 for( int i = 0; i < dim+1; ++i )
│ │ │ +
177 isBoundary |= elementInfo_.isBoundary( i );
│ │ │ +
178 return isBoundary;
│ │ │ +
179 }
│ │ │ +
│ │ │ +
180
│ │ │ +
181
│ │ │ +
182 template< int dim, class Grid >
│ │ │ +
183 inline PartitionType
│ │ │ +
│ │ │ + │ │ │ +
185 {
│ │ │ +
186 return InteriorEntity;
│ │ │ +
187 }
│ │ │ +
│ │ │ +
188
│ │ │ +
189
│ │ │ +
190 template< int dim, class Grid >
│ │ │ +
│ │ │ + │ │ │ +
192 {
│ │ │ +
193 return elementInfo_.isLeaf();
│ │ │ +
194 }
│ │ │ +
│ │ │
195
│ │ │ -
196#ifdef N_LAMBDA_3D
│ │ │ -
197 #undef N_LAMBDA_3D
│ │ │ -
198#endif // N_LAMBDA_3D
│ │ │ -
199
│ │ │ -
200#ifdef DIM_FAC_3D
│ │ │ -
201 #undef DIM_FAC_3D
│ │ │ -
202#endif // DIM_FAC_3D
│ │ │ -
203
│ │ │ -
204#ifdef VERTEX_OF_EDGE_3D
│ │ │ -
205 #undef VERTEX_OF_EDGE_3D
│ │ │ -
206#endif // VERTEX_OF_EDGE_3D
│ │ │ -
207
│ │ │ -
208#ifdef VERTEX_OF_WALL_3D
│ │ │ -
209 #undef VERTEX_OF_WALL_3D
│ │ │ -
210#endif // VERTEX_OF_WALL_3D
│ │ │ -
211
│ │ │ -
212#ifdef N_LAMBDA_MAX
│ │ │ -
213 #undef N_LAMBDA_MAX
│ │ │ -
214#endif // N_LAMBDA_MAX
│ │ │ +
196
│ │ │ +
197 template< int dim, class Grid >
│ │ │ +
198 inline bool
│ │ │ +
│ │ │ + │ │ │ +
200 {
│ │ │ +
201 // element pointers are unique
│ │ │ +
202 return (elementInfo().el() == other.elementInfo().el());
│ │ │ +
203 }
│ │ │ +
│ │ │ +
204
│ │ │ +
205
│ │ │ +
206 template< int dim, class Grid >
│ │ │ +
207 template< int codim >
│ │ │ +
208 inline typename Grid::template Codim< codim >::Entity
│ │ │ +
│ │ │ + │ │ │ +
210 {
│ │ │ +
211 typedef AlbertaGridEntity< codim, dim, Grid > EntityImpl;
│ │ │ +
212 return EntityImpl( grid(), elementInfo_, grid().generic2alberta( codim, i ) );
│ │ │ +
213 }
│ │ │ +
│ │ │ +
214
│ │ │
215
│ │ │ -
216#ifdef N_VERTICES_MAX
│ │ │ -
217 #undef N_VERTICES_MAX
│ │ │ -
218#endif // N_VERTICES_MAX
│ │ │ -
219
│ │ │ -
220#ifdef N_EDGES_MAX
│ │ │ -
221 #undef N_EDGES_MAX
│ │ │ -
222#endif // N_EDGES_MAX
│ │ │ +
216 template< int dim, class Grid >
│ │ │ +
217 inline ALBERTA EL_INFO *
│ │ │ +
│ │ │ + │ │ │ +
219 {
│ │ │ +
220 return &(elementInfo_.elInfo());
│ │ │ +
221 }
│ │ │ +
│ │ │ +
222
│ │ │
223
│ │ │ -
224#ifdef N_FACES_MAX
│ │ │ -
225 #undef N_FACES_MAX
│ │ │ -
226#endif // N_FACES_MAX
│ │ │ -
227
│ │ │ -
228#ifdef N_NEIGH_MAX
│ │ │ -
229 #undef N_NEIGH_MAX
│ │ │ -
230#endif // N_NEIGH_MAX
│ │ │ +
224 template< int dim, class Grid >
│ │ │ +
│ │ │ + │ │ │ +
226 {
│ │ │ +
227 assert( elementInfo_.level() == grid().levelProvider() ( elementInfo_ ) );
│ │ │ +
228 return elementInfo_.level();
│ │ │ +
229 }
│ │ │ +
│ │ │ +
230
│ │ │
231
│ │ │ -
232#ifdef N_WALLS_MAX
│ │ │ -
233 #undef N_WALLS_MAX
│ │ │ -
234#endif // N_WALLS_MAX
│ │ │ -
235
│ │ │ -
236#ifdef DIM_FAC_MAX
│ │ │ -
237 #undef DIM_FAC_MAX
│ │ │ -
238#endif // DIM_FAC_MAX
│ │ │ +
232 template< int dim, class Grid >
│ │ │ +
233 inline void
│ │ │ +
│ │ │ + │ │ │ +
235 {
│ │ │ +
236 elementInfo_ = ElementInfo();
│ │ │ +
237 }
│ │ │ +
│ │ │ +
238
│ │ │
239
│ │ │ -
240#ifdef N_LAMBDA_LIMIT
│ │ │ -
241 #undef N_LAMBDA_LIMIT
│ │ │ -
242#endif // N_LAMBDA_LIMIT
│ │ │ -
243
│ │ │ -
244#ifdef N_VERTICES_LIMIT
│ │ │ -
245 #undef N_VERTICES_LIMIT
│ │ │ -
246#endif // N_VERTICES_LIMIT
│ │ │ +
240 template< int dim, class Grid >
│ │ │ + │ │ │ +
│ │ │ +
242 ::setElement ( const ElementInfo &elementInfo, int /* subEntity */ )
│ │ │ +
243 {
│ │ │ +
244 elementInfo_ = elementInfo;
│ │ │ +
245 }
│ │ │ +
│ │ │ +
246
│ │ │
247
│ │ │ -
248#ifdef N_EDGES_LIMIT
│ │ │ -
249 #undef N_EDGES_LIMIT
│ │ │ -
250#endif // N_EDGES_LIMIT
│ │ │ -
251
│ │ │ -
252#ifdef N_FACES_LIMIT
│ │ │ -
253 #undef N_FACES_LIMIT
│ │ │ -
254#endif // N_FACES_LIMIT
│ │ │ +
248 template< int dim, class Grid >
│ │ │ +
249 inline void
│ │ │ +
│ │ │ + │ │ │ +
251 {
│ │ │ +
252 setElement( other.elementInfo_, 0 );
│ │ │ +
253 }
│ │ │ +
│ │ │ +
254
│ │ │
255
│ │ │ -
256#ifdef N_NEIGH_LIMIT
│ │ │ -
257 #undef N_NEIGH_LIMIT
│ │ │ -
258#endif // N_NEIGH_LIMIT
│ │ │ -
259
│ │ │ -
260#ifdef N_WALLS_LIMIT
│ │ │ -
261 #undef N_WALLS_LIMIT
│ │ │ -
262#endif // N_WALLS_LIMIT
│ │ │ -
263
│ │ │ -
264#ifdef DIM_FAC_LIMIT
│ │ │ -
265 #undef DIM_FAC_LIMIT
│ │ │ -
266#endif // DIM_FAC_LIMIT
│ │ │ +
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#ifdef INDEX
│ │ │ -
269 #undef INDEX
│ │ │ -
270#endif // INDEX
│ │ │ -
271
│ │ │ -
272#ifdef INDEX
│ │ │ -
273 #undef INDEX
│ │ │ -
274#endif // INDEX
│ │ │ -
275
│ │ │ -
276#ifdef IS_LEAF_EL
│ │ │ -
277 #undef IS_LEAF_EL
│ │ │ -
278#endif // IS_LEAF_EL
│ │ │ -
279
│ │ │ -
280#ifdef LEAF_DATA
│ │ │ -
281 #undef LEAF_DATA
│ │ │ -
282#endif // LEAF_DATA
│ │ │ +
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#ifdef INTERIOR
│ │ │ -
285 #undef INTERIOR
│ │ │ -
286#endif // INTERIOR
│ │ │ +
284 return EntityImpl( grid(), fatherInfo, 0 );
│ │ │ +
285 }
│ │ │ +
│ │ │ +
286
│ │ │
287
│ │ │ -
288#ifdef DIRICHLET
│ │ │ -
289 #undef DIRICHLET
│ │ │ -
290#endif // DIRICHLET
│ │ │ -
291
│ │ │ -
292#ifdef NEUMANN
│ │ │ -
293 #undef NEUMANN
│ │ │ -
294#endif // NEUMANN
│ │ │ -
295
│ │ │ -
296#ifdef IS_NEUMANN
│ │ │ -
297 #undef IS_NEUMANN
│ │ │ -
298#endif // IS_NEUMANN
│ │ │ -
299
│ │ │ -
300#ifdef IS_DIRICHLET
│ │ │ -
301 #undef IS_DIRICHLET
│ │ │ -
302#endif // IS_DIRICHLET
│ │ │ -
303
│ │ │ -
304#ifdef IS_INTERIOR
│ │ │ -
305 #undef IS_INTERIOR
│ │ │ -
306#endif // IS_INTERIOR
│ │ │ -
307
│ │ │ -
308#ifdef N_BNDRY_TYPES
│ │ │ -
309 #undef N_BNDRY_TYPES
│ │ │ -
310#endif // N_BNDRY_TYPES
│ │ │ -
311
│ │ │ -
312#ifdef LIST_ENTRY
│ │ │ -
313 #undef LIST_ENTRY
│ │ │ -
314#endif // LIST_ENTRY
│ │ │ +
288 template< int dim, class Grid >
│ │ │ + │ │ │ +
290 {
│ │ │ +
291 return elementInfo_.indexInFather();
│ │ │ +
292 }
│ │ │ +
293
│ │ │ +
294
│ │ │ +
295 template< int dim, class Grid >
│ │ │ +
296 inline typename AlbertaGridEntity< 0, dim, Grid >::LocalGeometry
│ │ │ +
│ │ │ + │ │ │ +
298 {
│ │ │ +
299 typedef AlbertaGridLocalGeometryProvider< Grid > LocalGeoProvider;
│ │ │ +
300 const int indexInFather = elementInfo_.indexInFather();
│ │ │ +
301 const int orientation = (elementInfo_.type() == 1 ? -1 : 1);
│ │ │ +
302 return LocalGeometry( LocalGeoProvider::instance().geometryInFather( indexInFather, orientation ) );
│ │ │ +
303 }
│ │ │ +
│ │ │ +
304
│ │ │ +
305
│ │ │ +
306 template< int dim, class Grid >
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
309 {
│ │ │ +
310 assert( elementInfo_ );
│ │ │ +
311 typedef AlbertaGridHierarchicIterator< Grid > IteratorImp;
│ │ │ +
312 return IteratorImp( grid(), elementInfo_, maxlevel );
│ │ │ +
313 }
│ │ │ +
│ │ │ +
314
│ │ │
315
│ │ │ -
316#ifdef INIT_EL_TAG_CTX_INIT
│ │ │ -
317 #undef INIT_EL_TAG_CTX_INIT
│ │ │ -
318#endif // INIT_EL_TAG_CTX_INIT
│ │ │ -
319
│ │ │ -
320#ifdef INIT_EL_TAG_CTX_UNIQ
│ │ │ -
321 #undef INIT_EL_TAG_CTX_UNIQ
│ │ │ -
322#endif // INIT_EL_TAG_CTX_UNIQ
│ │ │ -
323
│ │ │ -
324#ifdef INIT_EL_TAG_CTX_NULL
│ │ │ -
325 #undef INIT_EL_TAG_CTX_NULL
│ │ │ -
326#endif // INIT_EL_TAG_CTX_NULL
│ │ │ -
327
│ │ │ -
328#ifdef INIT_EL_TAG_CTX_DFLT
│ │ │ -
329 #undef INIT_EL_TAG_CTX_DFLT
│ │ │ -
330#endif // INIT_EL_TAG_CTX_DFLT
│ │ │ +
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#ifdef INIT_EL_TAG_CTX_TAG
│ │ │ -
333 #undef INIT_EL_TAG_CTX_TAG
│ │ │ -
334#endif // INIT_EL_TAG_CTX_TAG
│ │ │ -
335
│ │ │ -
336#ifdef INIT_ELEMENT_METHOD
│ │ │ -
337 #undef INIT_ELEMENT_METHOD
│ │ │ -
338#endif // INIT_ELEMENT_METHOD
│ │ │ -
339
│ │ │ -
340#ifdef INIT_ELEMENT_FLAGS
│ │ │ -
341 #undef INIT_ELEMENT_FLAGS
│ │ │ -
342#endif // INIT_ELEMENT_FLAGS
│ │ │ -
343
│ │ │ -
344#ifdef INIT_ELEMENT_DEFUN
│ │ │ -
345 #undef INIT_ELEMENT_DEFUN
│ │ │ -
346#endif // INIT_ELEMENT_DEFUN
│ │ │ -
347
│ │ │ -
348#ifdef INIT_OBJECT
│ │ │ -
349 #undef INIT_OBJECT
│ │ │ -
350#endif // INIT_OBJECT
│ │ │ -
351
│ │ │ -
352#ifdef INIT_ELEMENT_DECL
│ │ │ -
353 #undef INIT_ELEMENT_DECL
│ │ │ -
354#endif // INIT_ELEMENT_DECL
│ │ │ -
355
│ │ │ -
356#ifdef INIT_ELEMENT_INITIALIZER
│ │ │ -
357 #undef INIT_ELEMENT_INITIALIZER
│ │ │ -
358#endif // INIT_ELEMENT_INITIALIZER
│ │ │ +
332#ifndef NDEBUG
│ │ │ +
333 for( int i = 0; i <= dimension; ++i )
│ │ │ +
334 {
│ │ │ +
335 // std::cout << "Opposite vertex " << i << ": "
│ │ │ +
336 // << (int)(getElInfo()->opp_vertex[ i ]) << std::endl;
│ │ │ +
337 if( getElInfo()->opp_vertex[ i ] == 127 )
│ │ │ +
338 {
│ │ │ +
339 assert( false );
│ │ │ +
340 DUNE_THROW( NotImplemented, "AlbertaGrid: Intersections on outside "
│ │ │ +
341 "entities are not fully implemented, yet." );
│ │ │ +
342 }
│ │ │ +
343 }
│ │ │ +
344#endif // #ifndef NDEBUG
│ │ │ +
345
│ │ │ + │ │ │ +
347 return AlbertaGridLeafIntersectionIterator( *this, begin );
│ │ │ +
348 }
│ │ │ +
│ │ │ +
349
│ │ │ +
350
│ │ │ +
351 template< int dim, class Grid >
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
354 {
│ │ │ +
355 assert( elementInfo_ );
│ │ │ + │ │ │ +
357 return AlbertaGridLeafIntersectionIterator( *this, end );
│ │ │ +
358 }
│ │ │ +
│ │ │
359
│ │ │ -
360#ifdef INIT_ELEMENT
│ │ │ -
361 #undef INIT_ELEMENT
│ │ │ -
362#endif // INIT_ELEMENT
│ │ │ -
363
│ │ │ -
364#ifdef INIT_ELEMENT_NEEDED
│ │ │ -
365 #undef INIT_ELEMENT_NEEDED
│ │ │ -
366#endif // INIT_ELEMENT_NEEDED
│ │ │ -
367
│ │ │ -
368#ifdef INIT_ELEMENT_SETUP
│ │ │ -
369 #undef INIT_ELEMENT_SETUP
│ │ │ -
370#endif // INIT_ELEMENT_SETUP
│ │ │ -
371
│ │ │ -
372#ifdef INIT_OBJECT_SINGLE
│ │ │ -
373 #undef INIT_OBJECT_SINGLE
│ │ │ -
374#endif // INIT_OBJECT_SINGLE
│ │ │ -
375
│ │ │ -
376#ifdef INIT_ELEMENT_SINGLE
│ │ │ -
377 #undef INIT_ELEMENT_SINGLE
│ │ │ -
378#endif // INIT_ELEMENT_SINGLE
│ │ │ -
379
│ │ │ -
380#ifdef vertex_of_wall_2d
│ │ │ -
381 #undef vertex_of_wall_2d
│ │ │ -
382#endif // vertex_of_wall_2d
│ │ │ -
383
│ │ │ -
384#ifdef PARAM_STRATEGY_MASK
│ │ │ -
385 #undef PARAM_STRATEGY_MASK
│ │ │ -
386#endif // PARAM_STRATEGY_MASK
│ │ │ -
387
│ │ │ -
388#ifdef PARAM_PERIODIC_COORDS
│ │ │ -
389 #undef PARAM_PERIODIC_COORDS
│ │ │ -
390#endif // PARAM_PERIODIC_COORDS
│ │ │ -
391
│ │ │ -
392#ifdef FILL_EL_DET
│ │ │ -
393 #undef FILL_EL_DET
│ │ │ -
394#endif // FILL_EL_DET
│ │ │ -
395
│ │ │ -
396#ifdef FILL_EL_LAMBDA
│ │ │ -
397 #undef FILL_EL_LAMBDA
│ │ │ -
398#endif // FILL_EL_LAMBDA
│ │ │ -
399
│ │ │ -
400#ifdef FILL_EL_WALL_SHIFT
│ │ │ -
401 #undef FILL_EL_WALL_SHIFT
│ │ │ -
402#endif // FILL_EL_WALL_SHIFT
│ │ │ -
403
│ │ │ -
404#ifdef FILL_EL_WALL_MASK
│ │ │ -
405 #undef FILL_EL_WALL_MASK
│ │ │ -
406#endif // FILL_EL_WALL_MASK
│ │ │ -
407
│ │ │ -
408#ifdef FILL_EL_WALL_DET
│ │ │ -
409 #undef FILL_EL_WALL_DET
│ │ │ -
410#endif // FILL_EL_WALL_DET
│ │ │ -
411
│ │ │ -
412#ifdef FILL_EL_WALL_NORMAL
│ │ │ -
413 #undef FILL_EL_WALL_NORMAL
│ │ │ -
414#endif // FILL_EL_WALL_NORMAL
│ │ │ -
415
│ │ │ -
416#ifdef FILL_EL_WALL_ORIENTATION
│ │ │ -
417 #undef FILL_EL_WALL_ORIENTATION
│ │ │ -
418#endif // FILL_EL_WALL_ORIENTATION
│ │ │ -
419
│ │ │ -
420#ifdef FILL_EL_WALL_REL_ORIENTATION
│ │ │ -
421 #undef FILL_EL_WALL_REL_ORIENTATION
│ │ │ -
422#endif // FILL_EL_WALL_REL_ORIENTATION
│ │ │ -
423
│ │ │ -
424#ifdef FILL_EL_WALL_DETS
│ │ │ -
425 #undef FILL_EL_WALL_DETS
│ │ │ -
426#endif // FILL_EL_WALL_DETS
│ │ │ -
427
│ │ │ -
428#ifdef FILL_EL_WALL_NORMALS
│ │ │ -
429 #undef FILL_EL_WALL_NORMALS
│ │ │ -
430#endif // FILL_EL_WALL_NORMALS
│ │ │ -
431
│ │ │ -
432#ifdef FILL_EL_WALL_ORIENTATIONS
│ │ │ -
433 #undef FILL_EL_WALL_ORIENTATIONS
│ │ │ -
434#endif // FILL_EL_WALL_ORIENTATIONS
│ │ │ -
435
│ │ │ -
436#ifdef FILL_EL_WALL_REL_ORIENTATIONS
│ │ │ -
437 #undef FILL_EL_WALL_REL_ORIENTATIONS
│ │ │ -
438#endif // FILL_EL_WALL_REL_ORIENTATIONS
│ │ │ -
439
│ │ │ -
440#ifdef BNDRY_FLAGS_INIT
│ │ │ -
441 #undef BNDRY_FLAGS_INIT
│ │ │ -
442#endif // BNDRY_FLAGS_INIT
│ │ │ -
443
│ │ │ -
444#ifdef BNDRY_FLAGS_ALL
│ │ │ -
445 #undef BNDRY_FLAGS_ALL
│ │ │ -
446#endif // BNDRY_FLAGS_ALL
│ │ │ -
447
│ │ │ -
448#ifdef BNDRY_FLAGS_CPY
│ │ │ -
449 #undef BNDRY_FLAGS_CPY
│ │ │ -
450#endif // BNDRY_FLAGS_CPY
│ │ │ -
451
│ │ │ -
452#ifdef BNDRY_FLAGS_AND
│ │ │ -
453 #undef BNDRY_FLAGS_AND
│ │ │ -
454#endif // BNDRY_FLAGS_AND
│ │ │ -
455
│ │ │ -
456#ifdef BNDRY_FLAGS_OR
│ │ │ -
457 #undef BNDRY_FLAGS_OR
│ │ │ -
458#endif // BNDRY_FLAGS_OR
│ │ │ -
459
│ │ │ -
460#ifdef BNDRY_FLAGS_XOR
│ │ │ -
461 #undef BNDRY_FLAGS_XOR
│ │ │ -
462#endif // BNDRY_FLAGS_XOR
│ │ │ -
463
│ │ │ -
464#ifdef BNDRY_FLAGS_IS_INTERIOR
│ │ │ -
465 #undef BNDRY_FLAGS_IS_INTERIOR
│ │ │ -
466#endif // BNDRY_FLAGS_IS_INTERIOR
│ │ │ -
467
│ │ │ -
468#ifdef BNDRY_FLAGS_IS_AT_BNDRY
│ │ │ -
469 #undef BNDRY_FLAGS_IS_AT_BNDRY
│ │ │ -
470#endif // BNDRY_FLAGS_IS_AT_BNDRY
│ │ │ -
471
│ │ │ -
472#ifdef BNDRY_FLAGS_SET
│ │ │ -
473 #undef BNDRY_FLAGS_SET
│ │ │ -
474#endif // BNDRY_FLAGS_SET
│ │ │ -
475
│ │ │ -
476#ifdef BNDRY_FLAGS_IS_PARTOF
│ │ │ -
477 #undef BNDRY_FLAGS_IS_PARTOF
│ │ │ -
478#endif // BNDRY_FLAGS_IS_PARTOF
│ │ │ -
479
│ │ │ -
480#ifdef BNDRY_FLAGS_FFBB
│ │ │ -
481 #undef BNDRY_FLAGS_FFBB
│ │ │ -
482#endif // BNDRY_FLAGS_FFBB
│ │ │ -
483
│ │ │ -
484#ifdef RCLE_NONE
│ │ │ -
485 #undef RCLE_NONE
│ │ │ -
486#endif // RCLE_NONE
│ │ │ -
487
│ │ │ -
488#ifdef RCLE_COARSE_EDGE_COMPAT
│ │ │ -
489 #undef RCLE_COARSE_EDGE_COMPAT
│ │ │ -
490#endif // RCLE_COARSE_EDGE_COMPAT
│ │ │ -
491
│ │ │ -
492#ifdef FILL_NOTHING
│ │ │ -
493 #undef FILL_NOTHING
│ │ │ -
494#endif // FILL_NOTHING
│ │ │ -
495
│ │ │ -
496#ifdef FILL_COORDS
│ │ │ -
497 #undef FILL_COORDS
│ │ │ -
498#endif // FILL_COORDS
│ │ │ -
499
│ │ │ -
500#ifdef FILL_BOUND
│ │ │ -
501 #undef FILL_BOUND
│ │ │ -
502#endif // FILL_BOUND
│ │ │ -
503
│ │ │ -
504#ifdef FILL_NEIGH
│ │ │ -
505 #undef FILL_NEIGH
│ │ │ -
506#endif // FILL_NEIGH
│ │ │ -
507
│ │ │ -
508#ifdef FILL_OPP_COORDS
│ │ │ -
509 #undef FILL_OPP_COORDS
│ │ │ -
510#endif // FILL_OPP_COORDS
│ │ │ -
511
│ │ │ -
512#ifdef FILL_ORIENTATION
│ │ │ -
513 #undef FILL_ORIENTATION
│ │ │ -
514#endif // FILL_ORIENTATION
│ │ │ -
515
│ │ │ -
516#ifdef FILL_PROJECTION
│ │ │ -
517 #undef FILL_PROJECTION
│ │ │ -
518#endif // FILL_PROJECTION
│ │ │ -
519
│ │ │ -
520#ifdef FILL_MACRO_WALLS
│ │ │ -
521 #undef FILL_MACRO_WALLS
│ │ │ -
522#endif // FILL_MACRO_WALLS
│ │ │ -
523
│ │ │ -
524#ifdef FILL_WALL_MAP
│ │ │ -
525 #undef FILL_WALL_MAP
│ │ │ -
526#endif // FILL_WALL_MAP
│ │ │ -
527
│ │ │ -
528#ifdef FILL_NON_PERIODIC
│ │ │ -
529 #undef FILL_NON_PERIODIC
│ │ │ -
530#endif // FILL_NON_PERIODIC
│ │ │ -
531
│ │ │ -
532#ifdef FILL_MASTER_INFO
│ │ │ -
533 #undef FILL_MASTER_INFO
│ │ │ -
534#endif // FILL_MASTER_INFO
│ │ │ -
535
│ │ │ -
536#ifdef FILL_ANY
│ │ │ -
537 #undef FILL_ANY
│ │ │ -
538#endif // FILL_ANY
│ │ │ -
539
│ │ │ -
540#ifdef CALL_EVERY_EL_PREORDER
│ │ │ -
541 #undef CALL_EVERY_EL_PREORDER
│ │ │ -
542#endif // CALL_EVERY_EL_PREORDER
│ │ │ -
543
│ │ │ -
544#ifdef CALL_EVERY_EL_INORDER
│ │ │ -
545 #undef CALL_EVERY_EL_INORDER
│ │ │ -
546#endif // CALL_EVERY_EL_INORDER
│ │ │ -
547
│ │ │ -
548#ifdef CALL_EVERY_EL_POSTORDER
│ │ │ -
549 #undef CALL_EVERY_EL_POSTORDER
│ │ │ -
550#endif // CALL_EVERY_EL_POSTORDER
│ │ │ -
551
│ │ │ -
552#ifdef CALL_LEAF_EL
│ │ │ -
553 #undef CALL_LEAF_EL
│ │ │ -
554#endif // CALL_LEAF_EL
│ │ │ -
555
│ │ │ -
556#ifdef CALL_LEAF_EL_LEVEL
│ │ │ -
557 #undef CALL_LEAF_EL_LEVEL
│ │ │ -
558#endif // CALL_LEAF_EL_LEVEL
│ │ │ -
559
│ │ │ -
560#ifdef CALL_EL_LEVEL
│ │ │ -
561 #undef CALL_EL_LEVEL
│ │ │ -
562#endif // CALL_EL_LEVEL
│ │ │ -
563
│ │ │ -
564#ifdef CALL_MG_LEVEL
│ │ │ -
565 #undef CALL_MG_LEVEL
│ │ │ -
566#endif // CALL_MG_LEVEL
│ │ │ -
567
│ │ │ -
568#ifdef TEST_FLAG
│ │ │ -
569 #undef TEST_FLAG
│ │ │ -
570#endif // TEST_FLAG
│ │ │ -
571
│ │ │ -
572#ifdef ADM_FLAGS_MASK
│ │ │ -
573 #undef ADM_FLAGS_MASK
│ │ │ -
574#endif // ADM_FLAGS_MASK
│ │ │ -
575
│ │ │ -
576#ifdef UCHAR_name
│ │ │ -
577 #undef UCHAR_name
│ │ │ -
578#endif // UCHAR_name
│ │ │ -
579
│ │ │ -
580#ifdef uchar_VECNAME
│ │ │ -
581 #undef uchar_VECNAME
│ │ │ -
582#endif // uchar_VECNAME
│ │ │ -
583
│ │ │ -
584#ifdef SCHAR_name
│ │ │ -
585 #undef SCHAR_name
│ │ │ -
586#endif // SCHAR_name
│ │ │ -
587
│ │ │ -
588#ifdef schar_VECNAME
│ │ │ -
589 #undef schar_VECNAME
│ │ │ -
590#endif // schar_VECNAME
│ │ │ -
591
│ │ │ -
592#ifdef INT_name
│ │ │ -
593 #undef INT_name
│ │ │ -
594#endif // INT_name
│ │ │ -
595
│ │ │ -
596#ifdef int_VECNAME
│ │ │ -
597 #undef int_VECNAME
│ │ │ -
598#endif // int_VECNAME
│ │ │ -
599
│ │ │ -
600#ifdef DOF_name
│ │ │ -
601 #undef DOF_name
│ │ │ -
602#endif // DOF_name
│ │ │ -
603
│ │ │ -
604#ifdef dof_VECNAME
│ │ │ -
605 #undef dof_VECNAME
│ │ │ -
606#endif // dof_VECNAME
│ │ │ -
607
│ │ │ -
608#ifdef PTR_name
│ │ │ -
609 #undef PTR_name
│ │ │ -
610#endif // PTR_name
│ │ │ -
611
│ │ │ -
612#ifdef ptr_VECNAME
│ │ │ -
613 #undef ptr_VECNAME
│ │ │ -
614#endif // ptr_VECNAME
│ │ │ -
615
│ │ │ -
616#ifdef REAL_name
│ │ │ -
617 #undef REAL_name
│ │ │ -
618#endif // REAL_name
│ │ │ -
619
│ │ │ -
620#ifdef real_VECNAME
│ │ │ -
621 #undef real_VECNAME
│ │ │ -
622#endif // real_VECNAME
│ │ │ -
623
│ │ │ -
624#ifdef REAL_D_name
│ │ │ -
625 #undef REAL_D_name
│ │ │ -
626#endif // REAL_D_name
│ │ │ -
627
│ │ │ -
628#ifdef real_d_VECNAME
│ │ │ -
629 #undef real_d_VECNAME
│ │ │ -
630#endif // real_d_VECNAME
│ │ │ -
631
│ │ │ -
632#ifdef BNDRY_name
│ │ │ -
633 #undef BNDRY_name
│ │ │ -
634#endif // BNDRY_name
│ │ │ -
635
│ │ │ -
636#ifdef bndry_VECNAME
│ │ │ -
637 #undef bndry_VECNAME
│ │ │ -
638#endif // bndry_VECNAME
│ │ │ -
639
│ │ │ -
640#ifdef DECL_DOF_EL_VEC
│ │ │ -
641 #undef DECL_DOF_EL_VEC
│ │ │ -
642#endif // DECL_DOF_EL_VEC
│ │ │ -
643
│ │ │ -
644#ifdef PHI
│ │ │ -
645 #undef PHI
│ │ │ -
646#endif // PHI
│ │ │ -
647
│ │ │ -
648#ifdef GRD_PHI
│ │ │ -
649 #undef GRD_PHI
│ │ │ -
650#endif // GRD_PHI
│ │ │ -
651
│ │ │ -
652#ifdef D2_PHI
│ │ │ -
653 #undef D2_PHI
│ │ │ -
654#endif // D2_PHI
│ │ │ -
655
│ │ │ -
656#ifdef D3_PHI
│ │ │ -
657 #undef D3_PHI
│ │ │ -
658#endif // D3_PHI
│ │ │ -
659
│ │ │ -
660#ifdef D4_PHI
│ │ │ -
661 #undef D4_PHI
│ │ │ -
662#endif // D4_PHI
│ │ │ -
663
│ │ │ -
664#ifdef PHI_D
│ │ │ -
665 #undef PHI_D
│ │ │ -
666#endif // PHI_D
│ │ │ -
667
│ │ │ -
668#ifdef GRD_PHI_D
│ │ │ -
669 #undef GRD_PHI_D
│ │ │ -
670#endif // GRD_PHI_D
│ │ │ -
671
│ │ │ -
672#ifdef D2_PHI_D
│ │ │ -
673 #undef D2_PHI_D
│ │ │ -
674#endif // D2_PHI_D
│ │ │ -
675
│ │ │ -
676#ifdef GET_DOF_INDICES
│ │ │ -
677 #undef GET_DOF_INDICES
│ │ │ -
678#endif // GET_DOF_INDICES
│ │ │ -
679
│ │ │ -
680#ifdef INTERPOL
│ │ │ -
681 #undef INTERPOL
│ │ │ -
682#endif // INTERPOL
│ │ │ -
683
│ │ │ -
684#ifdef INTERPOL_D
│ │ │ -
685 #undef INTERPOL_D
│ │ │ -
686#endif // INTERPOL_D
│ │ │ -
687
│ │ │ -
688#ifdef INTERPOL_DOW
│ │ │ -
689 #undef INTERPOL_DOW
│ │ │ -
690#endif // INTERPOL_DOW
│ │ │ -
691
│ │ │ -
692#ifdef GET_BOUND
│ │ │ -
693 #undef GET_BOUND
│ │ │ -
694#endif // GET_BOUND
│ │ │ -
695
│ │ │ -
696#ifdef LAGRANGE_NODES
│ │ │ -
697 #undef LAGRANGE_NODES
│ │ │ -
698#endif // LAGRANGE_NODES
│ │ │ -
699
│ │ │ -
700#ifdef FILL_EL_QUAD_WORLD
│ │ │ -
701 #undef FILL_EL_QUAD_WORLD
│ │ │ -
702#endif // FILL_EL_QUAD_WORLD
│ │ │ -
703
│ │ │ -
704#ifdef FILL_EL_QUAD_DET
│ │ │ -
705 #undef FILL_EL_QUAD_DET
│ │ │ -
706#endif // FILL_EL_QUAD_DET
│ │ │ -
707
│ │ │ -
708#ifdef FILL_EL_QUAD_LAMBDA
│ │ │ -
709 #undef FILL_EL_QUAD_LAMBDA
│ │ │ -
710#endif // FILL_EL_QUAD_LAMBDA
│ │ │ -
711
│ │ │ -
712#ifdef FILL_EL_QUAD_DLAMBDA
│ │ │ -
713 #undef FILL_EL_QUAD_DLAMBDA
│ │ │ -
714#endif // FILL_EL_QUAD_DLAMBDA
│ │ │ -
715
│ │ │ -
716#ifdef FILL_EL_QUAD_GRD_WORLD
│ │ │ -
717 #undef FILL_EL_QUAD_GRD_WORLD
│ │ │ -
718#endif // FILL_EL_QUAD_GRD_WORLD
│ │ │ -
719
│ │ │ -
720#ifdef FILL_EL_QUAD_D2_WORLD
│ │ │ -
721 #undef FILL_EL_QUAD_D2_WORLD
│ │ │ -
722#endif // FILL_EL_QUAD_D2_WORLD
│ │ │ -
723
│ │ │ -
724#ifdef FILL_EL_QUAD_D3_WORLD
│ │ │ -
725 #undef FILL_EL_QUAD_D3_WORLD
│ │ │ -
726#endif // FILL_EL_QUAD_D3_WORLD
│ │ │ -
727
│ │ │ -
728#ifdef FILL_EL_QUAD_WALL_DET
│ │ │ -
729 #undef FILL_EL_QUAD_WALL_DET
│ │ │ -
730#endif // FILL_EL_QUAD_WALL_DET
│ │ │ -
731
│ │ │ -
732#ifdef FILL_EL_QUAD_WALL_NORMAL
│ │ │ -
733 #undef FILL_EL_QUAD_WALL_NORMAL
│ │ │ -
734#endif // FILL_EL_QUAD_WALL_NORMAL
│ │ │ -
735
│ │ │ -
736#ifdef FILL_EL_QUAD_GRD_NORMAL
│ │ │ -
737 #undef FILL_EL_QUAD_GRD_NORMAL
│ │ │ -
738#endif // FILL_EL_QUAD_GRD_NORMAL
│ │ │ -
739
│ │ │ -
740#ifdef FILL_EL_QUAD_D2_NORMAL
│ │ │ -
741 #undef FILL_EL_QUAD_D2_NORMAL
│ │ │ -
742#endif // FILL_EL_QUAD_D2_NORMAL
│ │ │ -
743
│ │ │ -
744#ifdef INIT_PHI
│ │ │ -
745 #undef INIT_PHI
│ │ │ -
746#endif // INIT_PHI
│ │ │ -
747
│ │ │ -
748#ifdef INIT_GRD_PHI
│ │ │ -
749 #undef INIT_GRD_PHI
│ │ │ -
750#endif // INIT_GRD_PHI
│ │ │ -
751
│ │ │ -
752#ifdef INIT_D2_PHI
│ │ │ -
753 #undef INIT_D2_PHI
│ │ │ -
754#endif // INIT_D2_PHI
│ │ │ -
755
│ │ │ -
756#ifdef INIT_D3_PHI
│ │ │ -
757 #undef INIT_D3_PHI
│ │ │ -
758#endif // INIT_D3_PHI
│ │ │ -
759
│ │ │ -
760#ifdef INIT_D4_PHI
│ │ │ -
761 #undef INIT_D4_PHI
│ │ │ -
762#endif // INIT_D4_PHI
│ │ │ -
763
│ │ │ -
764#ifdef INIT_TANGENTIAL
│ │ │ -
765 #undef INIT_TANGENTIAL
│ │ │ -
766#endif // INIT_TANGENTIAL
│ │ │ -
767
│ │ │ -
768#ifdef MESH_REFINED
│ │ │ -
769 #undef MESH_REFINED
│ │ │ -
770#endif // MESH_REFINED
│ │ │ -
771
│ │ │ -
772#ifdef MESH_COARSENED
│ │ │ -
773 #undef MESH_COARSENED
│ │ │ -
774#endif // MESH_COARSENED
│ │ │ -
775
│ │ │ -
776#ifdef GRAPH_MESH_BOUNDARY
│ │ │ -
777 #undef GRAPH_MESH_BOUNDARY
│ │ │ -
778#endif // GRAPH_MESH_BOUNDARY
│ │ │ -
779
│ │ │ -
780#ifdef GRAPH_MESH_ELEMENT_MARK
│ │ │ -
781 #undef GRAPH_MESH_ELEMENT_MARK
│ │ │ -
782#endif // GRAPH_MESH_ELEMENT_MARK
│ │ │ -
783
│ │ │ -
784#ifdef GRAPH_MESH_VERTEX_DOF
│ │ │ -
785 #undef GRAPH_MESH_VERTEX_DOF
│ │ │ -
786#endif // GRAPH_MESH_VERTEX_DOF
│ │ │ -
787
│ │ │ -
788#ifdef GRAPH_MESH_ELEMENT_INDEX
│ │ │ -
789 #undef GRAPH_MESH_ELEMENT_INDEX
│ │ │ -
790#endif // GRAPH_MESH_ELEMENT_INDEX
│ │ │ -
791
│ │ │ -
792#ifdef GET_MESH
│ │ │ -
793 #undef GET_MESH
│ │ │ -
794#endif // GET_MESH
│ │ │ -
795
│ │ │ -
796#ifdef GET_DOF_VEC
│ │ │ -
797 #undef GET_DOF_VEC
│ │ │ -
798#endif // GET_DOF_VEC
│ │ │ -
799
│ │ │ -
800#ifdef TRACE_DOF_VEC_PROTO
│ │ │ -
801 #undef TRACE_DOF_VEC_PROTO
│ │ │ -
802#endif // TRACE_DOF_VEC_PROTO
│ │ │ -
803
│ │ │ -
804#ifdef INIT_UH
│ │ │ -
805 #undef INIT_UH
│ │ │ -
806#endif // INIT_UH
│ │ │ -
807
│ │ │ -
808#ifdef INIT_GRD_UH
│ │ │ -
809 #undef INIT_GRD_UH
│ │ │ -
810#endif // INIT_GRD_UH
│ │ │ -
811
│ │ │ -
812#ifdef ellipt_est_d_init
│ │ │ -
813 #undef ellipt_est_d_init
│ │ │ -
814#endif // ellipt_est_d_init
│ │ │ -
815
│ │ │ -
816#ifdef head_est_d_init
│ │ │ -
817 #undef head_est_d_init
│ │ │ -
818#endif // head_est_d_init
│ │ │ -
819
│ │ │ -
820#ifdef element_est_d
│ │ │ -
821 #undef element_est_d
│ │ │ -
822#endif // element_est_d
│ │ │ -
823
│ │ │ -
824#ifdef element_est_d_finish
│ │ │ -
825 #undef element_est_d_finish
│ │ │ -
826#endif // element_est_d_finish
│ │ │ -
827
│ │ │ -
828#ifdef element_est_uh_d
│ │ │ -
829 #undef element_est_uh_d
│ │ │ -
830#endif // element_est_uh_d
│ │ │ -
831
│ │ │ -
832#ifdef element_est_grd_uh_d
│ │ │ -
833 #undef element_est_grd_uh_d
│ │ │ -
834#endif // element_est_grd_uh_d
│ │ │ -
835
│ │ │ -
836#ifdef ellipt_est_d_finish
│ │ │ -
837 #undef ellipt_est_d_finish
│ │ │ -
838#endif // ellipt_est_d_finish
│ │ │ -
839
│ │ │ -
840#ifdef heat_est_d_finish
│ │ │ -
841 #undef heat_est_d_finish
│ │ │ -
842#endif // heat_est_d_finish
│ │ │ -
843
│ │ │ -
844#ifdef TRAVERSE_FIRST
│ │ │ -
845 #undef TRAVERSE_FIRST
│ │ │ -
846#endif // TRAVERSE_FIRST
│ │ │ -
847
│ │ │ -
848#ifdef TRAVERSE_NEXT
│ │ │ -
849 #undef TRAVERSE_NEXT
│ │ │ -
850#endif // TRAVERSE_NEXT
│ │ │ -
851
│ │ │ -
852#ifdef TRAVERSE_START
│ │ │ -
853 #undef TRAVERSE_START
│ │ │ -
854#endif // TRAVERSE_START
│ │ │ -
855
│ │ │ -
856#ifdef TRAVERSE_STOP
│ │ │ -
857 #undef TRAVERSE_STOP
│ │ │ -
858#endif // TRAVERSE_STOP
│ │ │ -
859
│ │ │ -
860#ifdef TRAVERSE_NEIGHBOUR
│ │ │ -
861 #undef TRAVERSE_NEIGHBOUR
│ │ │ -
862#endif // TRAVERSE_NEIGHBOUR
│ │ │ -
863
│ │ │ -
864#ifdef IFF_TAG_ALBERTA
│ │ │ -
865 #undef IFF_TAG_ALBERTA
│ │ │ -
866#endif // IFF_TAG_ALBERTA
│ │ │ -
867
│ │ │ -
868#ifdef IFF_TAG_MESH
│ │ │ -
869 #undef IFF_TAG_MESH
│ │ │ -
870#endif // IFF_TAG_MESH
│ │ │ -
871
│ │ │ -
872#ifdef IFF_TAG_REAL_VEC
│ │ │ -
873 #undef IFF_TAG_REAL_VEC
│ │ │ -
874#endif // IFF_TAG_REAL_VEC
│ │ │ -
875
│ │ │ -
876#ifdef IFF_TAG_REAL_D_VEC
│ │ │ -
877 #undef IFF_TAG_REAL_D_VEC
│ │ │ -
878#endif // IFF_TAG_REAL_D_VEC
│ │ │ -
879
│ │ │ -
880#ifdef IFF_TAG_INT_VEC
│ │ │ -
881 #undef IFF_TAG_INT_VEC
│ │ │ -
882#endif // IFF_TAG_INT_VEC
│ │ │ -
883
│ │ │ -
884#ifdef IFF_TAG_UCHAR_VEC
│ │ │ -
885 #undef IFF_TAG_UCHAR_VEC
│ │ │ -
886#endif // IFF_TAG_UCHAR_VEC
│ │ │ -
887
│ │ │ -
888#ifdef IFF_TAG_SCHAR_VEC
│ │ │ -
889 #undef IFF_TAG_SCHAR_VEC
│ │ │ -
890#endif // IFF_TAG_SCHAR_VEC
│ │ │ +
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
│ │ │ +
ALBERTA EL Element
Definition misc.hh:54
│ │ │ + │ │ │ +
int level() const
Definition elementinfo.hh:533
│ │ │ +
bool mightVanish() const
Definition elementinfo.hh:526
│ │ │ +
ElementInfo father() const
Definition elementinfo.hh:449
│ │ │ +
int type() const
Definition elementinfo.hh:540
│ │ │ +
bool isBoundary(int face) const
Definition elementinfo.hh:620
│ │ │ +
int indexInFather() const
Definition elementinfo.hh:457
│ │ │ +
ALBERTA EL_INFO & elInfo() const
Definition elementinfo.hh:744
│ │ │ +
Definition hierarchiciterator.hh:29
│ │ │ +
Definition albertagrid/intersectioniterator.hh:27
│ │ │ +
Definition albertagrid/entity.hh:46
│ │ │ +
void clearElement()
Definition entity.cc:70
│ │ │ +
ALBERTA EL_INFO * getElInfo() const
needed for the LevelIterator and LeafIterator
Definition entity.cc:62
│ │ │ +
int level() const
level of this element
Definition entity.cc:94
│ │ │ +
void setElement(const ElementInfo &elementInfo, int subEntity)
Definition entity.cc:78
│ │ │ +
PartitionType partitionType() const
return partition type of this entity
Definition entity.cc:40
│ │ │ +
Grid::template Codim< codim >::Geometry Geometry
Definition albertagrid/entity.hh:69
│ │ │ +
void setEntity(const This &other)
Definition entity.cc:87
│ │ │ +
const ElementInfo & elementInfo() const
Definition albertagrid/entity.hh:130
│ │ │ +
Geometry geometry() const
geometry of this entity
Definition entity.cc:103
│ │ │ +
static const int dimension
Definition albertagrid/entity.hh:57
│ │ │ +
const Grid & grid() const
obtain a reference to the grid
Definition albertagrid/entity.hh:142
│ │ │ +
int subEntity() const
obtain number of the subentity within the element (in ALBERTA numbering)
Definition albertagrid/entity.hh:148
│ │ │ +
Alberta::ElementInfo< dimension > ElementInfo
Definition albertagrid/entity.hh:71
│ │ │ +
GeometryType type() const
type of geometry of this entity
Definition entity.cc:114
│ │ │ +
bool equals(const This &other) const
equality of entities
Definition entity.cc:48
│ │ │ +
Definition albertagrid/entity.hh:63
│ │ │ +
Definition albertagrid/entity.hh:185
│ │ │ +
Grid::Traits::template Codim< 0 >::GeometryImpl GeometryImpl
Definition albertagrid/entity.hh:211
│ │ │ +
const ElementInfo & elementInfo() const
Definition albertagrid/entity.hh:355
│ │ │ +
Grid::template Codim< 0 >::LocalGeometry LocalGeometry
Definition albertagrid/entity.hh:210
│ │ │ +
Definition albertagrid/geometry.hh:30
│ │ │ +
Definition albertagrid/geometry.hh:504
│ │ │ +
Definition albertagrid/intersectioniterator.hh:35
│ │ │ +
Definition albertagrid/intersectioniterator.hh:36
│ │ │ +
Grid abstract base class.
Definition common/grid.hh:375
│ │ │ +
A Traits struct that collects all associated types of one implementation.
Definition common/grid.hh:411
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,895 +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 │ │ │ │ -undefine-3.0.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: │ │ │ │ -12#ifdef _ALBERTA_H_ │ │ │ │ -13 #undef _ALBERTA_H_ │ │ │ │ -14#endif // _ALBERTA_H_ │ │ │ │ -15 │ │ │ │ -16#ifdef ALBERTA_MAGIC │ │ │ │ -17 #undef ALBERTA_MAGIC │ │ │ │ -18#endif // ALBERTA_MAGIC │ │ │ │ -19 │ │ │ │ -20#ifdef ALBERTA_VERSION │ │ │ │ -21 #undef ALBERTA_VERSION │ │ │ │ -22#endif // ALBERTA_VERSION │ │ │ │ -23 │ │ │ │ -24#ifdef DIM_LIMIT │ │ │ │ -25 #undef DIM_LIMIT │ │ │ │ -26#endif // DIM_LIMIT │ │ │ │ -27 │ │ │ │ -28#ifdef DIM_MAX │ │ │ │ -29 #undef DIM_MAX │ │ │ │ -30#endif // DIM_MAX │ │ │ │ -31 │ │ │ │ -32#ifdef N_VERTICES │ │ │ │ -33 #undef N_VERTICES │ │ │ │ -34#endif // N_VERTICES │ │ │ │ -35 │ │ │ │ -36#ifdef N_EDGES │ │ │ │ -37 #undef N_EDGES │ │ │ │ -38#endif // N_EDGES │ │ │ │ -39 │ │ │ │ -40#ifdef N_WALLS │ │ │ │ -41 #undef N_WALLS │ │ │ │ -42#endif // N_WALLS │ │ │ │ -43 │ │ │ │ -44#ifdef N_FACES │ │ │ │ -45 #undef N_FACES │ │ │ │ -46#endif // N_FACES │ │ │ │ -47 │ │ │ │ -48#ifdef N_NEIGH │ │ │ │ -49 #undef N_NEIGH │ │ │ │ -50#endif // N_NEIGH │ │ │ │ -51 │ │ │ │ -52#ifdef N_LAMBDA │ │ │ │ -53 #undef N_LAMBDA │ │ │ │ -54#endif // N_LAMBDA │ │ │ │ -55 │ │ │ │ -56#ifdef DIM_FAC │ │ │ │ -57 #undef DIM_FAC │ │ │ │ -58#endif // DIM_FAC │ │ │ │ +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 {} │ │ │ │ +29 │ │ │ │ +30 template │ │ │ │ +31 inline _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _c_o_d_i_m_,_ _d_i_m_,_ _G_r_i_d_ _> │ │ │ │ +_3_2_ _:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y () │ │ │ │ +33 : grid_( _N_U_L_L ), │ │ │ │ +34 elementInfo_(), │ │ │ │ +35 subEntity_( -1 ) │ │ │ │ +36 {} │ │ │ │ +37 │ │ │ │ +38 template< int codim, int dim, class Grid > │ │ │ │ +39 inline _P_a_r_t_i_t_i_o_n_T_y_p_e │ │ │ │ +_4_0 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _c_o_d_i_m_,_d_i_m_,_G_r_i_d_ _>_:_:_p_a_r_t_i_t_i_o_n_T_y_p_e () const │ │ │ │ +41 { │ │ │ │ +42 return _I_n_t_e_r_i_o_r_E_n_t_i_t_y; │ │ │ │ +43 } │ │ │ │ +44 │ │ │ │ +45 │ │ │ │ +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#ifdef VERTEX_OF_EDGE │ │ │ │ -61 #undef VERTEX_OF_EDGE │ │ │ │ -62#endif // VERTEX_OF_EDGE │ │ │ │ -63 │ │ │ │ -64#ifdef VERTEX_OF_WALL │ │ │ │ -65 #undef VERTEX_OF_WALL │ │ │ │ -66#endif // VERTEX_OF_WALL │ │ │ │ +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#ifdef N_VERTICES_0D │ │ │ │ -69 #undef N_VERTICES_0D │ │ │ │ -70#endif // N_VERTICES_0D │ │ │ │ -71 │ │ │ │ -72#ifdef N_EDGES_0D │ │ │ │ -73 #undef N_EDGES_0D │ │ │ │ -74#endif // N_EDGES_0D │ │ │ │ +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#ifdef N_FACES_0D │ │ │ │ -77 #undef N_FACES_0D │ │ │ │ -78#endif // N_FACES_0D │ │ │ │ -79 │ │ │ │ -80#ifdef N_NEIGH_0D │ │ │ │ -81 #undef N_NEIGH_0D │ │ │ │ -82#endif // N_NEIGH_0D │ │ │ │ +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#ifdef N_WALLS_0D │ │ │ │ -85 #undef N_WALLS_0D │ │ │ │ -86#endif // N_WALLS_0D │ │ │ │ -87 │ │ │ │ -88#ifdef N_LAMBDA_0D │ │ │ │ -89 #undef N_LAMBDA_0D │ │ │ │ -90#endif // N_LAMBDA_0D │ │ │ │ +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#ifdef DIM_FAC_0D │ │ │ │ -93 #undef DIM_FAC_0D │ │ │ │ -94#endif // DIM_FAC_0D │ │ │ │ -95 │ │ │ │ -96#ifdef VERTEX_OF_EDGE_0D │ │ │ │ -97 #undef VERTEX_OF_EDGE_0D │ │ │ │ -98#endif // VERTEX_OF_EDGE_0D │ │ │ │ +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#ifdef VERTEX_OF_WALL_0D │ │ │ │ -101 #undef VERTEX_OF_WALL_0D │ │ │ │ -102#endif // VERTEX_OF_WALL_0D │ │ │ │ -103 │ │ │ │ -104#ifdef N_VERTICES_1D │ │ │ │ -105 #undef N_VERTICES_1D │ │ │ │ -106#endif // N_VERTICES_1D │ │ │ │ -107 │ │ │ │ -108#ifdef N_EDGES_1D │ │ │ │ -109 #undef N_EDGES_1D │ │ │ │ -110#endif // N_EDGES_1D │ │ │ │ +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#ifdef N_FACES_1D │ │ │ │ -113 #undef N_FACES_1D │ │ │ │ -114#endif // N_FACES_1D │ │ │ │ -115 │ │ │ │ -116#ifdef N_NEIGH_1D │ │ │ │ -117 #undef N_NEIGH_1D │ │ │ │ -118#endif // N_NEIGH_1D │ │ │ │ +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#ifdef N_WALLS_1D │ │ │ │ -121 #undef N_WALLS_1D │ │ │ │ -122#endif // N_WALLS_1D │ │ │ │ +120 │ │ │ │ +121 // AlbertaGridEntity (for codim = 0) │ │ │ │ +122 // --------------------------------- │ │ │ │ 123 │ │ │ │ -124#ifdef N_LAMBDA_1D │ │ │ │ -125 #undef N_LAMBDA_1D │ │ │ │ -126#endif // N_LAMBDA_1D │ │ │ │ -127 │ │ │ │ -128#ifdef DIM_FAC_1D │ │ │ │ -129 #undef DIM_FAC_1D │ │ │ │ -130#endif // DIM_FAC_1D │ │ │ │ -131 │ │ │ │ -132#ifdef VERTEX_OF_EDGE_1D │ │ │ │ -133 #undef VERTEX_OF_EDGE_1D │ │ │ │ -134#endif // VERTEX_OF_EDGE_1D │ │ │ │ -135 │ │ │ │ -136#ifdef VERTEX_OF_WALL_1D │ │ │ │ -137 #undef VERTEX_OF_WALL_1D │ │ │ │ -138#endif // VERTEX_OF_WALL_1D │ │ │ │ +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#ifdef N_VERTICES_2D │ │ │ │ -141 #undef N_VERTICES_2D │ │ │ │ -142#endif // N_VERTICES_2D │ │ │ │ -143 │ │ │ │ -144#ifdef N_EDGES_2D │ │ │ │ -145 #undef N_EDGES_2D │ │ │ │ -146#endif // N_EDGES_2D │ │ │ │ +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#ifdef N_FACES_2D │ │ │ │ -149 #undef N_FACES_2D │ │ │ │ -150#endif // N_FACES_2D │ │ │ │ -151 │ │ │ │ -152#ifdef N_NEIGH_2D │ │ │ │ -153 #undef N_NEIGH_2D │ │ │ │ -154#endif // N_NEIGH_2D │ │ │ │ +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#ifdef N_WALLS_2D │ │ │ │ -157 #undef N_WALLS_2D │ │ │ │ -158#endif // N_WALLS_2D │ │ │ │ -159 │ │ │ │ -160#ifdef N_LAMBDA_2D │ │ │ │ -161 #undef N_LAMBDA_2D │ │ │ │ -162#endif // N_LAMBDA_2D │ │ │ │ -163 │ │ │ │ -164#ifdef DIM_FAC_2D │ │ │ │ -165 #undef DIM_FAC_2D │ │ │ │ -166#endif // DIM_FAC_2D │ │ │ │ -167 │ │ │ │ -168#ifdef VERTEX_OF_EDGE_2D │ │ │ │ -169 #undef VERTEX_OF_EDGE_2D │ │ │ │ -170#endif // VERTEX_OF_EDGE_2D │ │ │ │ -171 │ │ │ │ -172#ifdef VERTEX_OF_WALL_2D │ │ │ │ -173 #undef VERTEX_OF_WALL_2D │ │ │ │ -174#endif // VERTEX_OF_WALL_2D │ │ │ │ -175 │ │ │ │ -176#ifdef N_VERTICES_3D │ │ │ │ -177 #undef N_VERTICES_3D │ │ │ │ -178#endif // N_VERTICES_3D │ │ │ │ -179 │ │ │ │ -180#ifdef N_EDGES_3D │ │ │ │ -181 #undef N_EDGES_3D │ │ │ │ -182#endif // N_EDGES_3D │ │ │ │ -183 │ │ │ │ -184#ifdef N_FACES_3D │ │ │ │ -185 #undef N_FACES_3D │ │ │ │ -186#endif // N_FACES_3D │ │ │ │ -187 │ │ │ │ -188#ifdef N_NEIGH_3D │ │ │ │ -189 #undef N_NEIGH_3D │ │ │ │ -190#endif // N_NEIGH_3D │ │ │ │ -191 │ │ │ │ -192#ifdef N_WALLS_3D │ │ │ │ -193 #undef N_WALLS_3D │ │ │ │ -194#endif // N_WALLS_3D │ │ │ │ +156 template< int dim, class Grid > │ │ │ │ +_1_5_7 inline bool _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_i_s_N_e_w () const │ │ │ │ +158 { │ │ │ │ +159 return _g_r_i_d().levelProvider().isNew( elementInfo_ ); │ │ │ │ +160 } │ │ │ │ +161 │ │ │ │ +162 │ │ │ │ +163 template< int dim, class Grid > │ │ │ │ +_1_6_4 inline bool _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_m_i_g_h_t_V_a_n_i_s_h () const │ │ │ │ +165 { │ │ │ │ +166 return elementInfo_._m_i_g_h_t_V_a_n_i_s_h(); │ │ │ │ +167 } │ │ │ │ +168 │ │ │ │ +169 │ │ │ │ +170 template< int dim, class Grid > │ │ │ │ +171 inline bool │ │ │ │ +_1_7_2 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_h_a_s_B_o_u_n_d_a_r_y_I_n_t_e_r_s_e_c_t_i_o_n_s () const │ │ │ │ +173 { │ │ │ │ +174 assert( elementInfo_ ); │ │ │ │ +175 bool isBoundary = false; │ │ │ │ +176 for( int i = 0; i < dim+1; ++i ) │ │ │ │ +177 isBoundary |= elementInfo_._i_s_B_o_u_n_d_a_r_y( i ); │ │ │ │ +178 return isBoundary; │ │ │ │ +179 } │ │ │ │ +180 │ │ │ │ +181 │ │ │ │ +182 template< int dim, class Grid > │ │ │ │ +183 inline _P_a_r_t_i_t_i_o_n_T_y_p_e │ │ │ │ +_1_8_4 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_p_a_r_t_i_t_i_o_n_T_y_p_e () const │ │ │ │ +185 { │ │ │ │ +186 return _I_n_t_e_r_i_o_r_E_n_t_i_t_y; │ │ │ │ +187 } │ │ │ │ +188 │ │ │ │ +189 │ │ │ │ +190 template< int dim, class Grid > │ │ │ │ +_1_9_1 inline bool _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_G_r_i_d_ _>_:_:_i_s_L_e_a_f () const │ │ │ │ +192 { │ │ │ │ +193 return elementInfo_.isLeaf(); │ │ │ │ +194 } │ │ │ │ 195 │ │ │ │ -196#ifdef N_LAMBDA_3D │ │ │ │ -197 #undef N_LAMBDA_3D │ │ │ │ -198#endif // N_LAMBDA_3D │ │ │ │ -199 │ │ │ │ -200#ifdef DIM_FAC_3D │ │ │ │ -201 #undef DIM_FAC_3D │ │ │ │ -202#endif // DIM_FAC_3D │ │ │ │ -203 │ │ │ │ -204#ifdef VERTEX_OF_EDGE_3D │ │ │ │ -205 #undef VERTEX_OF_EDGE_3D │ │ │ │ -206#endif // VERTEX_OF_EDGE_3D │ │ │ │ -207 │ │ │ │ -208#ifdef VERTEX_OF_WALL_3D │ │ │ │ -209 #undef VERTEX_OF_WALL_3D │ │ │ │ -210#endif // VERTEX_OF_WALL_3D │ │ │ │ -211 │ │ │ │ -212#ifdef N_LAMBDA_MAX │ │ │ │ -213 #undef N_LAMBDA_MAX │ │ │ │ -214#endif // N_LAMBDA_MAX │ │ │ │ +196 │ │ │ │ +197 template< int dim, class Grid > │ │ │ │ +198 inline bool │ │ │ │ +_1_9_9 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_e_q_u_a_l_s ( const _T_h_i_s &other ) const │ │ │ │ +200 { │ │ │ │ +201 // element pointers are unique │ │ │ │ +202 return (_e_l_e_m_e_n_t_I_n_f_o().el() == other._e_l_e_m_e_n_t_I_n_f_o().el()); │ │ │ │ +203 } │ │ │ │ +204 │ │ │ │ +205 │ │ │ │ +206 template< int dim, class Grid > │ │ │ │ +207 template< int codim > │ │ │ │ +208 inline typename _G_r_i_d_:_:_t_e_m_p_l_a_t_e Codim< codim >::Entity │ │ │ │ +_2_0_9 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_s_u_b_E_n_t_i_t_y ( int i ) const │ │ │ │ +210 { │ │ │ │ +211 typedef _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _c_o_d_i_m_,_ _d_i_m_,_ _G_r_i_d_ _> EntityImpl; │ │ │ │ +212 return EntityImpl( _g_r_i_d(), elementInfo_, _g_r_i_d().generic2alberta( codim, i ) │ │ │ │ +); │ │ │ │ +213 } │ │ │ │ +214 │ │ │ │ 215 │ │ │ │ -216#ifdef N_VERTICES_MAX │ │ │ │ -217 #undef N_VERTICES_MAX │ │ │ │ -218#endif // N_VERTICES_MAX │ │ │ │ -219 │ │ │ │ -220#ifdef N_EDGES_MAX │ │ │ │ -221 #undef N_EDGES_MAX │ │ │ │ -222#endif // N_EDGES_MAX │ │ │ │ +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#ifdef N_FACES_MAX │ │ │ │ -225 #undef N_FACES_MAX │ │ │ │ -226#endif // N_FACES_MAX │ │ │ │ -227 │ │ │ │ -228#ifdef N_NEIGH_MAX │ │ │ │ -229 #undef N_NEIGH_MAX │ │ │ │ -230#endif // N_NEIGH_MAX │ │ │ │ +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#ifdef N_WALLS_MAX │ │ │ │ -233 #undef N_WALLS_MAX │ │ │ │ -234#endif // N_WALLS_MAX │ │ │ │ -235 │ │ │ │ -236#ifdef DIM_FAC_MAX │ │ │ │ -237 #undef DIM_FAC_MAX │ │ │ │ -238#endif // DIM_FAC_MAX │ │ │ │ +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#ifdef N_LAMBDA_LIMIT │ │ │ │ -241 #undef N_LAMBDA_LIMIT │ │ │ │ -242#endif // N_LAMBDA_LIMIT │ │ │ │ -243 │ │ │ │ -244#ifdef N_VERTICES_LIMIT │ │ │ │ -245 #undef N_VERTICES_LIMIT │ │ │ │ -246#endif // N_VERTICES_LIMIT │ │ │ │ +240 template< int dim, class Grid > │ │ │ │ +241 inline void _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _> │ │ │ │ +_2_4_2_ _:_:_s_e_t_E_l_e_m_e_n_t ( const _E_l_e_m_e_n_t_I_n_f_o &elementInfo, int /* subEntity */ ) │ │ │ │ +243 { │ │ │ │ +244 elementInfo_ = elementInfo; │ │ │ │ +245 } │ │ │ │ +246 │ │ │ │ 247 │ │ │ │ -248#ifdef N_EDGES_LIMIT │ │ │ │ -249 #undef N_EDGES_LIMIT │ │ │ │ -250#endif // N_EDGES_LIMIT │ │ │ │ -251 │ │ │ │ -252#ifdef N_FACES_LIMIT │ │ │ │ -253 #undef N_FACES_LIMIT │ │ │ │ -254#endif // N_FACES_LIMIT │ │ │ │ +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#ifdef N_NEIGH_LIMIT │ │ │ │ -257 #undef N_NEIGH_LIMIT │ │ │ │ -258#endif // N_NEIGH_LIMIT │ │ │ │ -259 │ │ │ │ -260#ifdef N_WALLS_LIMIT │ │ │ │ -261 #undef N_WALLS_LIMIT │ │ │ │ -262#endif // N_WALLS_LIMIT │ │ │ │ -263 │ │ │ │ -264#ifdef DIM_FAC_LIMIT │ │ │ │ -265 #undef DIM_FAC_LIMIT │ │ │ │ -266#endif // DIM_FAC_LIMIT │ │ │ │ +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#ifdef INDEX │ │ │ │ -269 #undef INDEX │ │ │ │ -270#endif // INDEX │ │ │ │ -271 │ │ │ │ -272#ifdef INDEX │ │ │ │ -273 #undef INDEX │ │ │ │ -274#endif // INDEX │ │ │ │ -275 │ │ │ │ -276#ifdef IS_LEAF_EL │ │ │ │ -277 #undef IS_LEAF_EL │ │ │ │ -278#endif // IS_LEAF_EL │ │ │ │ -279 │ │ │ │ -280#ifdef LEAF_DATA │ │ │ │ -281 #undef LEAF_DATA │ │ │ │ -282#endif // LEAF_DATA │ │ │ │ +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#ifdef INTERIOR │ │ │ │ -285 #undef INTERIOR │ │ │ │ -286#endif // INTERIOR │ │ │ │ +284 return EntityImpl( _g_r_i_d(), fatherInfo, 0 ); │ │ │ │ +285 } │ │ │ │ +286 │ │ │ │ 287 │ │ │ │ -288#ifdef DIRICHLET │ │ │ │ -289 #undef DIRICHLET │ │ │ │ -290#endif // DIRICHLET │ │ │ │ -291 │ │ │ │ -292#ifdef NEUMANN │ │ │ │ -293 #undef NEUMANN │ │ │ │ -294#endif // NEUMANN │ │ │ │ -295 │ │ │ │ -296#ifdef IS_NEUMANN │ │ │ │ -297 #undef IS_NEUMANN │ │ │ │ -298#endif // IS_NEUMANN │ │ │ │ -299 │ │ │ │ -300#ifdef IS_DIRICHLET │ │ │ │ -301 #undef IS_DIRICHLET │ │ │ │ -302#endif // IS_DIRICHLET │ │ │ │ -303 │ │ │ │ -304#ifdef IS_INTERIOR │ │ │ │ -305 #undef IS_INTERIOR │ │ │ │ -306#endif // IS_INTERIOR │ │ │ │ -307 │ │ │ │ -308#ifdef N_BNDRY_TYPES │ │ │ │ -309 #undef N_BNDRY_TYPES │ │ │ │ -310#endif // N_BNDRY_TYPES │ │ │ │ -311 │ │ │ │ -312#ifdef LIST_ENTRY │ │ │ │ -313 #undef LIST_ENTRY │ │ │ │ -314#endif // LIST_ENTRY │ │ │ │ +288 template< int dim, class Grid > │ │ │ │ +289 inline int _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_n_C_h_i_l_d () const │ │ │ │ +290 { │ │ │ │ +291 return elementInfo_._i_n_d_e_x_I_n_F_a_t_h_e_r(); │ │ │ │ +292 } │ │ │ │ +293 │ │ │ │ +294 │ │ │ │ +295 template< int dim, class Grid > │ │ │ │ +296 inline typename AlbertaGridEntity< 0, dim, Grid >::LocalGeometry │ │ │ │ +_2_9_7 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_g_e_o_m_e_t_r_y_I_n_F_a_t_h_e_r() const │ │ │ │ +298 { │ │ │ │ +299 typedef _A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_<_ _G_r_i_d_ _> LocalGeoProvider; │ │ │ │ +300 const int indexInFather = elementInfo_._i_n_d_e_x_I_n_F_a_t_h_e_r(); │ │ │ │ +301 const int orientation = (elementInfo_._t_y_p_e() == 1 ? -1 : 1); │ │ │ │ +302 return _L_o_c_a_l_G_e_o_m_e_t_r_y( LocalGeoProvider::instance().geometryInFather │ │ │ │ +( indexInFather, orientation ) ); │ │ │ │ +303 } │ │ │ │ +304 │ │ │ │ +305 │ │ │ │ +306 template< int dim, class Grid > │ │ │ │ +307 inline typename _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ +_3_0_8 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_h_b_e_g_i_n( int maxlevel ) const │ │ │ │ +309 { │ │ │ │ +310 assert( elementInfo_ ); │ │ │ │ +311 typedef _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_ _G_r_i_d_ _> IteratorImp; │ │ │ │ +312 return IteratorImp( _g_r_i_d(), elementInfo_, maxlevel ); │ │ │ │ +313 } │ │ │ │ +314 │ │ │ │ 315 │ │ │ │ -316#ifdef INIT_EL_TAG_CTX_INIT │ │ │ │ -317 #undef INIT_EL_TAG_CTX_INIT │ │ │ │ -318#endif // INIT_EL_TAG_CTX_INIT │ │ │ │ -319 │ │ │ │ -320#ifdef INIT_EL_TAG_CTX_UNIQ │ │ │ │ -321 #undef INIT_EL_TAG_CTX_UNIQ │ │ │ │ -322#endif // INIT_EL_TAG_CTX_UNIQ │ │ │ │ -323 │ │ │ │ -324#ifdef INIT_EL_TAG_CTX_NULL │ │ │ │ -325 #undef INIT_EL_TAG_CTX_NULL │ │ │ │ -326#endif // INIT_EL_TAG_CTX_NULL │ │ │ │ -327 │ │ │ │ -328#ifdef INIT_EL_TAG_CTX_DFLT │ │ │ │ -329 #undef INIT_EL_TAG_CTX_DFLT │ │ │ │ -330#endif // INIT_EL_TAG_CTX_DFLT │ │ │ │ +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#ifdef INIT_EL_TAG_CTX_TAG │ │ │ │ -333 #undef INIT_EL_TAG_CTX_TAG │ │ │ │ -334#endif // INIT_EL_TAG_CTX_TAG │ │ │ │ -335 │ │ │ │ -336#ifdef INIT_ELEMENT_METHOD │ │ │ │ -337 #undef INIT_ELEMENT_METHOD │ │ │ │ -338#endif // INIT_ELEMENT_METHOD │ │ │ │ -339 │ │ │ │ -340#ifdef INIT_ELEMENT_FLAGS │ │ │ │ -341 #undef INIT_ELEMENT_FLAGS │ │ │ │ -342#endif // INIT_ELEMENT_FLAGS │ │ │ │ -343 │ │ │ │ -344#ifdef INIT_ELEMENT_DEFUN │ │ │ │ -345 #undef INIT_ELEMENT_DEFUN │ │ │ │ -346#endif // INIT_ELEMENT_DEFUN │ │ │ │ -347 │ │ │ │ -348#ifdef INIT_OBJECT │ │ │ │ -349 #undef INIT_OBJECT │ │ │ │ -350#endif // INIT_OBJECT │ │ │ │ -351 │ │ │ │ -352#ifdef INIT_ELEMENT_DECL │ │ │ │ -353 #undef INIT_ELEMENT_DECL │ │ │ │ -354#endif // INIT_ELEMENT_DECL │ │ │ │ -355 │ │ │ │ -356#ifdef INIT_ELEMENT_INITIALIZER │ │ │ │ -357 #undef INIT_ELEMENT_INITIALIZER │ │ │ │ -358#endif // INIT_ELEMENT_INITIALIZER │ │ │ │ +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#ifdef INIT_ELEMENT │ │ │ │ -361 #undef INIT_ELEMENT │ │ │ │ -362#endif // INIT_ELEMENT │ │ │ │ -363 │ │ │ │ -364#ifdef INIT_ELEMENT_NEEDED │ │ │ │ -365 #undef INIT_ELEMENT_NEEDED │ │ │ │ -366#endif // INIT_ELEMENT_NEEDED │ │ │ │ -367 │ │ │ │ -368#ifdef INIT_ELEMENT_SETUP │ │ │ │ -369 #undef INIT_ELEMENT_SETUP │ │ │ │ -370#endif // INIT_ELEMENT_SETUP │ │ │ │ -371 │ │ │ │ -372#ifdef INIT_OBJECT_SINGLE │ │ │ │ -373 #undef INIT_OBJECT_SINGLE │ │ │ │ -374#endif // INIT_OBJECT_SINGLE │ │ │ │ -375 │ │ │ │ -376#ifdef INIT_ELEMENT_SINGLE │ │ │ │ -377 #undef INIT_ELEMENT_SINGLE │ │ │ │ -378#endif // INIT_ELEMENT_SINGLE │ │ │ │ -379 │ │ │ │ -380#ifdef vertex_of_wall_2d │ │ │ │ -381 #undef vertex_of_wall_2d │ │ │ │ -382#endif // vertex_of_wall_2d │ │ │ │ -383 │ │ │ │ -384#ifdef PARAM_STRATEGY_MASK │ │ │ │ -385 #undef PARAM_STRATEGY_MASK │ │ │ │ -386#endif // PARAM_STRATEGY_MASK │ │ │ │ -387 │ │ │ │ -388#ifdef PARAM_PERIODIC_COORDS │ │ │ │ -389 #undef PARAM_PERIODIC_COORDS │ │ │ │ -390#endif // PARAM_PERIODIC_COORDS │ │ │ │ -391 │ │ │ │ -392#ifdef FILL_EL_DET │ │ │ │ -393 #undef FILL_EL_DET │ │ │ │ -394#endif // FILL_EL_DET │ │ │ │ -395 │ │ │ │ -396#ifdef FILL_EL_LAMBDA │ │ │ │ -397 #undef FILL_EL_LAMBDA │ │ │ │ -398#endif // FILL_EL_LAMBDA │ │ │ │ -399 │ │ │ │ -400#ifdef FILL_EL_WALL_SHIFT │ │ │ │ -401 #undef FILL_EL_WALL_SHIFT │ │ │ │ -402#endif // FILL_EL_WALL_SHIFT │ │ │ │ -403 │ │ │ │ -404#ifdef FILL_EL_WALL_MASK │ │ │ │ -405 #undef FILL_EL_WALL_MASK │ │ │ │ -406#endif // FILL_EL_WALL_MASK │ │ │ │ -407 │ │ │ │ -408#ifdef FILL_EL_WALL_DET │ │ │ │ -409 #undef FILL_EL_WALL_DET │ │ │ │ -410#endif // FILL_EL_WALL_DET │ │ │ │ -411 │ │ │ │ -412#ifdef FILL_EL_WALL_NORMAL │ │ │ │ -413 #undef FILL_EL_WALL_NORMAL │ │ │ │ -414#endif // FILL_EL_WALL_NORMAL │ │ │ │ -415 │ │ │ │ -416#ifdef FILL_EL_WALL_ORIENTATION │ │ │ │ -417 #undef FILL_EL_WALL_ORIENTATION │ │ │ │ -418#endif // FILL_EL_WALL_ORIENTATION │ │ │ │ -419 │ │ │ │ -420#ifdef FILL_EL_WALL_REL_ORIENTATION │ │ │ │ -421 #undef FILL_EL_WALL_REL_ORIENTATION │ │ │ │ -422#endif // FILL_EL_WALL_REL_ORIENTATION │ │ │ │ -423 │ │ │ │ -424#ifdef FILL_EL_WALL_DETS │ │ │ │ -425 #undef FILL_EL_WALL_DETS │ │ │ │ -426#endif // FILL_EL_WALL_DETS │ │ │ │ -427 │ │ │ │ -428#ifdef FILL_EL_WALL_NORMALS │ │ │ │ -429 #undef FILL_EL_WALL_NORMALS │ │ │ │ -430#endif // FILL_EL_WALL_NORMALS │ │ │ │ -431 │ │ │ │ -432#ifdef FILL_EL_WALL_ORIENTATIONS │ │ │ │ -433 #undef FILL_EL_WALL_ORIENTATIONS │ │ │ │ -434#endif // FILL_EL_WALL_ORIENTATIONS │ │ │ │ -435 │ │ │ │ -436#ifdef FILL_EL_WALL_REL_ORIENTATIONS │ │ │ │ -437 #undef FILL_EL_WALL_REL_ORIENTATIONS │ │ │ │ -438#endif // FILL_EL_WALL_REL_ORIENTATIONS │ │ │ │ -439 │ │ │ │ -440#ifdef BNDRY_FLAGS_INIT │ │ │ │ -441 #undef BNDRY_FLAGS_INIT │ │ │ │ -442#endif // BNDRY_FLAGS_INIT │ │ │ │ -443 │ │ │ │ -444#ifdef BNDRY_FLAGS_ALL │ │ │ │ -445 #undef BNDRY_FLAGS_ALL │ │ │ │ -446#endif // BNDRY_FLAGS_ALL │ │ │ │ -447 │ │ │ │ -448#ifdef BNDRY_FLAGS_CPY │ │ │ │ -449 #undef BNDRY_FLAGS_CPY │ │ │ │ -450#endif // BNDRY_FLAGS_CPY │ │ │ │ -451 │ │ │ │ -452#ifdef BNDRY_FLAGS_AND │ │ │ │ -453 #undef BNDRY_FLAGS_AND │ │ │ │ -454#endif // BNDRY_FLAGS_AND │ │ │ │ -455 │ │ │ │ -456#ifdef BNDRY_FLAGS_OR │ │ │ │ -457 #undef BNDRY_FLAGS_OR │ │ │ │ -458#endif // BNDRY_FLAGS_OR │ │ │ │ -459 │ │ │ │ -460#ifdef BNDRY_FLAGS_XOR │ │ │ │ -461 #undef BNDRY_FLAGS_XOR │ │ │ │ -462#endif // BNDRY_FLAGS_XOR │ │ │ │ -463 │ │ │ │ -464#ifdef BNDRY_FLAGS_IS_INTERIOR │ │ │ │ -465 #undef BNDRY_FLAGS_IS_INTERIOR │ │ │ │ -466#endif // BNDRY_FLAGS_IS_INTERIOR │ │ │ │ -467 │ │ │ │ -468#ifdef BNDRY_FLAGS_IS_AT_BNDRY │ │ │ │ -469 #undef BNDRY_FLAGS_IS_AT_BNDRY │ │ │ │ -470#endif // BNDRY_FLAGS_IS_AT_BNDRY │ │ │ │ -471 │ │ │ │ -472#ifdef BNDRY_FLAGS_SET │ │ │ │ -473 #undef BNDRY_FLAGS_SET │ │ │ │ -474#endif // BNDRY_FLAGS_SET │ │ │ │ -475 │ │ │ │ -476#ifdef BNDRY_FLAGS_IS_PARTOF │ │ │ │ -477 #undef BNDRY_FLAGS_IS_PARTOF │ │ │ │ -478#endif // BNDRY_FLAGS_IS_PARTOF │ │ │ │ -479 │ │ │ │ -480#ifdef BNDRY_FLAGS_FFBB │ │ │ │ -481 #undef BNDRY_FLAGS_FFBB │ │ │ │ -482#endif // BNDRY_FLAGS_FFBB │ │ │ │ -483 │ │ │ │ -484#ifdef RCLE_NONE │ │ │ │ -485 #undef RCLE_NONE │ │ │ │ -486#endif // RCLE_NONE │ │ │ │ -487 │ │ │ │ -488#ifdef RCLE_COARSE_EDGE_COMPAT │ │ │ │ -489 #undef RCLE_COARSE_EDGE_COMPAT │ │ │ │ -490#endif // RCLE_COARSE_EDGE_COMPAT │ │ │ │ -491 │ │ │ │ -492#ifdef FILL_NOTHING │ │ │ │ -493 #undef FILL_NOTHING │ │ │ │ -494#endif // FILL_NOTHING │ │ │ │ -495 │ │ │ │ -496#ifdef FILL_COORDS │ │ │ │ -497 #undef FILL_COORDS │ │ │ │ -498#endif // FILL_COORDS │ │ │ │ -499 │ │ │ │ -500#ifdef FILL_BOUND │ │ │ │ -501 #undef FILL_BOUND │ │ │ │ -502#endif // FILL_BOUND │ │ │ │ -503 │ │ │ │ -504#ifdef FILL_NEIGH │ │ │ │ -505 #undef FILL_NEIGH │ │ │ │ -506#endif // FILL_NEIGH │ │ │ │ -507 │ │ │ │ -508#ifdef FILL_OPP_COORDS │ │ │ │ -509 #undef FILL_OPP_COORDS │ │ │ │ -510#endif // FILL_OPP_COORDS │ │ │ │ -511 │ │ │ │ -512#ifdef FILL_ORIENTATION │ │ │ │ -513 #undef FILL_ORIENTATION │ │ │ │ -514#endif // FILL_ORIENTATION │ │ │ │ -515 │ │ │ │ -516#ifdef FILL_PROJECTION │ │ │ │ -517 #undef FILL_PROJECTION │ │ │ │ -518#endif // FILL_PROJECTION │ │ │ │ -519 │ │ │ │ -520#ifdef FILL_MACRO_WALLS │ │ │ │ -521 #undef FILL_MACRO_WALLS │ │ │ │ -522#endif // FILL_MACRO_WALLS │ │ │ │ -523 │ │ │ │ -524#ifdef FILL_WALL_MAP │ │ │ │ -525 #undef FILL_WALL_MAP │ │ │ │ -526#endif // FILL_WALL_MAP │ │ │ │ -527 │ │ │ │ -528#ifdef FILL_NON_PERIODIC │ │ │ │ -529 #undef FILL_NON_PERIODIC │ │ │ │ -530#endif // FILL_NON_PERIODIC │ │ │ │ -531 │ │ │ │ -532#ifdef FILL_MASTER_INFO │ │ │ │ -533 #undef FILL_MASTER_INFO │ │ │ │ -534#endif // FILL_MASTER_INFO │ │ │ │ -535 │ │ │ │ -536#ifdef FILL_ANY │ │ │ │ -537 #undef FILL_ANY │ │ │ │ -538#endif // FILL_ANY │ │ │ │ -539 │ │ │ │ -540#ifdef CALL_EVERY_EL_PREORDER │ │ │ │ -541 #undef CALL_EVERY_EL_PREORDER │ │ │ │ -542#endif // CALL_EVERY_EL_PREORDER │ │ │ │ -543 │ │ │ │ -544#ifdef CALL_EVERY_EL_INORDER │ │ │ │ -545 #undef CALL_EVERY_EL_INORDER │ │ │ │ -546#endif // CALL_EVERY_EL_INORDER │ │ │ │ -547 │ │ │ │ -548#ifdef CALL_EVERY_EL_POSTORDER │ │ │ │ -549 #undef CALL_EVERY_EL_POSTORDER │ │ │ │ -550#endif // CALL_EVERY_EL_POSTORDER │ │ │ │ -551 │ │ │ │ -552#ifdef CALL_LEAF_EL │ │ │ │ -553 #undef CALL_LEAF_EL │ │ │ │ -554#endif // CALL_LEAF_EL │ │ │ │ -555 │ │ │ │ -556#ifdef CALL_LEAF_EL_LEVEL │ │ │ │ -557 #undef CALL_LEAF_EL_LEVEL │ │ │ │ -558#endif // CALL_LEAF_EL_LEVEL │ │ │ │ -559 │ │ │ │ -560#ifdef CALL_EL_LEVEL │ │ │ │ -561 #undef CALL_EL_LEVEL │ │ │ │ -562#endif // CALL_EL_LEVEL │ │ │ │ -563 │ │ │ │ -564#ifdef CALL_MG_LEVEL │ │ │ │ -565 #undef CALL_MG_LEVEL │ │ │ │ -566#endif // CALL_MG_LEVEL │ │ │ │ -567 │ │ │ │ -568#ifdef TEST_FLAG │ │ │ │ -569 #undef TEST_FLAG │ │ │ │ -570#endif // TEST_FLAG │ │ │ │ -571 │ │ │ │ -572#ifdef ADM_FLAGS_MASK │ │ │ │ -573 #undef ADM_FLAGS_MASK │ │ │ │ -574#endif // ADM_FLAGS_MASK │ │ │ │ -575 │ │ │ │ -576#ifdef UCHAR_name │ │ │ │ -577 #undef UCHAR_name │ │ │ │ -578#endif // UCHAR_name │ │ │ │ -579 │ │ │ │ -580#ifdef uchar_VECNAME │ │ │ │ -581 #undef uchar_VECNAME │ │ │ │ -582#endif // uchar_VECNAME │ │ │ │ -583 │ │ │ │ -584#ifdef SCHAR_name │ │ │ │ -585 #undef SCHAR_name │ │ │ │ -586#endif // SCHAR_name │ │ │ │ -587 │ │ │ │ -588#ifdef schar_VECNAME │ │ │ │ -589 #undef schar_VECNAME │ │ │ │ -590#endif // schar_VECNAME │ │ │ │ -591 │ │ │ │ -592#ifdef INT_name │ │ │ │ -593 #undef INT_name │ │ │ │ -594#endif // INT_name │ │ │ │ -595 │ │ │ │ -596#ifdef int_VECNAME │ │ │ │ -597 #undef int_VECNAME │ │ │ │ -598#endif // int_VECNAME │ │ │ │ -599 │ │ │ │ -600#ifdef DOF_name │ │ │ │ -601 #undef DOF_name │ │ │ │ -602#endif // DOF_name │ │ │ │ -603 │ │ │ │ -604#ifdef dof_VECNAME │ │ │ │ -605 #undef dof_VECNAME │ │ │ │ -606#endif // dof_VECNAME │ │ │ │ -607 │ │ │ │ -608#ifdef PTR_name │ │ │ │ -609 #undef PTR_name │ │ │ │ -610#endif // PTR_name │ │ │ │ -611 │ │ │ │ -612#ifdef ptr_VECNAME │ │ │ │ -613 #undef ptr_VECNAME │ │ │ │ -614#endif // ptr_VECNAME │ │ │ │ -615 │ │ │ │ -616#ifdef REAL_name │ │ │ │ -617 #undef REAL_name │ │ │ │ -618#endif // REAL_name │ │ │ │ -619 │ │ │ │ -620#ifdef real_VECNAME │ │ │ │ -621 #undef real_VECNAME │ │ │ │ -622#endif // real_VECNAME │ │ │ │ -623 │ │ │ │ -624#ifdef REAL_D_name │ │ │ │ -625 #undef REAL_D_name │ │ │ │ -626#endif // REAL_D_name │ │ │ │ -627 │ │ │ │ -628#ifdef real_d_VECNAME │ │ │ │ -629 #undef real_d_VECNAME │ │ │ │ -630#endif // real_d_VECNAME │ │ │ │ -631 │ │ │ │ -632#ifdef BNDRY_name │ │ │ │ -633 #undef BNDRY_name │ │ │ │ -634#endif // BNDRY_name │ │ │ │ -635 │ │ │ │ -636#ifdef bndry_VECNAME │ │ │ │ -637 #undef bndry_VECNAME │ │ │ │ -638#endif // bndry_VECNAME │ │ │ │ -639 │ │ │ │ -640#ifdef DECL_DOF_EL_VEC │ │ │ │ -641 #undef DECL_DOF_EL_VEC │ │ │ │ -642#endif // DECL_DOF_EL_VEC │ │ │ │ -643 │ │ │ │ -644#ifdef PHI │ │ │ │ -645 #undef PHI │ │ │ │ -646#endif // PHI │ │ │ │ -647 │ │ │ │ -648#ifdef GRD_PHI │ │ │ │ -649 #undef GRD_PHI │ │ │ │ -650#endif // GRD_PHI │ │ │ │ -651 │ │ │ │ -652#ifdef D2_PHI │ │ │ │ -653 #undef D2_PHI │ │ │ │ -654#endif // D2_PHI │ │ │ │ -655 │ │ │ │ -656#ifdef D3_PHI │ │ │ │ -657 #undef D3_PHI │ │ │ │ -658#endif // D3_PHI │ │ │ │ -659 │ │ │ │ -660#ifdef D4_PHI │ │ │ │ -661 #undef D4_PHI │ │ │ │ -662#endif // D4_PHI │ │ │ │ -663 │ │ │ │ -664#ifdef PHI_D │ │ │ │ -665 #undef PHI_D │ │ │ │ -666#endif // PHI_D │ │ │ │ -667 │ │ │ │ -668#ifdef GRD_PHI_D │ │ │ │ -669 #undef GRD_PHI_D │ │ │ │ -670#endif // GRD_PHI_D │ │ │ │ -671 │ │ │ │ -672#ifdef D2_PHI_D │ │ │ │ -673 #undef D2_PHI_D │ │ │ │ -674#endif // D2_PHI_D │ │ │ │ -675 │ │ │ │ -676#ifdef GET_DOF_INDICES │ │ │ │ -677 #undef GET_DOF_INDICES │ │ │ │ -678#endif // GET_DOF_INDICES │ │ │ │ -679 │ │ │ │ -680#ifdef INTERPOL │ │ │ │ -681 #undef INTERPOL │ │ │ │ -682#endif // INTERPOL │ │ │ │ -683 │ │ │ │ -684#ifdef INTERPOL_D │ │ │ │ -685 #undef INTERPOL_D │ │ │ │ -686#endif // INTERPOL_D │ │ │ │ -687 │ │ │ │ -688#ifdef INTERPOL_DOW │ │ │ │ -689 #undef INTERPOL_DOW │ │ │ │ -690#endif // INTERPOL_DOW │ │ │ │ -691 │ │ │ │ -692#ifdef GET_BOUND │ │ │ │ -693 #undef GET_BOUND │ │ │ │ -694#endif // GET_BOUND │ │ │ │ -695 │ │ │ │ -696#ifdef LAGRANGE_NODES │ │ │ │ -697 #undef LAGRANGE_NODES │ │ │ │ -698#endif // LAGRANGE_NODES │ │ │ │ -699 │ │ │ │ -700#ifdef FILL_EL_QUAD_WORLD │ │ │ │ -701 #undef FILL_EL_QUAD_WORLD │ │ │ │ -702#endif // FILL_EL_QUAD_WORLD │ │ │ │ -703 │ │ │ │ -704#ifdef FILL_EL_QUAD_DET │ │ │ │ -705 #undef FILL_EL_QUAD_DET │ │ │ │ -706#endif // FILL_EL_QUAD_DET │ │ │ │ -707 │ │ │ │ -708#ifdef FILL_EL_QUAD_LAMBDA │ │ │ │ -709 #undef FILL_EL_QUAD_LAMBDA │ │ │ │ -710#endif // FILL_EL_QUAD_LAMBDA │ │ │ │ -711 │ │ │ │ -712#ifdef FILL_EL_QUAD_DLAMBDA │ │ │ │ -713 #undef FILL_EL_QUAD_DLAMBDA │ │ │ │ -714#endif // FILL_EL_QUAD_DLAMBDA │ │ │ │ -715 │ │ │ │ -716#ifdef FILL_EL_QUAD_GRD_WORLD │ │ │ │ -717 #undef FILL_EL_QUAD_GRD_WORLD │ │ │ │ -718#endif // FILL_EL_QUAD_GRD_WORLD │ │ │ │ -719 │ │ │ │ -720#ifdef FILL_EL_QUAD_D2_WORLD │ │ │ │ -721 #undef FILL_EL_QUAD_D2_WORLD │ │ │ │ -722#endif // FILL_EL_QUAD_D2_WORLD │ │ │ │ -723 │ │ │ │ -724#ifdef FILL_EL_QUAD_D3_WORLD │ │ │ │ -725 #undef FILL_EL_QUAD_D3_WORLD │ │ │ │ -726#endif // FILL_EL_QUAD_D3_WORLD │ │ │ │ -727 │ │ │ │ -728#ifdef FILL_EL_QUAD_WALL_DET │ │ │ │ -729 #undef FILL_EL_QUAD_WALL_DET │ │ │ │ -730#endif // FILL_EL_QUAD_WALL_DET │ │ │ │ -731 │ │ │ │ -732#ifdef FILL_EL_QUAD_WALL_NORMAL │ │ │ │ -733 #undef FILL_EL_QUAD_WALL_NORMAL │ │ │ │ -734#endif // FILL_EL_QUAD_WALL_NORMAL │ │ │ │ -735 │ │ │ │ -736#ifdef FILL_EL_QUAD_GRD_NORMAL │ │ │ │ -737 #undef FILL_EL_QUAD_GRD_NORMAL │ │ │ │ -738#endif // FILL_EL_QUAD_GRD_NORMAL │ │ │ │ -739 │ │ │ │ -740#ifdef FILL_EL_QUAD_D2_NORMAL │ │ │ │ -741 #undef FILL_EL_QUAD_D2_NORMAL │ │ │ │ -742#endif // FILL_EL_QUAD_D2_NORMAL │ │ │ │ -743 │ │ │ │ -744#ifdef INIT_PHI │ │ │ │ -745 #undef INIT_PHI │ │ │ │ -746#endif // INIT_PHI │ │ │ │ -747 │ │ │ │ -748#ifdef INIT_GRD_PHI │ │ │ │ -749 #undef INIT_GRD_PHI │ │ │ │ -750#endif // INIT_GRD_PHI │ │ │ │ -751 │ │ │ │ -752#ifdef INIT_D2_PHI │ │ │ │ -753 #undef INIT_D2_PHI │ │ │ │ -754#endif // INIT_D2_PHI │ │ │ │ -755 │ │ │ │ -756#ifdef INIT_D3_PHI │ │ │ │ -757 #undef INIT_D3_PHI │ │ │ │ -758#endif // INIT_D3_PHI │ │ │ │ -759 │ │ │ │ -760#ifdef INIT_D4_PHI │ │ │ │ -761 #undef INIT_D4_PHI │ │ │ │ -762#endif // INIT_D4_PHI │ │ │ │ -763 │ │ │ │ -764#ifdef INIT_TANGENTIAL │ │ │ │ -765 #undef INIT_TANGENTIAL │ │ │ │ -766#endif // INIT_TANGENTIAL │ │ │ │ -767 │ │ │ │ -768#ifdef MESH_REFINED │ │ │ │ -769 #undef MESH_REFINED │ │ │ │ -770#endif // MESH_REFINED │ │ │ │ -771 │ │ │ │ -772#ifdef MESH_COARSENED │ │ │ │ -773 #undef MESH_COARSENED │ │ │ │ -774#endif // MESH_COARSENED │ │ │ │ -775 │ │ │ │ -776#ifdef GRAPH_MESH_BOUNDARY │ │ │ │ -777 #undef GRAPH_MESH_BOUNDARY │ │ │ │ -778#endif // GRAPH_MESH_BOUNDARY │ │ │ │ -779 │ │ │ │ -780#ifdef GRAPH_MESH_ELEMENT_MARK │ │ │ │ -781 #undef GRAPH_MESH_ELEMENT_MARK │ │ │ │ -782#endif // GRAPH_MESH_ELEMENT_MARK │ │ │ │ -783 │ │ │ │ -784#ifdef GRAPH_MESH_VERTEX_DOF │ │ │ │ -785 #undef GRAPH_MESH_VERTEX_DOF │ │ │ │ -786#endif // GRAPH_MESH_VERTEX_DOF │ │ │ │ -787 │ │ │ │ -788#ifdef GRAPH_MESH_ELEMENT_INDEX │ │ │ │ -789 #undef GRAPH_MESH_ELEMENT_INDEX │ │ │ │ -790#endif // GRAPH_MESH_ELEMENT_INDEX │ │ │ │ -791 │ │ │ │ -792#ifdef GET_MESH │ │ │ │ -793 #undef GET_MESH │ │ │ │ -794#endif // GET_MESH │ │ │ │ -795 │ │ │ │ -796#ifdef GET_DOF_VEC │ │ │ │ -797 #undef GET_DOF_VEC │ │ │ │ -798#endif // GET_DOF_VEC │ │ │ │ -799 │ │ │ │ -800#ifdef TRACE_DOF_VEC_PROTO │ │ │ │ -801 #undef TRACE_DOF_VEC_PROTO │ │ │ │ -802#endif // TRACE_DOF_VEC_PROTO │ │ │ │ -803 │ │ │ │ -804#ifdef INIT_UH │ │ │ │ -805 #undef INIT_UH │ │ │ │ -806#endif // INIT_UH │ │ │ │ -807 │ │ │ │ -808#ifdef INIT_GRD_UH │ │ │ │ -809 #undef INIT_GRD_UH │ │ │ │ -810#endif // INIT_GRD_UH │ │ │ │ -811 │ │ │ │ -812#ifdef ellipt_est_d_init │ │ │ │ -813 #undef ellipt_est_d_init │ │ │ │ -814#endif // ellipt_est_d_init │ │ │ │ -815 │ │ │ │ -816#ifdef head_est_d_init │ │ │ │ -817 #undef head_est_d_init │ │ │ │ -818#endif // head_est_d_init │ │ │ │ -819 │ │ │ │ -820#ifdef element_est_d │ │ │ │ -821 #undef element_est_d │ │ │ │ -822#endif // element_est_d │ │ │ │ -823 │ │ │ │ -824#ifdef element_est_d_finish │ │ │ │ -825 #undef element_est_d_finish │ │ │ │ -826#endif // element_est_d_finish │ │ │ │ -827 │ │ │ │ -828#ifdef element_est_uh_d │ │ │ │ -829 #undef element_est_uh_d │ │ │ │ -830#endif // element_est_uh_d │ │ │ │ -831 │ │ │ │ -832#ifdef element_est_grd_uh_d │ │ │ │ -833 #undef element_est_grd_uh_d │ │ │ │ -834#endif // element_est_grd_uh_d │ │ │ │ -835 │ │ │ │ -836#ifdef ellipt_est_d_finish │ │ │ │ -837 #undef ellipt_est_d_finish │ │ │ │ -838#endif // ellipt_est_d_finish │ │ │ │ -839 │ │ │ │ -840#ifdef heat_est_d_finish │ │ │ │ -841 #undef heat_est_d_finish │ │ │ │ -842#endif // heat_est_d_finish │ │ │ │ -843 │ │ │ │ -844#ifdef TRAVERSE_FIRST │ │ │ │ -845 #undef TRAVERSE_FIRST │ │ │ │ -846#endif // TRAVERSE_FIRST │ │ │ │ -847 │ │ │ │ -848#ifdef TRAVERSE_NEXT │ │ │ │ -849 #undef TRAVERSE_NEXT │ │ │ │ -850#endif // TRAVERSE_NEXT │ │ │ │ -851 │ │ │ │ -852#ifdef TRAVERSE_START │ │ │ │ -853 #undef TRAVERSE_START │ │ │ │ -854#endif // TRAVERSE_START │ │ │ │ -855 │ │ │ │ -856#ifdef TRAVERSE_STOP │ │ │ │ -857 #undef TRAVERSE_STOP │ │ │ │ -858#endif // TRAVERSE_STOP │ │ │ │ -859 │ │ │ │ -860#ifdef TRAVERSE_NEIGHBOUR │ │ │ │ -861 #undef TRAVERSE_NEIGHBOUR │ │ │ │ -862#endif // TRAVERSE_NEIGHBOUR │ │ │ │ -863 │ │ │ │ -864#ifdef IFF_TAG_ALBERTA │ │ │ │ -865 #undef IFF_TAG_ALBERTA │ │ │ │ -866#endif // IFF_TAG_ALBERTA │ │ │ │ -867 │ │ │ │ -868#ifdef IFF_TAG_MESH │ │ │ │ -869 #undef IFF_TAG_MESH │ │ │ │ -870#endif // IFF_TAG_MESH │ │ │ │ -871 │ │ │ │ -872#ifdef IFF_TAG_REAL_VEC │ │ │ │ -873 #undef IFF_TAG_REAL_VEC │ │ │ │ -874#endif // IFF_TAG_REAL_VEC │ │ │ │ -875 │ │ │ │ -876#ifdef IFF_TAG_REAL_D_VEC │ │ │ │ -877 #undef IFF_TAG_REAL_D_VEC │ │ │ │ -878#endif // IFF_TAG_REAL_D_VEC │ │ │ │ -879 │ │ │ │ -880#ifdef IFF_TAG_INT_VEC │ │ │ │ -881 #undef IFF_TAG_INT_VEC │ │ │ │ -882#endif // IFF_TAG_INT_VEC │ │ │ │ -883 │ │ │ │ -884#ifdef IFF_TAG_UCHAR_VEC │ │ │ │ -885 #undef IFF_TAG_UCHAR_VEC │ │ │ │ -886#endif // IFF_TAG_UCHAR_VEC │ │ │ │ -887 │ │ │ │ -888#ifdef IFF_TAG_SCHAR_VEC │ │ │ │ -889 #undef IFF_TAG_SCHAR_VEC │ │ │ │ -890#endif // IFF_TAG_SCHAR_VEC │ │ │ │ +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_:_:_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 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00617.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: undefine-2.0.hh File Reference │ │ │ +dune-grid: geometrycache.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -69,25 +69,40 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
undefine-2.0.hh File Reference
│ │ │ +
│ │ │ +Classes | │ │ │ +Namespaces
│ │ │ +
geometrycache.hh File Reference
│ │ │
│ │ │
│ │ │ - │ │ │ -

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

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

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.

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

│ │ │ +Classes

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

│ │ │ +Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::Alberta
 
│ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,15 +1,25 @@ │ │ │ │ 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 │ │ │ │ +geometrycache.hh File Reference │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_i_s_c_._h_h> │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_a_l_g_e_b_r_a_._h_h> │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -********** 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_:_:_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 │ │ │ │ +  │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00617_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: undefine-2.0.hh Source File │ │ │ +dune-grid: geometrycache.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,476 +74,187 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
undefine-2.0.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:
│ │ │ -
12#ifdef _ALBERTA_H_
│ │ │ -
13 #undef _ALBERTA_H_
│ │ │ -
14#endif // _ALBERTA_H_
│ │ │ +
5#ifndef DUNE_ALBERTA_GEOMETRYCACHE_HH
│ │ │ +
6#define DUNE_ALBERTA_GEOMETRYCACHE_HH
│ │ │ +
7
│ │ │ + │ │ │ + │ │ │ +
10
│ │ │ +
11#if HAVE_ALBERTA
│ │ │ +
12
│ │ │ +
13namespace Dune
│ │ │ +
14{
│ │ │
15
│ │ │ -
16#ifdef ALBERTA_VERSION
│ │ │ -
17 #undef ALBERTA_VERSION
│ │ │ -
18#endif // ALBERTA_VERSION
│ │ │ -
19
│ │ │ -
20#ifdef ALBERTA_DEBUG
│ │ │ -
21 #undef ALBERTA_DEBUG
│ │ │ -
22#endif // ALBERTA_DEBUG
│ │ │ -
23
│ │ │ -
24#ifdef DIM_MAX
│ │ │ -
25 #undef DIM_MAX
│ │ │ -
26#endif // DIM_MAX
│ │ │ -
27
│ │ │ -
28#ifdef N_VERTICES
│ │ │ -
29 #undef N_VERTICES
│ │ │ -
30#endif // N_VERTICES
│ │ │ -
31
│ │ │ -
32#ifdef N_EDGES
│ │ │ -
33 #undef N_EDGES
│ │ │ -
34#endif // N_EDGES
│ │ │ -
35
│ │ │ -
36#ifdef N_WALLS
│ │ │ -
37 #undef N_WALLS
│ │ │ -
38#endif // N_WALLS
│ │ │ -
39
│ │ │ -
40#ifdef N_FACES
│ │ │ -
41 #undef N_FACES
│ │ │ -
42#endif // N_FACES
│ │ │ -
43
│ │ │ -
44#ifdef N_NEIGH
│ │ │ -
45 #undef N_NEIGH
│ │ │ -
46#endif // N_NEIGH
│ │ │ +
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);
│ │ │ +
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#ifdef DIM_FAC
│ │ │ -
49 #undef DIM_FAC
│ │ │ -
50#endif // DIM_FAC
│ │ │ -
51
│ │ │ -
52#ifdef N_VERTICES_0D
│ │ │ -
53 #undef N_VERTICES_0D
│ │ │ -
54#endif // N_VERTICES_0D
│ │ │ -
55
│ │ │ -
56#ifdef N_EDGES_0D
│ │ │ -
57 #undef N_EDGES_0D
│ │ │ -
58#endif // N_EDGES_0D
│ │ │ -
59
│ │ │ -
60#ifdef N_FACES_0D
│ │ │ -
61 #undef N_FACES_0D
│ │ │ -
62#endif // N_FACES_0D
│ │ │ -
63
│ │ │ -
64#ifdef N_NEIGH_0D
│ │ │ -
65 #undef N_NEIGH_0D
│ │ │ -
66#endif // N_NEIGH_0D
│ │ │ -
67
│ │ │ -
68#ifdef N_WALLS_0D
│ │ │ -
69 #undef N_WALLS_0D
│ │ │ -
70#endif // N_WALLS_0D
│ │ │ -
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
│ │ │ +
│ │ │ +
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#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
│ │ │ +
84
│ │ │ +
85
│ │ │ +
86 // GeometryCacheProxy
│ │ │ +
87 // ------------------
│ │ │ +
88
│ │ │ +
89 template< int dim >
│ │ │ +
│ │ │ + │ │ │ +
91 {
│ │ │ +
92 typedef FieldMatrix< Real, dimWorld, dim > JacobianInverseTransposed;
│ │ │ +
93 typedef FieldMatrix< Real, dim, dimWorld > JacobianTransposed;
│ │ │ +
94
│ │ │ +
│ │ │ +
95 GeometryCacheProxy ( GeometryCache< dim > &geometryCache, const ALBERTA EL_INFO &elInfo )
│ │ │ +
96 : geometryCache_( geometryCache ),
│ │ │ +
97 elInfo_( elInfo )
│ │ │ +
98 {}
│ │ │ +
│ │ │
99
│ │ │ -
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
│ │ │ +
│ │ │ + │ │ │ +
101 {
│ │ │ +
102 return geometryCache_.integrationElement( elInfo_ );
│ │ │ +
103 }
│ │ │ +
│ │ │ +
104
│ │ │ +
│ │ │ + │ │ │ +
106 {
│ │ │ +
107 return geometryCache_.jacobianTransposed( elInfo_ );
│ │ │ +
108 }
│ │ │ +
│ │ │ +
109
│ │ │ +
│ │ │ + │ │ │ +
111 {
│ │ │ +
112 return geometryCache_.jacobianInverseTransposed( elInfo_ );
│ │ │ +
113 }
│ │ │ +
│ │ │ +
114
│ │ │ +
115 private:
│ │ │ +
116 GeometryCache< dim > &geometryCache_;
│ │ │ +
117 const ALBERTA EL_INFO &elInfo_;
│ │ │ +
118 };
│ │ │ +
│ │ │
119
│ │ │ -
120#ifdef N_FACES_3D
│ │ │ -
121 #undef N_FACES_3D
│ │ │ -
122#endif // N_FACES_3D
│ │ │ +
120 } // namespace Alberta
│ │ │ +
121
│ │ │ +
122} // namespace Dune
│ │ │
123
│ │ │ -
124#ifdef N_NEIGH_3D
│ │ │ -
125 #undef N_NEIGH_3D
│ │ │ -
126#endif // N_NEIGH_3D
│ │ │ -
127
│ │ │ -
128#ifdef N_WALLS_3D
│ │ │ -
129 #undef N_WALLS_3D
│ │ │ -
130#endif // N_WALLS_3D
│ │ │ -
131
│ │ │ -
132#ifdef N_VERTICES_MAX
│ │ │ -
133 #undef N_VERTICES_MAX
│ │ │ -
134#endif // N_VERTICES_MAX
│ │ │ -
135
│ │ │ -
136#ifdef N_EDGES_MAX
│ │ │ -
137 #undef N_EDGES_MAX
│ │ │ -
138#endif // N_EDGES_MAX
│ │ │ -
139
│ │ │ -
140#ifdef N_FACES_MAX
│ │ │ -
141 #undef N_FACES_MAX
│ │ │ -
142#endif // N_FACES_MAX
│ │ │ -
143
│ │ │ -
144#ifdef N_NEIGH_MAX
│ │ │ -
145 #undef N_NEIGH_MAX
│ │ │ -
146#endif // N_NEIGH_MAX
│ │ │ -
147
│ │ │ -
148#ifdef N_WALLS_MAX
│ │ │ -
149 #undef N_WALLS_MAX
│ │ │ -
150#endif // N_WALLS_MAX
│ │ │ -
151
│ │ │ -
152#ifdef N_LAMBDA
│ │ │ -
153 #undef N_LAMBDA
│ │ │ -
154#endif // N_LAMBDA
│ │ │ -
155
│ │ │ -
156#ifdef LAMBDA_MAX
│ │ │ -
157 #undef LAMBDA_MAX
│ │ │ -
158#endif // LAMBDA_MAX
│ │ │ -
159
│ │ │ -
160#ifdef INDEX
│ │ │ -
161 #undef INDEX
│ │ │ -
162#endif // INDEX
│ │ │ -
163
│ │ │ -
164#ifdef INDEX
│ │ │ -
165 #undef INDEX
│ │ │ -
166#endif // INDEX
│ │ │ -
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
│ │ │ +
124#endif // #if HAVE_ALBERTA
│ │ │ +
125
│ │ │ +
126#endif // #ifndef DUNE_ALBERTA_GEOMETRYCACHE_HH
│ │ │ + │ │ │ +
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ + │ │ │ +
Include standard header files.
Definition agrid.hh:60
│ │ │ +
ALBERTA REAL Real
Definition misc.hh:48
│ │ │ +
static K determinant(const FieldMatrix< K, 0, m > &matrix)
Definition algebra.hh:30
│ │ │ +
static K invert(const FieldMatrix< K, 0, m > &matrix, FieldMatrix< K, m, 0 > &inverse)
Definition algebra.hh:81
│ │ │ +
static const int dimWorld
Definition misc.hh:46
│ │ │ +
ALBERTA REAL_D GlobalVector
Definition misc.hh:50
│ │ │ +
Definition geometrycache.hh:24
│ │ │ +
GeometryCache()
Definition geometrycache.hh:33
│ │ │ +
const Real & integrationElement(const ALBERTA EL_INFO &elInfo)
Definition geometrycache.hh:37
│ │ │ +
FieldMatrix< Real, dim, dimWorld > JacobianTransposed
Definition geometrycache.hh:31
│ │ │ +
const JacobianTransposed & jacobianTransposed(const ALBERTA EL_INFO &elInfo)
Definition geometrycache.hh:48
│ │ │ +
const JacobianInverseTransposed & jacobianInverseTransposed(const ALBERTA EL_INFO &elInfo)
Definition geometrycache.hh:66
│ │ │ +
FieldMatrix< Real, dimWorld, dim > JacobianInverseTransposed
Definition geometrycache.hh:30
│ │ │ +
Definition geometrycache.hh:91
│ │ │ +
const JacobianTransposed & jacobianTransposed()
Definition geometrycache.hh:105
│ │ │ +
FieldMatrix< Real, dim, dimWorld > JacobianTransposed
Definition geometrycache.hh:93
│ │ │ +
FieldMatrix< Real, dimWorld, dim > JacobianInverseTransposed
Definition geometrycache.hh:92
│ │ │ +
const Real & integrationElement()
Definition geometrycache.hh:100
│ │ │ +
GeometryCacheProxy(GeometryCache< dim > &geometryCache, const ALBERTA EL_INFO &elInfo)
Definition geometrycache.hh:95
│ │ │ +
const JacobianInverseTransposed & jacobianInverseTransposed()
Definition geometrycache.hh:110
│ │ │ +
Definition misc.hh:231
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,471 +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 │ │ │ │ -undefine-2.0.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: │ │ │ │ -12#ifdef _ALBERTA_H_ │ │ │ │ -13 #undef _ALBERTA_H_ │ │ │ │ -14#endif // _ALBERTA_H_ │ │ │ │ +5#ifndef DUNE_ALBERTA_GEOMETRYCACHE_HH │ │ │ │ +6#define DUNE_ALBERTA_GEOMETRYCACHE_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> │ │ │ │ +10 │ │ │ │ +11#if HAVE_ALBERTA │ │ │ │ +12 │ │ │ │ +13namespace _D_u_n_e │ │ │ │ +14{ │ │ │ │ 15 │ │ │ │ -16#ifdef ALBERTA_VERSION │ │ │ │ -17 #undef ALBERTA_VERSION │ │ │ │ -18#endif // ALBERTA_VERSION │ │ │ │ -19 │ │ │ │ -20#ifdef ALBERTA_DEBUG │ │ │ │ -21 #undef ALBERTA_DEBUG │ │ │ │ -22#endif // ALBERTA_DEBUG │ │ │ │ -23 │ │ │ │ -24#ifdef DIM_MAX │ │ │ │ -25 #undef DIM_MAX │ │ │ │ -26#endif // DIM_MAX │ │ │ │ -27 │ │ │ │ -28#ifdef N_VERTICES │ │ │ │ -29 #undef N_VERTICES │ │ │ │ -30#endif // N_VERTICES │ │ │ │ -31 │ │ │ │ -32#ifdef N_EDGES │ │ │ │ -33 #undef N_EDGES │ │ │ │ -34#endif // N_EDGES │ │ │ │ -35 │ │ │ │ -36#ifdef N_WALLS │ │ │ │ -37 #undef N_WALLS │ │ │ │ -38#endif // N_WALLS │ │ │ │ -39 │ │ │ │ -40#ifdef N_FACES │ │ │ │ -41 #undef N_FACES │ │ │ │ -42#endif // N_FACES │ │ │ │ -43 │ │ │ │ -44#ifdef N_NEIGH │ │ │ │ -45 #undef N_NEIGH │ │ │ │ -46#endif // N_NEIGH │ │ │ │ +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); │ │ │ │ +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 │ │ │ │ -48#ifdef DIM_FAC │ │ │ │ -49 #undef DIM_FAC │ │ │ │ -50#endif // DIM_FAC │ │ │ │ -51 │ │ │ │ -52#ifdef N_VERTICES_0D │ │ │ │ -53 #undef N_VERTICES_0D │ │ │ │ -54#endif // N_VERTICES_0D │ │ │ │ -55 │ │ │ │ -56#ifdef N_EDGES_0D │ │ │ │ -57 #undef N_EDGES_0D │ │ │ │ -58#endif // N_EDGES_0D │ │ │ │ -59 │ │ │ │ -60#ifdef N_FACES_0D │ │ │ │ -61 #undef N_FACES_0D │ │ │ │ -62#endif // N_FACES_0D │ │ │ │ -63 │ │ │ │ -64#ifdef N_NEIGH_0D │ │ │ │ -65 #undef N_NEIGH_0D │ │ │ │ -66#endif // N_NEIGH_0D │ │ │ │ -67 │ │ │ │ -68#ifdef N_WALLS_0D │ │ │ │ -69 #undef N_WALLS_0D │ │ │ │ -70#endif // N_WALLS_0D │ │ │ │ -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 │ │ │ │ +_4_8 const _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d &_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d ( const _A_L_B_E_R_T_A EL_INFO &elInfo │ │ │ │ +) │ │ │ │ +49 { │ │ │ │ +50 if( (flags_ & flagJacobianTransposed) == 0 ) │ │ │ │ +51 { │ │ │ │ +52 assert( (elInfo.fill_flag & _F_i_l_l_F_l_a_g_s_<_ _d_i_m_ _>_:_:_c_o_o_r_d_s) != 0 ); │ │ │ │ +53 const _G_l_o_b_a_l_V_e_c_t_o_r &x = elInfo.coord[ 0 ]; │ │ │ │ +54 for( int i = 0; i < dim; ++i ) │ │ │ │ +55 { │ │ │ │ +56 const _G_l_o_b_a_l_V_e_c_t_o_r &y = elInfo.coord[ i+1 ]; │ │ │ │ +57 for( int j = 0; j < _d_i_m_W_o_r_l_d; ++j ) │ │ │ │ +58 jacobianTransposed_[ i ][ j ] = y[ j ] - x[ j ]; │ │ │ │ +59 } │ │ │ │ +60 flags_ |= flagJacobianTransposed; │ │ │ │ +61 } │ │ │ │ +62 return jacobianTransposed_; │ │ │ │ +63 } │ │ │ │ +64 │ │ │ │ +65 const _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d & │ │ │ │ +_6_6 _j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d ( const _A_L_B_E_R_T_A EL_INFO &elInfo ) │ │ │ │ +67 { │ │ │ │ +68 if( (flags_ & flagJacobianInverseTransposed) == 0 ) │ │ │ │ +69 { │ │ │ │ +70 integrationElement_ = std::abs( _i_n_v_e_r_t( _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d( elInfo ), │ │ │ │ +jacobianInverseTransposed_ ) ); │ │ │ │ +71 assert( integrationElement_ > 1e-14 ); │ │ │ │ +72 flags_ |= flagIntegrationElement | flagJacobianInverseTransposed; │ │ │ │ +73 } │ │ │ │ +74 return jacobianInverseTransposed_; │ │ │ │ +75 } │ │ │ │ +76 │ │ │ │ +77 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#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 │ │ │ │ +84 │ │ │ │ +85 │ │ │ │ +86 // GeometryCacheProxy │ │ │ │ +87 // ------------------ │ │ │ │ +88 │ │ │ │ +89 template< int dim > │ │ │ │ +_9_0 struct _G_e_o_m_e_t_r_y_C_a_c_h_e_P_r_o_x_y │ │ │ │ +91 { │ │ │ │ +_9_2 typedef FieldMatrix< Real, dimWorld, dim > _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d; │ │ │ │ +_9_3 typedef FieldMatrix< Real, dim, dimWorld > _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d; │ │ │ │ +94 │ │ │ │ +_9_5 _G_e_o_m_e_t_r_y_C_a_c_h_e_P_r_o_x_y ( _G_e_o_m_e_t_r_y_C_a_c_h_e_<_ _d_i_m_ _> &geometryCache, const _A_L_B_E_R_T_A │ │ │ │ +EL_INFO &elInfo ) │ │ │ │ +96 : geometryCache_( geometryCache ), │ │ │ │ +97 elInfo_( elInfo ) │ │ │ │ +98 {} │ │ │ │ 99 │ │ │ │ -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 │ │ │ │ +_1_0_0 const _R_e_a_l &_i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t () │ │ │ │ +101 { │ │ │ │ +102 return geometryCache_.integrationElement( elInfo_ ); │ │ │ │ +103 } │ │ │ │ +104 │ │ │ │ +_1_0_5 const _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d &_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d () │ │ │ │ +106 { │ │ │ │ +107 return geometryCache_.jacobianTransposed( elInfo_ ); │ │ │ │ +108 } │ │ │ │ +109 │ │ │ │ +_1_1_0 const _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d &_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d () │ │ │ │ +111 { │ │ │ │ +112 return geometryCache_.jacobianInverseTransposed( elInfo_ ); │ │ │ │ +113 } │ │ │ │ +114 │ │ │ │ +115 private: │ │ │ │ +116 _G_e_o_m_e_t_r_y_C_a_c_h_e_<_ _d_i_m_ _> &geometryCache_; │ │ │ │ +117 const _A_L_B_E_R_T_A EL_INFO &elInfo_; │ │ │ │ +118 }; │ │ │ │ 119 │ │ │ │ -120#ifdef N_FACES_3D │ │ │ │ -121 #undef N_FACES_3D │ │ │ │ -122#endif // N_FACES_3D │ │ │ │ +120 } // namespace Alberta │ │ │ │ +121 │ │ │ │ +122} // namespace Dune │ │ │ │ 123 │ │ │ │ -124#ifdef N_NEIGH_3D │ │ │ │ -125 #undef N_NEIGH_3D │ │ │ │ -126#endif // N_NEIGH_3D │ │ │ │ -127 │ │ │ │ -128#ifdef N_WALLS_3D │ │ │ │ -129 #undef N_WALLS_3D │ │ │ │ -130#endif // N_WALLS_3D │ │ │ │ -131 │ │ │ │ -132#ifdef N_VERTICES_MAX │ │ │ │ -133 #undef N_VERTICES_MAX │ │ │ │ -134#endif // N_VERTICES_MAX │ │ │ │ -135 │ │ │ │ -136#ifdef N_EDGES_MAX │ │ │ │ -137 #undef N_EDGES_MAX │ │ │ │ -138#endif // N_EDGES_MAX │ │ │ │ -139 │ │ │ │ -140#ifdef N_FACES_MAX │ │ │ │ -141 #undef N_FACES_MAX │ │ │ │ -142#endif // N_FACES_MAX │ │ │ │ -143 │ │ │ │ -144#ifdef N_NEIGH_MAX │ │ │ │ -145 #undef N_NEIGH_MAX │ │ │ │ -146#endif // N_NEIGH_MAX │ │ │ │ -147 │ │ │ │ -148#ifdef N_WALLS_MAX │ │ │ │ -149 #undef N_WALLS_MAX │ │ │ │ -150#endif // N_WALLS_MAX │ │ │ │ -151 │ │ │ │ -152#ifdef N_LAMBDA │ │ │ │ -153 #undef N_LAMBDA │ │ │ │ -154#endif // N_LAMBDA │ │ │ │ -155 │ │ │ │ -156#ifdef LAMBDA_MAX │ │ │ │ -157 #undef LAMBDA_MAX │ │ │ │ -158#endif // LAMBDA_MAX │ │ │ │ -159 │ │ │ │ -160#ifdef INDEX │ │ │ │ -161 #undef INDEX │ │ │ │ -162#endif // INDEX │ │ │ │ -163 │ │ │ │ -164#ifdef INDEX │ │ │ │ -165 #undef INDEX │ │ │ │ -166#endif // INDEX │ │ │ │ -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 │ │ │ │ +124#endif // #if HAVE_ALBERTA │ │ │ │ +125 │ │ │ │ +126#endif // #ifndef DUNE_ALBERTA_GEOMETRYCACHE_HH │ │ │ │ +_a_l_g_e_b_r_a_._h_h │ │ │ │ +_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_:_:_A_l_b_e_r_t_a_:_:_R_e_a_l │ │ │ │ +ALBERTA REAL Real │ │ │ │ +DDeeffiinniittiioonn misc.hh:48 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_e_t_e_r_m_i_n_a_n_t │ │ │ │ +static K determinant(const FieldMatrix< K, 0, m > &matrix) │ │ │ │ +DDeeffiinniittiioonn algebra.hh:30 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_i_n_v_e_r_t │ │ │ │ +static K invert(const FieldMatrix< K, 0, m > &matrix, FieldMatrix< K, m, 0 > │ │ │ │ +&inverse) │ │ │ │ +DDeeffiinniittiioonn algebra.hh:81 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_i_m_W_o_r_l_d │ │ │ │ +static const int dimWorld │ │ │ │ +DDeeffiinniittiioonn misc.hh:46 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r │ │ │ │ +ALBERTA REAL_D GlobalVector │ │ │ │ +DDeeffiinniittiioonn misc.hh:50 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e │ │ │ │ +DDeeffiinniittiioonn geometrycache.hh:24 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e │ │ │ │ +GeometryCache() │ │ │ │ +DDeeffiinniittiioonn geometrycache.hh:33 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_:_:_i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t │ │ │ │ +const Real & integrationElement(const ALBERTA EL_INFO &elInfo) │ │ │ │ +DDeeffiinniittiioonn geometrycache.hh:37 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_:_:_J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ +FieldMatrix< Real, dim, dimWorld > JacobianTransposed │ │ │ │ +DDeeffiinniittiioonn geometrycache.hh:31 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_:_:_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ +const JacobianTransposed & jacobianTransposed(const ALBERTA EL_INFO &elInfo) │ │ │ │ +DDeeffiinniittiioonn geometrycache.hh:48 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_:_:_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d │ │ │ │ +const JacobianInverseTransposed & jacobianInverseTransposed(const ALBERTA │ │ │ │ +EL_INFO &elInfo) │ │ │ │ +DDeeffiinniittiioonn geometrycache.hh:66 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_:_:_J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d │ │ │ │ +FieldMatrix< Real, dimWorld, dim > JacobianInverseTransposed │ │ │ │ +DDeeffiinniittiioonn geometrycache.hh:30 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_P_r_o_x_y │ │ │ │ +DDeeffiinniittiioonn geometrycache.hh:91 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_P_r_o_x_y_:_:_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ +const JacobianTransposed & jacobianTransposed() │ │ │ │ +DDeeffiinniittiioonn geometrycache.hh:105 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_P_r_o_x_y_:_:_J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ +FieldMatrix< Real, dim, dimWorld > JacobianTransposed │ │ │ │ +DDeeffiinniittiioonn geometrycache.hh:93 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_P_r_o_x_y_:_:_J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d │ │ │ │ +FieldMatrix< Real, dimWorld, dim > JacobianInverseTransposed │ │ │ │ +DDeeffiinniittiioonn geometrycache.hh:92 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_P_r_o_x_y_:_:_i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t │ │ │ │ +const Real & integrationElement() │ │ │ │ +DDeeffiinniittiioonn geometrycache.hh:100 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_P_r_o_x_y_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_P_r_o_x_y │ │ │ │ +GeometryCacheProxy(GeometryCache< dim > &geometryCache, const ALBERTA EL_INFO │ │ │ │ +&elInfo) │ │ │ │ +DDeeffiinniittiioonn geometrycache.hh:95 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_P_r_o_x_y_:_:_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d │ │ │ │ +const JacobianInverseTransposed & jacobianInverseTransposed() │ │ │ │ +DDeeffiinniittiioonn geometrycache.hh:110 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s │ │ │ │ +DDeeffiinniittiioonn misc.hh:231 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00620.html │ │ │ @@ -78,16 +78,16 @@ │ │ │ Namespaces │ │ │
treeiterator.hh File Reference
│ │ │ │ │ │
│ │ │
#include <utility>
│ │ │ #include <dune/common/hybridutilities.hh>
│ │ │ #include <dune/common/typetraits.hh>
│ │ │ -#include <dune/grid/albertagrid/elementinfo.hh>
│ │ │ -#include <dune/grid/albertagrid/meshpointer.hh>
│ │ │ +#include <dune/grid/albertagrid/elementinfo.hh>
│ │ │ +#include <dune/grid/albertagrid/meshpointer.hh>
│ │ │
│ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00620_source.html │ │ │ @@ -90,16 +90,16 @@ │ │ │
7#define DUNE_ALBERTA_TREEITERATOR_HH
│ │ │
8
│ │ │
9#include <utility>
│ │ │
10
│ │ │
11#include <dune/common/hybridutilities.hh>
│ │ │
12#include <dune/common/typetraits.hh>
│ │ │
13
│ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │
16
│ │ │
17#if HAVE_ALBERTA
│ │ │
18
│ │ │
19namespace Dune
│ │ │
20{
│ │ │
21
│ │ │
22 // AlbertaMarkerVector
│ │ │ @@ -602,15 +602,15 @@ │ │ │
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 ];
│ │ │ +
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 );
│ │ │ @@ -660,17 +660,17 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -
provides a wrapper for ALBERTA's mesh structure
│ │ │ -
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 mesh structure
│ │ │ +
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
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -541,21 +541,21 @@ │ │ │ │ 541 } │ │ │ │ 542 │ │ │ │ 543} │ │ │ │ 544 │ │ │ │ 545#endif // #if HAVE_ALBERTA │ │ │ │ 546 │ │ │ │ 547#endif // #ifndef DUNE_ALBERTA_TREEITERATOR_HH │ │ │ │ +_A_L_B_E_R_T_A │ │ │ │ +#define ALBERTA │ │ │ │ +DDeeffiinniittiioonn albertaheader.hh:29 │ │ │ │ _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 │ │ │ │ _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 │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00623.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: transformation.hh File Reference │ │ │ +dune-grid: meshpointer.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,34 +70,27 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ Namespaces
│ │ │ -
transformation.hh File Reference
│ │ │ +
meshpointer.cc File Reference
│ │ │
│ │ │
│ │ │ -
#include <dune/common/fvector.hh>
│ │ │ -#include <dune/grid/albertagrid/misc.hh>
│ │ │ -
│ │ │ -

Go to the source code of this file.

│ │ │ -

│ │ │ Classes

class  Dune::AlbertaMarkerVector< dim, dimworld >
 marker assigning subentities to one element containing them More...
│ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Classes

class  Dune::AlbertaTransformation
 
│ │ │ +
#include <dune/grid/albertagrid/meshpointer.hh>
│ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ + │ │ │

│ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::Alberta
 
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,21 +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 │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -transformation.hh File Reference │ │ │ │ -#include │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_i_s_c_._h_h> │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ -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 │ │ │ │ -  │ │ │ │ +_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/a00635.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: misc.hh File Reference │ │ │ +dune-grid: intersection.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,180 +72,49 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces | │ │ │ -Macros | │ │ │ -Typedefs | │ │ │ -Functions | │ │ │ -Variables
│ │ │ -
misc.hh File Reference
│ │ │ +Macros
│ │ │ +
intersection.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
struct  Dune::AlbertaGridIntersectionBase< Grid >::GlobalCoordReader< GridImp >
 
class  Dune::AlbertaIOError
 
class  Dune::Alberta::GlobalSpace
 
struct  Dune::Alberta::NumSubEntities< dim, 0 >
 
struct  Dune::Alberta::NumSubEntities< dim, dim >
 
struct  Dune::Alberta::NumSubEntities< 0, 0 >
 
struct  Dune::Alberta::NumSubEntities< 2, 1 >
 
struct  Dune::Alberta::NumSubEntities< 3, 1 >
 
struct  Dune::Alberta::NumSubEntities< 3, 2 >
 
struct  Dune::Alberta::CodimType< dim, 0 >
 
struct  Dune::Alberta::CodimType< dim, dim >
 
struct  Dune::Alberta::CodimType< 2, 1 >
 
struct  Dune::Alberta::CodimType< 3, 1 >
 
struct  Dune::Alberta::CodimType< 3, 2 >
 
struct  Dune::Alberta::FillFlags< dim >
 
struct  Dune::Alberta::RefinementEdge< dim >
 
struct  Dune::Alberta::RefinementEdge< 2 >
 
struct  Dune::Alberta::Dune2AlbertaNumbering< dim, codim >
 
struct  Dune::Alberta::Dune2AlbertaNumbering< 3, 2 >
 
struct  Dune::Alberta::Generic2AlbertaNumbering< dim, codim >
 
struct  Dune::Alberta::Generic2AlbertaNumbering< dim, 1 >
 
struct  Dune::Alberta::Generic2AlbertaNumbering< 1, 1 >
 
struct  Dune::Alberta::Generic2AlbertaNumbering< 3, 2 >
 
class  Dune::Alberta::NumberingMap< dim, Numbering >
 
struct  Dune::Alberta::MapVertices< dim, 0 >
 
struct  Dune::Alberta::MapVertices< 2, 1 >
 
struct  Dune::Alberta::MapVertices< 3, 1 >
 
struct  Dune::Alberta::MapVertices< 3, 2 >
 
struct  Dune::Alberta::MapVertices< dim, dim >
 
struct  Dune::Alberta::Twist< dim, subdim >
 
struct  Dune::Alberta::Twist< dim, 1 >
 
struct  Dune::Alberta::Twist< 1, 1 >
 
struct  Dune::Alberta::Twist< dim, 2 >
 
struct  Dune::Alberta::Twist< 2, 2 >
struct  Dune::AlbertaGridIntersectionBase< Grid >::LocalCoordReader< GridImp >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │

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

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ DUNE_ALBERTA_CACHE_COORDINATES

│ │ │ + │ │ │ +

◆ DUNE_ALBERTA_INTERSECTION_CC

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │
#define DUNE_ALBERTA_CACHE_COORDINATES   1#define DUNE_ALBERTA_INTERSECTION_CC
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -1,150 +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 | _M_a_c_r_o_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s | _V_a_r_i_a_b_l_e_s │ │ │ │ -misc.hh File Reference │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_a_l_b_e_r_t_a_h_e_a_d_e_r_._h_h> │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _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_E_r_r_o_r │ │ │ │ +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_I_O_E_r_r_o_r │ │ │ │ -  │ │ │ │ - class   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_S_p_a_c_e │ │ │ │ -  │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _d_i_m_,_ _0_ _> │ │ │ │ -  │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _d_i_m_,_ _d_i_m_ _> │ │ │ │ -  │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _0_,_ _0_ _> │ │ │ │ -  │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _2_,_ _1_ _> │ │ │ │ -  │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _3_,_ _1_ _> │ │ │ │ -  │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _3_,_ _2_ _> │ │ │ │ -  │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_d_i_m_T_y_p_e_<_ _d_i_m_,_ _0_ _> │ │ │ │ -  │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_d_i_m_T_y_p_e_<_ _d_i_m_,_ _d_i_m_ _> │ │ │ │ -  │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_d_i_m_T_y_p_e_<_ _2_,_ _1_ _> │ │ │ │ -  │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_d_i_m_T_y_p_e_<_ _3_,_ _1_ _> │ │ │ │ -  │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_C_o_d_i_m_T_y_p_e_<_ _3_,_ _2_ _> │ │ │ │ -  │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_<_ _d_i_m_ _> │ │ │ │ -  │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_R_e_f_i_n_e_m_e_n_t_E_d_g_e_<_ _d_i_m_ _> │ │ │ │ -  │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_R_e_f_i_n_e_m_e_n_t_E_d_g_e_<_ _2_ _> │ │ │ │ -  │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_u_n_e_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g_<_ _d_i_m_,_ _c_o_d_i_m_ _> │ │ │ │ -  │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_u_n_e_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g_<_ _3_,_ _2_ _> │ │ │ │ -  │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_n_e_r_i_c_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g_<_ _d_i_m_,_ _c_o_d_i_m_ _> │ │ │ │ -  │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_n_e_r_i_c_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g_<_ _d_i_m_,_ _1_ _> │ │ │ │ -  │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_n_e_r_i_c_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g_<_ _1_,_ _1_ _> │ │ │ │ -  │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_n_e_r_i_c_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g_<_ _3_,_ _2_ _> │ │ │ │ -  │ │ │ │ - class   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_b_e_r_i_n_g_M_a_p_<_ _d_i_m_,_ _N_u_m_b_e_r_i_n_g_ _> │ │ │ │ -  │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_p_V_e_r_t_i_c_e_s_<_ _d_i_m_,_ _0_ _> │ │ │ │ -  │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_p_V_e_r_t_i_c_e_s_<_ _2_,_ _1_ _> │ │ │ │ -  │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_p_V_e_r_t_i_c_e_s_<_ _3_,_ _1_ _> │ │ │ │ -  │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_p_V_e_r_t_i_c_e_s_<_ _3_,_ _2_ _> │ │ │ │ -  │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_p_V_e_r_t_i_c_e_s_<_ _d_i_m_,_ _d_i_m_ _> │ │ │ │ -  │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_T_w_i_s_t_<_ _d_i_m_,_ _s_u_b_d_i_m_ _> │ │ │ │ -  │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_T_w_i_s_t_<_ _d_i_m_,_ _1_ _> │ │ │ │ -  │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_T_w_i_s_t_<_ _1_,_ _1_ _> │ │ │ │ -  │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_T_w_i_s_t_<_ _d_i_m_,_ _2_ _> │ │ │ │ -  │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_T_w_i_s_t_<_ _2_,_ _2_ _> │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_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. │ │ │ │   │ │ │ │ -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___I_N_T_E_R_S_E_C_T_I_O_N___C_C │ │ │ │   │ │ │ │ ********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ -********** _?◆_? DDUUNNEE__AALLBBEERRTTAA__CCAACCHHEE__CCOOOORRDDIINNAATTEESS ********** │ │ │ │ -#define DUNE_ALBERTA_CACHE_COORDINATES   1 │ │ │ │ +********** _?◆_? 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/a00635_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: misc.hh Source File │ │ │ +dune-grid: intersection.cc Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,870 +74,618 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
misc.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_MISC_HH
│ │ │ -
6#define DUNE_ALBERTA_MISC_HH
│ │ │ +
5#ifndef DUNE_ALBERTA_INTERSECTION_CC
│ │ │ +
6#define DUNE_ALBERTA_INTERSECTION_CC
│ │ │
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
│ │ │ + │ │ │ +
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
│ │ │ -
24namespace Dune
│ │ │ -
25{
│ │ │ -
26
│ │ │ -
27 // Exceptions
│ │ │ -
28 // ----------
│ │ │ -
29
│ │ │ -
│ │ │ - │ │ │ -
31 : public Exception
│ │ │ -
32 {};
│ │ │ -
│ │ │ -
33
│ │ │ -
│ │ │ - │ │ │ -
35 : public IOError
│ │ │ -
36 {};
│ │ │ -
│ │ │ -
37
│ │ │ -
38
│ │ │ -
39
│ │ │ -
40 namespace Alberta
│ │ │ -
41 {
│ │ │ -
42
│ │ │ -
43 // Import Types
│ │ │ -
44 // ------------
│ │ │ -
45
│ │ │ -
46 static const int dimWorld = DIM_OF_WORLD;
│ │ │ +
24 template< class Grid >
│ │ │ + │ │ │ +
│ │ │ +
26 ::AlbertaGridIntersectionBase ( const EntityImp &entity, const int oppVertex )
│ │ │ +
27 : grid_( &entity.grid() ),
│ │ │ +
28 elementInfo_( entity.elementInfo() ),
│ │ │ +
29 oppVertex_( oppVertex )
│ │ │ +
30 {}
│ │ │ +
│ │ │ +
31
│ │ │ +
32
│ │ │ +
33 template< class Grid >
│ │ │ +
34 inline typename Grid::template Codim< 0 >::Entity
│ │ │ +
│ │ │ + │ │ │ +
36 {
│ │ │ + │ │ │ +
38 return EntityImp( grid(), elementInfo(), 0 );
│ │ │ +
39 }
│ │ │ +
│ │ │ +
40
│ │ │ +
41
│ │ │ +
42 template< class Grid >
│ │ │ +
│ │ │ + │ │ │ +
44 {
│ │ │ +
45 return elementInfo().isBoundary( oppVertex_ );
│ │ │ +
46 }
│ │ │ +
│ │ │
47
│ │ │ -
48 typedef ALBERTA REAL Real;
│ │ │ -
49 typedef ALBERTA REAL_B LocalVector; // in barycentric coordinates
│ │ │ -
50 typedef ALBERTA REAL_D GlobalVector;
│ │ │ -
51 typedef ALBERTA REAL_DD GlobalMatrix;
│ │ │ -
52 typedef ALBERTA AFF_TRAFO AffineTransformation;
│ │ │ -
53 typedef ALBERTA MESH Mesh;
│ │ │ -
54 typedef ALBERTA EL Element;
│ │ │ -
55
│ │ │ -
56 static const int meshRefined = MESH_REFINED;
│ │ │ -
57 static const int meshCoarsened = MESH_COARSENED;
│ │ │ -
58
│ │ │ -
59 static const int InteriorBoundary = INTERIOR;
│ │ │ -
60 static const int DirichletBoundary = DIRICHLET;
│ │ │ -
61 typedef ALBERTA BNDRY_TYPE BoundaryId;
│ │ │ -
62
│ │ │ -
63 typedef U_CHAR ElementType;
│ │ │ -
64
│ │ │ -
65 typedef ALBERTA FE_SPACE DofSpace;
│ │ │ -
66
│ │ │ -
67
│ │ │ -
68
│ │ │ -
69 // Memory Manipulation Functions
│ │ │ -
70 // -----------------------------
│ │ │ +
48
│ │ │ +
49 template< class Grid >
│ │ │ +
│ │ │ + │ │ │ +
51 {
│ │ │ +
52 if( boundary() )
│ │ │ +
53 {
│ │ │ +
54 const int id = elementInfo().boundaryId( oppVertex_ );
│ │ │ +
55 assert( id != 0 );
│ │ │ +
56 return id;
│ │ │ +
57 }
│ │ │ +
58 else
│ │ │ +
59 return 0;
│ │ │ +
60 }
│ │ │ +
│ │ │ +
61
│ │ │ +
│ │ │ + │ │ │ +
63 template< class Grid >
│ │ │ +
│ │ │ + │ │ │ +
65 {
│ │ │ +
│ │ │ +
66 assert( boundary() );
│ │ │ +
67 const Alberta::BasicNodeProjection *projection = elementInfo().boundaryProjection( oppVertex_ );
│ │ │ +
│ │ │ +
68 assert( projection );
│ │ │ +
│ │ │ +
69 return projection->boundaryIndex();
│ │ │ +
70 }
│ │ │
71
│ │ │ -
72 template< class Data >
│ │ │ -
│ │ │ -
73 inline Data *memAlloc ( size_t size )
│ │ │ -
74 {
│ │ │ -
75 return MEM_ALLOC( size, Data );
│ │ │ -
76 }
│ │ │ -
│ │ │ -
77
│ │ │ -
78 template< class Data >
│ │ │ -
│ │ │ -
79 inline Data *memCAlloc ( size_t size )
│ │ │ -
80 {
│ │ │ -
81 return MEM_CALLOC( size, Data );
│ │ │ -
82 }
│ │ │ -
│ │ │ -
83
│ │ │ -
84 template< class Data >
│ │ │ -
│ │ │ -
85 inline Data *memReAlloc ( Data *ptr, size_t oldSize, size_t newSize )
│ │ │ -
86 {
│ │ │ -
87 return MEM_REALLOC( ptr, oldSize, newSize, Data );
│ │ │ -
88 }
│ │ │ -
│ │ │ -
89
│ │ │ -
90 template< class Data >
│ │ │ -
│ │ │ -
91 inline void memFree ( Data *ptr, size_t size )
│ │ │ -
92 {
│ │ │ -
93 return MEM_FREE( ptr, size, Data );
│ │ │ -
94 }
│ │ │ -
│ │ │ -
95
│ │ │ -
96
│ │ │ +
│ │ │ + │ │ │ +
73 template< class Grid >
│ │ │ +
│ │ │ + │ │ │ +
75 {
│ │ │ +
│ │ │ +
76 const int face = (dimension > 1 ? oppVertex_ : 1-oppVertex_);
│ │ │ +
│ │ │ +
77 return grid().alberta2generic( 1, face );
│ │ │ +
│ │ │ +
78 }
│ │ │ +
79
│ │ │ +
│ │ │ + │ │ │ +
│ │ │ +
81 template< class Grid >
│ │ │ +
│ │ │ +
82 inline GeometryType AlbertaGridIntersectionBase< Grid >::type () const
│ │ │ +
83 {
│ │ │ +
84 return GeometryTypes::simplex( dimension-1 );
│ │ │ +
85 }
│ │ │ +
│ │ │ +
86
│ │ │ +
87
│ │ │ +
│ │ │ +
88 template< class Grid >
│ │ │ +
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
91 {
│ │ │ +
92 const typename Entity::Geometry geoInside = inside().geometry();
│ │ │ +
93
│ │ │ +
94 const int face = indexInInside();
│ │ │ +
95 auto refSimplex = ReferenceElements< ctype, dimension >::simplex();
│ │ │ +
96 FieldVector< ctype, dimension > refNormal = refSimplex.integrationOuterNormal( face );
│ │ │
97
│ │ │ -
98 // GlobalSpace
│ │ │ -
99 // -----------
│ │ │ +
98 const typename Entity::Geometry::JacobianInverseTransposed &jInvT
│ │ │ +
99 = geoInside.impl().jacobianInverseTransposed();
│ │ │
100
│ │ │ -
│ │ │ - │ │ │ -
102 {
│ │ │ -
103 typedef GlobalSpace This;
│ │ │ +
101 NormalVector normal;
│ │ │ +
102 jInvT.mv( refNormal, normal );
│ │ │ +
103 normal *= geoInside.impl().integrationElement();
│ │ │
104
│ │ │ -
105 public:
│ │ │ - │ │ │ - │ │ │ -
108
│ │ │ -
109 private:
│ │ │ -
110 Matrix identityMatrix_;
│ │ │ -
111 Vector nullVector_;
│ │ │ -
112
│ │ │ -
113 GlobalSpace ()
│ │ │ -
114 {
│ │ │ -
115 for( int i = 0; i < dimWorld; ++i )
│ │ │ -
116 {
│ │ │ -
117 for( int j = 0; j < dimWorld; ++j )
│ │ │ -
118 identityMatrix_[ i ][ j ] = Real( 0 );
│ │ │ -
119 identityMatrix_[ i ][ i ] = Real( 1 );
│ │ │ -
120 nullVector_[ i ] = Real( 0 );
│ │ │ -
121 }
│ │ │ -
122 }
│ │ │ -
123
│ │ │ -
124 static This &instance ()
│ │ │ -
125 {
│ │ │ -
126 static This theInstance;
│ │ │ -
127 return theInstance;
│ │ │ -
128 }
│ │ │ -
129
│ │ │ -
130 public:
│ │ │ -
│ │ │ -
131 static const Matrix &identityMatrix ()
│ │ │ -
132 {
│ │ │ -
133 return instance().identityMatrix_;
│ │ │ -
134 }
│ │ │ +
105 return normal;
│ │ │ +
106 }
│ │ │
│ │ │ -
135
│ │ │ +
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 static const Vector &nullVector ()
│ │ │ -
137 {
│ │ │ -
138 return instance().nullVector_;
│ │ │ -
139 }
│ │ │ -
│ │ │ -
140 };
│ │ │ -
│ │ │ +
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
│ │ │ -
143
│ │ │ -
144 // NumSubEntities
│ │ │ -
145 // --------------
│ │ │ -
146
│ │ │ -
147 template< int dim, int codim >
│ │ │ - │ │ │ +
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 template< int dim >
│ │ │ -
│ │ │ -
151 struct NumSubEntities< dim, 0 >
│ │ │ -
152 {
│ │ │ -
153 static const int value = 1;
│ │ │ -
154 };
│ │ │ -
│ │ │ -
155
│ │ │ -
156 template< int dim >
│ │ │ -
│ │ │ -
157 struct NumSubEntities< dim, dim >
│ │ │ -
158 {
│ │ │ -
159 static const int value = dim+1;
│ │ │ -
160 };
│ │ │ -
│ │ │ -
161
│ │ │ -
162 template<>
│ │ │ -
│ │ │ -
163 struct NumSubEntities< 0, 0 >
│ │ │ -
164 {
│ │ │ -
165 static const int value = 1;
│ │ │ -
166 };
│ │ │ +
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 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 };
│ │ │ +
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
│ │ │ -
188 // CodimType
│ │ │ -
189 // ---------
│ │ │ -
190
│ │ │ -
191 template< int dim, int codim >
│ │ │ -
192 struct CodimType;
│ │ │ +
187 template< class Grid >
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
190 {
│ │ │ +
191 return centerIntegrationOuterNormal();
│ │ │ +
192 }
│ │ │ +
│ │ │
193
│ │ │ -
194 template< int dim >
│ │ │ -
│ │ │ -
195 struct CodimType< dim, 0 >
│ │ │ -
196 {
│ │ │ -
197 static const int value = CENTER;
│ │ │ -
198 };
│ │ │ -
│ │ │ -
199
│ │ │ -
200 template< int dim >
│ │ │ -
│ │ │ -
201 struct CodimType< dim, dim >
│ │ │ -
202 {
│ │ │ -
203 static const int value = VERTEX;
│ │ │ -
204 };
│ │ │ -
│ │ │ -
205
│ │ │ -
206 template<>
│ │ │ -
│ │ │ -
207 struct CodimType< 2, 1 >
│ │ │ -
208 {
│ │ │ -
209 static const int value = EDGE;
│ │ │ -
210 };
│ │ │ -
│ │ │ -
211
│ │ │ -
212 template<>
│ │ │ -
│ │ │ -
213 struct CodimType< 3, 1 >
│ │ │ -
214 {
│ │ │ -
215 static const int value = FACE;
│ │ │ -
216 };
│ │ │ +
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 template<>
│ │ │ -
│ │ │ -
219 struct CodimType< 3, 2 >
│ │ │ -
220 {
│ │ │ -
221 static const int value = EDGE;
│ │ │ -
222 };
│ │ │ +
218
│ │ │ +
219 template< class Grid >
│ │ │ +
│ │ │ + │ │ │ +
221 {
│ │ │ +
222 return *grid_;
│ │ │ +
223 }
│ │ │
│ │ │ -
223
│ │ │
224
│ │ │
225
│ │ │ -
226 // FillFlags
│ │ │ -
227 // ---------
│ │ │ -
228
│ │ │ -
229 template< int dim >
│ │ │ -
│ │ │ - │ │ │ -
231 {
│ │ │ -
232 typedef ALBERTA FLAGS Flags;
│ │ │ +
226 template< class Grid >
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
229 {
│ │ │ +
230 assert( !!elementInfo_ );
│ │ │ +
231 return elementInfo_;
│ │ │ +
232 }
│ │ │ +
│ │ │ +
│ │ │
233
│ │ │ -
234 static const Flags nothing = FILL_NOTHING;
│ │ │ +
234
│ │ │
235
│ │ │ -
236 static const Flags coords = FILL_COORDS;
│ │ │ -
237
│ │ │ -
238 static const Flags neighbor = FILL_NEIGH;
│ │ │ -
239
│ │ │ -
240 static const Flags orientation = (dim == 3 ? FILL_ORIENTATION : FILL_NOTHING);
│ │ │ -
241
│ │ │ -
242 static const Flags projection = FILL_PROJECTION;
│ │ │ +
236 // AlbertaGridIntersectionBase::GlobalCoordReader
│ │ │ +
237 // ----------------------------------------------
│ │ │ +
238
│ │ │ +
239 template< class GridImp >
│ │ │ +
│ │ │ + │ │ │ +
241 {
│ │ │ +
242 typedef typename std::remove_const< GridImp >::type Grid;
│ │ │
243
│ │ │ -
244 static const Flags elementType = FILL_NOTHING;
│ │ │ -
245
│ │ │ -
246 static const Flags boundaryId = FILL_MACRO_WALLS;
│ │ │ -
247
│ │ │ -
248 static const Flags nonPeriodic = FILL_NON_PERIODIC;
│ │ │ -
249
│ │ │ - │ │ │ - │ │ │ -
252
│ │ │ -
253 static const Flags standardWithCoords = all & ~nonPeriodic & ~projection;
│ │ │ -
254
│ │ │ -
255#if DUNE_ALBERTA_CACHE_COORDINATES
│ │ │ -
256 static const Flags standard = standardWithCoords & ~coords;
│ │ │ -
257#else
│ │ │ - │ │ │ -
259#endif
│ │ │ -
260 };
│ │ │ -
│ │ │ -
261
│ │ │ -
262
│ │ │ -
263
│ │ │ -
264 // RefinementEdge
│ │ │ -
265 // --------------
│ │ │ -
266
│ │ │ -
267 template< int dim >
│ │ │ -
│ │ │ - │ │ │ -
269 {
│ │ │ -
270 static const int value = 0;
│ │ │ -
271 };
│ │ │ -
│ │ │ -
272
│ │ │ -
273 template<>
│ │ │ -
│ │ │ -
274 struct RefinementEdge< 2 >
│ │ │ -
275 {
│ │ │ -
276 static const int value = 2;
│ │ │ -
277 };
│ │ │ -
│ │ │ -
278
│ │ │ -
279
│ │ │ -
280
│ │ │ -
281 // Dune2AlbertaNumbering
│ │ │ -
282 // ---------------------
│ │ │ -
283
│ │ │ -
284 template< int dim, int codim >
│ │ │ -
│ │ │ - │ │ │ -
286 {
│ │ │ -
│ │ │ -
287 static int apply ( const int i )
│ │ │ -
288 {
│ │ │ -
289 assert( (i >= 0) && (i < NumSubEntities< dim, codim >::value) );
│ │ │ -
290 return i;
│ │ │ -
291 }
│ │ │ -
│ │ │ -
292 };
│ │ │ -
│ │ │ -
293
│ │ │ -
294 template<>
│ │ │ -
│ │ │ - │ │ │ -
296 {
│ │ │ -
297 static const int numSubEntities = NumSubEntities< 3, 2 >::value;
│ │ │ -
298
│ │ │ -
│ │ │ -
299 static int apply ( const int i )
│ │ │ -
300 {
│ │ │ -
301 assert( (i >= 0) && (i < numSubEntities) );
│ │ │ -
302 static int dune2alberta[ numSubEntities ] = { 0, 3, 1, 2, 4, 5 };
│ │ │ -
303 return dune2alberta[ i ];
│ │ │ -
304 }
│ │ │ -
│ │ │ -
305 };
│ │ │ -
│ │ │ -
306
│ │ │ -
307
│ │ │ -
308
│ │ │ -
309 // Generic2AlbertaNumbering
│ │ │ -
310 // ------------------------
│ │ │ -
311
│ │ │ -
312 template< int dim, int codim >
│ │ │ -
│ │ │ - │ │ │ -
314 {
│ │ │ -
│ │ │ -
315 static int apply ( const int i )
│ │ │ -
316 {
│ │ │ -
317 assert( (i >= 0) && (i < NumSubEntities< dim, codim >::value) );
│ │ │ -
318 return i;
│ │ │ -
319 }
│ │ │ -
│ │ │ -
320 };
│ │ │ -
│ │ │ -
321
│ │ │ -
322 template< int dim >
│ │ │ -
│ │ │ - │ │ │ -
324 {
│ │ │ -
│ │ │ -
325 static int apply ( const int i )
│ │ │ -
326 {
│ │ │ -
327 assert( (i >= 0) && (i < NumSubEntities< dim, 1 >::value) );
│ │ │ -
328 return dim - i;
│ │ │ -
329 }
│ │ │ -
│ │ │ -
330 };
│ │ │ -
│ │ │ -
331
│ │ │ -
332 template<>
│ │ │ -
│ │ │ - │ │ │ -
334 {
│ │ │ -
│ │ │ -
335 static int apply ( const int i )
│ │ │ -
336 {
│ │ │ -
337 assert( (i >= 0) && (i < NumSubEntities< 1, 1 >::value) );
│ │ │ -
338 return i;
│ │ │ -
339 }
│ │ │ -
│ │ │ -
340 };
│ │ │ -
│ │ │ -
341
│ │ │ -
342 template<>
│ │ │ -
│ │ │ - │ │ │ -
344 {
│ │ │ -
345 static const int numSubEntities = NumSubEntities< 3, 2 >::value;
│ │ │ -
346
│ │ │ -
│ │ │ -
347 static int apply ( const int i )
│ │ │ -
348 {
│ │ │ -
349 assert( (i >= 0) && (i < numSubEntities) );
│ │ │ -
350 static int generic2alberta[ numSubEntities ] = { 0, 1, 3, 2, 4, 5 };
│ │ │ -
351 return generic2alberta[ i ];
│ │ │ -
352 }
│ │ │ -
│ │ │ -
353 };
│ │ │ +
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
│ │ │ -
356
│ │ │ -
357 // NumberingMap
│ │ │ -
358 // ------------
│ │ │ -
359
│ │ │ -
360 template< int dim, template< int, int > class Numbering = Generic2AlbertaNumbering >
│ │ │ -
│ │ │ - │ │ │ -
362 {
│ │ │ - │ │ │ -
364
│ │ │ -
365 template< int codim >
│ │ │ -
366 struct Initialize;
│ │ │ -
367
│ │ │ -
368 int *dune2alberta_[ dim+1 ];
│ │ │ -
369 int *alberta2dune_[ dim+1 ];
│ │ │ -
370 int numSubEntities_[ dim+1 ];
│ │ │ -
371
│ │ │ -
372 NumberingMap ( const This & );
│ │ │ -
373 This &operator= ( const This & );
│ │ │ -
374
│ │ │ -
375 public:
│ │ │ -
│ │ │ - │ │ │ -
377 {
│ │ │ -
378 Hybrid::forEach( std::make_index_sequence< dim+1 >{}, [ & ]( auto i ){ Initialize< i >::apply( *this ); } );
│ │ │ -
379 }
│ │ │ +
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
│ │ │ -
│ │ │ - │ │ │ -
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
│ │ │ +
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
│ │ │ -
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
│ │ │ + │ │ │ +
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
│ │ │ -
static int apply(int subEntity, int vertex)
Definition misc.hh:448
│ │ │ -
static int apply(int subEntity, int vertex)
Definition misc.hh:459
│ │ │ -
static int apply(int subEntity, int vertex)
Definition misc.hh:472
│ │ │ -
static int apply(int subEntity, int vertex)
Definition misc.hh:485
│ │ │ -
static int apply(int subEntity, int vertex)
Definition misc.hh:497
│ │ │ -
Definition misc.hh:532
│ │ │ -
static const int maxTwist
Definition misc.hh:536
│ │ │ -
static const int minTwist
Definition misc.hh:535
│ │ │ -
static int twist(const Element *element, int subEntity)
Definition misc.hh:538
│ │ │ -
static const int numSubEntities
Definition misc.hh:533
│ │ │ -
static int twist(const Element *element, int subEntity)
Definition misc.hh:554
│ │ │ -
static int twist(const Element *element, int subEntity)
Definition misc.hh:575
│ │ │ -
static int twist(const Element *element, int subEntity)
Definition misc.hh:592
│ │ │ -
static int twist(const Element *element, int subEntity)
Definition misc.hh:619
│ │ │ +
Definition 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,888 +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 │ │ │ │ -misc.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_MISC_HH │ │ │ │ -6#define DUNE_ALBERTA_MISC_HH │ │ │ │ +5#ifndef DUNE_ALBERTA_INTERSECTION_CC │ │ │ │ +_6#define DUNE_ALBERTA_INTERSECTION_CC │ │ │ │ 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 │ │ │ │ +8#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_i_n_t_e_r_s_e_c_t_i_o_n_._h_h> │ │ │ │ +9 │ │ │ │ +10namespace _D_u_n_e │ │ │ │ +11{ │ │ │ │ +12 │ │ │ │ +13 // AlbertaGridIntersectionBase │ │ │ │ +14 // --------------------------- │ │ │ │ +15 │ │ │ │ +16 template< class Grid > │ │ │ │ +17 inline AlbertaGridIntersectionBase< Grid > │ │ │ │ +_1_8 ::AlbertaGridIntersectionBase () │ │ │ │ +19 : grid_( nullptr ), │ │ │ │ +20 elementInfo_(), │ │ │ │ +21 oppVertex_( -1 ) // mark invalid intersection │ │ │ │ +22 {} │ │ │ │ 23 │ │ │ │ -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 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; │ │ │ │ +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 │ │ │ │ -_4_8 typedef _A_L_B_E_R_T_A REAL _R_e_a_l; │ │ │ │ -_4_9 typedef _A_L_B_E_R_T_A REAL_B _L_o_c_a_l_V_e_c_t_o_r; // in barycentric coordinates │ │ │ │ -_5_0 typedef _A_L_B_E_R_T_A REAL_D _G_l_o_b_a_l_V_e_c_t_o_r; │ │ │ │ -_5_1 typedef _A_L_B_E_R_T_A REAL_DD _G_l_o_b_a_l_M_a_t_r_i_x; │ │ │ │ -_5_2 typedef _A_L_B_E_R_T_A AFF_TRAFO _A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n; │ │ │ │ -_5_3 typedef _A_L_B_E_R_T_A MESH _M_e_s_h; │ │ │ │ -_5_4 typedef _A_L_B_E_R_T_A EL _E_l_e_m_e_n_t; │ │ │ │ -55 │ │ │ │ -_5_6 static const int _m_e_s_h_R_e_f_i_n_e_d = MESH_REFINED; │ │ │ │ -_5_7 static const int _m_e_s_h_C_o_a_r_s_e_n_e_d = MESH_COARSENED; │ │ │ │ -58 │ │ │ │ -_5_9 static const int _I_n_t_e_r_i_o_r_B_o_u_n_d_a_r_y = INTERIOR; │ │ │ │ -_6_0 static const int _D_i_r_i_c_h_l_e_t_B_o_u_n_d_a_r_y = DIRICHLET; │ │ │ │ -_6_1 typedef _A_L_B_E_R_T_A BNDRY_TYPE _B_o_u_n_d_a_r_y_I_d; │ │ │ │ -62 │ │ │ │ -_6_3 typedef U_CHAR _E_l_e_m_e_n_t_T_y_p_e; │ │ │ │ -64 │ │ │ │ -_6_5 typedef _A_L_B_E_R_T_A FE_SPACE _D_o_f_S_p_a_c_e; │ │ │ │ -66 │ │ │ │ -67 │ │ │ │ -68 │ │ │ │ -69 // Memory Manipulation Functions │ │ │ │ -70 // ----------------------------- │ │ │ │ +48 │ │ │ │ +49 template< class Grid > │ │ │ │ +_5_0 inline int _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_b_o_u_n_d_a_r_y_I_d () const │ │ │ │ +51 { │ │ │ │ +52 if( boundary() ) │ │ │ │ +53 { │ │ │ │ +54 const int id = elementInfo().boundaryId( oppVertex_ ); │ │ │ │ +55 assert( id != 0 ); │ │ │ │ +56 return id; │ │ │ │ +57 } │ │ │ │ +58 else │ │ │ │ +59 return 0; │ │ │ │ +60 } │ │ │ │ +61 │ │ │ │ +_6_2 │ │ │ │ +63 template< class Grid > │ │ │ │ +_6_4 inline size_t _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_b_o_u_n_d_a_r_y_S_e_g_m_e_n_t_I_n_d_e_x () │ │ │ │ +const │ │ │ │ +65 { │ │ │ │ +_6_6 assert( boundary() ); │ │ │ │ +67 const _A_l_b_e_r_t_a_:_:_B_a_s_i_c_N_o_d_e_P_r_o_j_e_c_t_i_o_n *projection = elementInfo │ │ │ │ +().boundaryProjection( oppVertex_ ); │ │ │ │ +_6_8 assert( projection ); │ │ │ │ +_6_9 return projection->_b_o_u_n_d_a_r_y_I_n_d_e_x(); │ │ │ │ +_7_0 } │ │ │ │ 71 │ │ │ │ -72 template< class Data > │ │ │ │ -_7_3 inline Data *_m_e_m_A_l_l_o_c ( size_t size ) │ │ │ │ -74 { │ │ │ │ -75 return MEM_ALLOC( size, Data ); │ │ │ │ -76 } │ │ │ │ -77 │ │ │ │ -78 template< class Data > │ │ │ │ -_7_9 inline Data *_m_e_m_C_A_l_l_o_c ( size_t size ) │ │ │ │ -80 { │ │ │ │ -81 return MEM_CALLOC( size, Data ); │ │ │ │ -82 } │ │ │ │ -83 │ │ │ │ -84 template< class Data > │ │ │ │ -_8_5 inline Data *_m_e_m_R_e_A_l_l_o_c ( Data *ptr, size_t oldSize, size_t newSize ) │ │ │ │ -86 { │ │ │ │ -87 return MEM_REALLOC( ptr, oldSize, newSize, Data ); │ │ │ │ -88 } │ │ │ │ -89 │ │ │ │ -90 template< class Data > │ │ │ │ -_9_1 inline void _m_e_m_F_r_e_e ( Data *ptr, size_t size ) │ │ │ │ -92 { │ │ │ │ -93 return MEM_FREE( ptr, size, Data ); │ │ │ │ -94 } │ │ │ │ -95 │ │ │ │ -96 │ │ │ │ +_7_2 │ │ │ │ +73 template< class Grid > │ │ │ │ +_7_4 inline int _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_i_n_d_e_x_I_n_I_n_s_i_d_e () const │ │ │ │ +75 { │ │ │ │ +_7_6 const int face = (dimension > 1 ? oppVertex_ : 1-oppVertex_); │ │ │ │ +_7_7 return grid().alberta2generic( 1, face ); │ │ │ │ +_7_8 } │ │ │ │ +79 │ │ │ │ +_8_0 │ │ │ │ +_8_1 template< class Grid > │ │ │ │ +_8_2 inline GeometryType _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_t_y_p_e () const │ │ │ │ +83 { │ │ │ │ +84 return GeometryTypes::simplex( dimension-1 ); │ │ │ │ +_8_5 } │ │ │ │ +86 │ │ │ │ +87 │ │ │ │ +_8_8 template< class Grid > │ │ │ │ +_8_9 inline typename _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_N_o_r_m_a_l_V_e_c_t_o_r │ │ │ │ +_9_0 _A_l_b_e_r_t_a_G_r_i_d_I_n_t_e_r_s_e_c_t_i_o_n_B_a_s_e_<_ _G_r_i_d_ _>_:_:_c_e_n_t_e_r_I_n_t_e_g_r_a_t_i_o_n_O_u_t_e_r_N_o_r_m_a_l () const │ │ │ │ +91 { │ │ │ │ +92 const typename _E_n_t_i_t_y_:_:_G_e_o_m_e_t_r_y geoInside = inside().geometry(); │ │ │ │ +93 │ │ │ │ +94 const int face = indexInInside(); │ │ │ │ +95 auto refSimplex = ReferenceElements< ctype, dimension >::simplex(); │ │ │ │ +96 FieldVector< ctype, dimension > refNormal = │ │ │ │ +refSimplex.integrationOuterNormal( face ); │ │ │ │ 97 │ │ │ │ -98 // GlobalSpace │ │ │ │ -99 // ----------- │ │ │ │ +98 const typename Entity::Geometry::JacobianInverseTransposed &jInvT │ │ │ │ +99 = geoInside.impl().jacobianInverseTransposed(); │ │ │ │ 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; │ │ │ │ +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 public: │ │ │ │ -_1_0_6 typedef _G_l_o_b_a_l_M_a_t_r_i_x _M_a_t_r_i_x; │ │ │ │ -_1_0_7 typedef _G_l_o_b_a_l_V_e_c_t_o_r _V_e_c_t_o_r; │ │ │ │ -108 │ │ │ │ -109 private: │ │ │ │ -110 _M_a_t_r_i_x identityMatrix_; │ │ │ │ -111 _V_e_c_t_o_r nullVector_; │ │ │ │ -112 │ │ │ │ -113 _G_l_o_b_a_l_S_p_a_c_e () │ │ │ │ -114 { │ │ │ │ -115 for( int i = 0; i < _d_i_m_W_o_r_l_d; ++i ) │ │ │ │ -116 { │ │ │ │ -117 for( int j = 0; j < _d_i_m_W_o_r_l_d; ++j ) │ │ │ │ -118 identityMatrix_[ i ][ j ] = _R_e_a_l( 0 ); │ │ │ │ -119 identityMatrix_[ i ][ i ] = _R_e_a_l( 1 ); │ │ │ │ -120 nullVector_[ i ] = _R_e_a_l( 0 ); │ │ │ │ -121 } │ │ │ │ -122 } │ │ │ │ -123 │ │ │ │ -124 static This &instance () │ │ │ │ -125 { │ │ │ │ -126 static This theInstance; │ │ │ │ -127 return theInstance; │ │ │ │ -128 } │ │ │ │ -129 │ │ │ │ -130 public: │ │ │ │ -_1_3_1 static const _M_a_t_r_i_x &_i_d_e_n_t_i_t_y_M_a_t_r_i_x () │ │ │ │ -132 { │ │ │ │ -133 return instance().identityMatrix_; │ │ │ │ -134 } │ │ │ │ -135 │ │ │ │ -_1_3_6 static const _V_e_c_t_o_r &_n_u_l_l_V_e_c_t_o_r () │ │ │ │ +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 return instance().nullVector_; │ │ │ │ -139 } │ │ │ │ -140 }; │ │ │ │ +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 │ │ │ │ -143 │ │ │ │ -144 // NumSubEntities │ │ │ │ -145 // -------------- │ │ │ │ -146 │ │ │ │ -147 template< int dim, int codim > │ │ │ │ -_1_4_8 struct _N_u_m_S_u_b_E_n_t_i_t_i_e_s; │ │ │ │ +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 template< int dim > │ │ │ │ -_1_5_1 struct _N_u_m_S_u_b_E_n_t_i_t_i_e_s< dim, 0 > │ │ │ │ -152 { │ │ │ │ -_1_5_3 static const int value = 1; │ │ │ │ -154 }; │ │ │ │ -155 │ │ │ │ -156 template< int dim > │ │ │ │ -_1_5_7 struct _N_u_m_S_u_b_E_n_t_i_t_i_e_s< dim, dim > │ │ │ │ -158 { │ │ │ │ -_1_5_9 static const int value = dim+1; │ │ │ │ -160 }; │ │ │ │ -161 │ │ │ │ -162 template<> │ │ │ │ -_1_6_3 struct _N_u_m_S_u_b_E_n_t_i_t_i_e_s< 0, 0 > │ │ │ │ -164 { │ │ │ │ -_1_6_5 static const int value = 1; │ │ │ │ -166 }; │ │ │ │ +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 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 }; │ │ │ │ +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 │ │ │ │ -188 // CodimType │ │ │ │ -189 // --------- │ │ │ │ -190 │ │ │ │ -191 template< int dim, int codim > │ │ │ │ -_1_9_2 struct _C_o_d_i_m_T_y_p_e; │ │ │ │ +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 template< int dim > │ │ │ │ -_1_9_5 struct _C_o_d_i_m_T_y_p_e< dim, 0 > │ │ │ │ -196 { │ │ │ │ -_1_9_7 static const int value = CENTER; │ │ │ │ -198 }; │ │ │ │ -199 │ │ │ │ -200 template< int dim > │ │ │ │ -_2_0_1 struct _C_o_d_i_m_T_y_p_e< dim, dim > │ │ │ │ -202 { │ │ │ │ -_2_0_3 static const int value = VERTEX; │ │ │ │ -204 }; │ │ │ │ -205 │ │ │ │ -206 template<> │ │ │ │ -_2_0_7 struct _C_o_d_i_m_T_y_p_e< 2, 1 > │ │ │ │ -208 { │ │ │ │ -_2_0_9 static const int value = EDGE; │ │ │ │ -210 }; │ │ │ │ -211 │ │ │ │ -212 template<> │ │ │ │ -_2_1_3 struct _C_o_d_i_m_T_y_p_e< 3, 1 > │ │ │ │ +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 { │ │ │ │ -_2_1_5 static const int value = FACE; │ │ │ │ -216 }; │ │ │ │ +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 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 │ │ │ │ +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 // 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; │ │ │ │ +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 │ │ │ │ -_2_3_4 static const _F_l_a_g_s _n_o_t_h_i_n_g = FILL_NOTHING; │ │ │ │ +234 │ │ │ │ 235 │ │ │ │ -_2_3_6 static const _F_l_a_g_s _c_o_o_r_d_s = FILL_COORDS; │ │ │ │ -237 │ │ │ │ -_2_3_8 static const _F_l_a_g_s _n_e_i_g_h_b_o_r = FILL_NEIGH; │ │ │ │ -239 │ │ │ │ -_2_4_0 static const _F_l_a_g_s _o_r_i_e_n_t_a_t_i_o_n = (dim == 3 ? FILL_ORIENTATION : │ │ │ │ -FILL_NOTHING); │ │ │ │ -241 │ │ │ │ -_2_4_2 static const _F_l_a_g_s _p_r_o_j_e_c_t_i_o_n = FILL_PROJECTION; │ │ │ │ +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 _F_l_a_g_s _e_l_e_m_e_n_t_T_y_p_e = FILL_NOTHING; │ │ │ │ -245 │ │ │ │ -_2_4_6 static const _F_l_a_g_s _b_o_u_n_d_a_r_y_I_d = FILL_MACRO_WALLS; │ │ │ │ -247 │ │ │ │ -_2_4_8 static const _F_l_a_g_s _n_o_n_P_e_r_i_o_d_i_c = FILL_NON_PERIODIC; │ │ │ │ -249 │ │ │ │ -_2_5_0 static const _F_l_a_g_s _a_l_l = _c_o_o_r_d_s | _n_e_i_g_h_b_o_r | _b_o_u_n_d_a_r_y_I_d | _n_o_n_P_e_r_i_o_d_i_c │ │ │ │ -251 | _o_r_i_e_n_t_a_t_i_o_n | _p_r_o_j_e_c_t_i_o_n | _e_l_e_m_e_n_t_T_y_p_e; │ │ │ │ -252 │ │ │ │ -_2_5_3 static const _F_l_a_g_s _s_t_a_n_d_a_r_d_W_i_t_h_C_o_o_r_d_s = _a_l_l & ~nonPeriodic & ~projection; │ │ │ │ -254 │ │ │ │ -255#if DUNE_ALBERTA_CACHE_COORDINATES │ │ │ │ -256 static const _F_l_a_g_s _s_t_a_n_d_a_r_d = _s_t_a_n_d_a_r_d_W_i_t_h_C_o_o_r_d_s & ~coords; │ │ │ │ -257#else │ │ │ │ -_2_5_8 static const _F_l_a_g_s _s_t_a_n_d_a_r_d = _s_t_a_n_d_a_r_d_W_i_t_h_C_o_o_r_d_s; │ │ │ │ -259#endif │ │ │ │ -260 }; │ │ │ │ -261 │ │ │ │ -262 │ │ │ │ -263 │ │ │ │ -264 // RefinementEdge │ │ │ │ -265 // -------------- │ │ │ │ -266 │ │ │ │ -267 template< int dim > │ │ │ │ -_2_6_8 struct _R_e_f_i_n_e_m_e_n_t_E_d_g_e │ │ │ │ -269 { │ │ │ │ -_2_7_0 static const int _v_a_l_u_e = 0; │ │ │ │ -271 }; │ │ │ │ -272 │ │ │ │ -273 template<> │ │ │ │ -_2_7_4 struct _R_e_f_i_n_e_m_e_n_t_E_d_g_e< 2 > │ │ │ │ -275 { │ │ │ │ -_2_7_6 static const int _v_a_l_u_e = 2; │ │ │ │ -277 }; │ │ │ │ -278 │ │ │ │ -279 │ │ │ │ -280 │ │ │ │ -281 // Dune2AlbertaNumbering │ │ │ │ -282 // --------------------- │ │ │ │ -283 │ │ │ │ -284 template< int dim, int codim > │ │ │ │ -_2_8_5 struct _D_u_n_e_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g │ │ │ │ -286 { │ │ │ │ -_2_8_7 static int _a_p_p_l_y ( const int i ) │ │ │ │ +_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( (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; │ │ │ │ +289 assert( false ); │ │ │ │ +290 return _c_t_y_p_e( 0 ); │ │ │ │ 291 } │ │ │ │ -292 }; │ │ │ │ -293 │ │ │ │ -294 template<> │ │ │ │ -_2_9_5 struct _D_u_n_e_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g< 3, 2 > │ │ │ │ -296 { │ │ │ │ -_2_9_7 static const int numSubEntities = _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _3_,_ _2_ _>_:_:_v_a_l_u_e; │ │ │ │ -298 │ │ │ │ -_2_9_9 static int _a_p_p_l_y ( const int i ) │ │ │ │ -300 { │ │ │ │ -301 assert( (i >= 0) && (i < numSubEntities) ); │ │ │ │ -302 static int dune2alberta[ numSubEntities ] = { 0, 3, 1, 2, 4, 5 }; │ │ │ │ -303 return dune2alberta[ i ]; │ │ │ │ -304 } │ │ │ │ -305 }; │ │ │ │ -306 │ │ │ │ -307 │ │ │ │ -308 │ │ │ │ -309 // Generic2AlbertaNumbering │ │ │ │ -310 // ------------------------ │ │ │ │ -311 │ │ │ │ -312 template< int dim, int codim > │ │ │ │ -_3_1_3 struct _G_e_n_e_r_i_c_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g │ │ │ │ -314 { │ │ │ │ -_3_1_5 static int _a_p_p_l_y ( const int i ) │ │ │ │ -316 { │ │ │ │ -317 assert( (i >= 0) && (i < _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _d_i_m_,_ _c_o_d_i_m_ _>_:_:_v_a_l_u_e) ); │ │ │ │ -318 return i; │ │ │ │ -319 } │ │ │ │ -320 }; │ │ │ │ -321 │ │ │ │ -322 template< int dim > │ │ │ │ -_3_2_3 struct _G_e_n_e_r_i_c_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g< dim, 1 > │ │ │ │ -324 { │ │ │ │ -_3_2_5 static int _a_p_p_l_y ( const int i ) │ │ │ │ -326 { │ │ │ │ -327 assert( (i >= 0) && (i < _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _d_i_m_,_ _1_ _>_:_:_v_a_l_u_e) ); │ │ │ │ -328 return dim - i; │ │ │ │ -329 } │ │ │ │ -330 }; │ │ │ │ -331 │ │ │ │ -332 template<> │ │ │ │ -_3_3_3 struct _G_e_n_e_r_i_c_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g< 1, 1 > │ │ │ │ -334 { │ │ │ │ -_3_3_5 static int _a_p_p_l_y ( const int i ) │ │ │ │ -336 { │ │ │ │ -337 assert( (i >= 0) && (i < _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _1_,_ _1_ _>_:_:_v_a_l_u_e) ); │ │ │ │ -338 return i; │ │ │ │ -339 } │ │ │ │ -340 }; │ │ │ │ -341 │ │ │ │ -342 template<> │ │ │ │ -_3_4_3 struct _G_e_n_e_r_i_c_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g< 3, 2 > │ │ │ │ -344 { │ │ │ │ -_3_4_5 static const int numSubEntities = _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _3_,_ _2_ _>_:_:_v_a_l_u_e; │ │ │ │ -346 │ │ │ │ -_3_4_7 static int _a_p_p_l_y ( const int i ) │ │ │ │ -348 { │ │ │ │ -349 assert( (i >= 0) && (i < numSubEntities) ); │ │ │ │ -350 static int generic2alberta[ numSubEntities ] = { 0, 1, 3, 2, 4, 5 }; │ │ │ │ -351 return generic2alberta[ i ]; │ │ │ │ -352 } │ │ │ │ -353 }; │ │ │ │ +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 │ │ │ │ -356 │ │ │ │ -357 // NumberingMap │ │ │ │ -358 // ------------ │ │ │ │ -359 │ │ │ │ -360 template< int dim, template< int, int > class Numbering = │ │ │ │ -Generic2AlbertaNumbering > │ │ │ │ -_3_6_1 class _N_u_m_b_e_r_i_n_g_M_a_p │ │ │ │ -362 { │ │ │ │ -363 typedef _N_u_m_b_e_r_i_n_g_M_a_p_<_ _d_i_m_,_ _N_u_m_b_e_r_i_n_g_ _> _T_h_i_s; │ │ │ │ -364 │ │ │ │ -365 template< int codim > │ │ │ │ -366 struct Initialize; │ │ │ │ -367 │ │ │ │ -368 int *dune2alberta_[ dim+1 ]; │ │ │ │ -369 int *alberta2dune_[ dim+1 ]; │ │ │ │ -370 int numSubEntities_[ dim+1 ]; │ │ │ │ -371 │ │ │ │ -372 _N_u_m_b_e_r_i_n_g_M_a_p ( const _T_h_i_s & ); │ │ │ │ -373 _T_h_i_s &operator= ( const _T_h_i_s & ); │ │ │ │ -374 │ │ │ │ -375 public: │ │ │ │ -_3_7_6 _N_u_m_b_e_r_i_n_g_M_a_p () │ │ │ │ -377 { │ │ │ │ -378 Hybrid::forEach( std::make_index_sequence< dim+1 >{}, [ & ]( auto i ) │ │ │ │ -{ Initialize< i >::apply( *this ); } ); │ │ │ │ +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 │ │ │ │ -_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 │ │ │ │ +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_:_:_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_:_:_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_:_:_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_:_:_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/a00638.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: meshpointer.hh File Reference │ │ │ +dune-grid: agrid.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,48 +71,95 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces
│ │ │ -
meshpointer.hh File Reference
│ │ │ +Namespaces | │ │ │ +Macros
│ │ │ +
agrid.hh File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

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

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

Go to the source code of this file.

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

│ │ │ Classes

class  Dune::Alberta::MeshPointer< dim >
 
class  Dune::Alberta::MeshPointer< dim >::MacroIterator
class  Dune::AlbertaGrid< dim, dimworld >
 [ provides Dune::Grid ] More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ +

│ │ │ Namespaces

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

│ │ │ +Macros

#define _ALBERTA_H_
 
│ │ │

Detailed Description

│ │ │ -

provides a wrapper for ALBERTA's mesh structure

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

provides the AlbertaGrid class

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

Macro Definition Documentation

│ │ │ + │ │ │ +

◆ _ALBERTA_H_

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define _ALBERTA_H_
│ │ │ +
│ │ │ + │ │ │ +
│ │ │ +
│ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,34 +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 │ │ │ │ -_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 │ │ │ │ +_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_/_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> │ │ │ │ +#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_:_:_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 │ │ │ │ +class   _D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _> │ │ │ │ +  [ pprroovviiddeess _DD_uu_nn_ee_::_::_GG_rr_ii_dd ] _M_o_r_e_._._. │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │   Include standard header files. │ │ │ │   │ │ │ │ -namespace   _D_u_n_e_:_:_A_l_b_e_r_t_a │ │ │ │ +MMaaccrrooss │ │ │ │ +#define  ___A_L_B_E_R_T_A___H__ │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -provides a wrapper for ALBERTA's mesh structure │ │ │ │ +provides the AlbertaGrid class │ │ │ │ Author │ │ │ │ - Martin Nolte │ │ │ │ + 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/a00638_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: meshpointer.hh Source File │ │ │ +dune-grid: agrid.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,623 +74,845 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
meshpointer.hh
│ │ │ +
agrid.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_MESHPOINTER_HH
│ │ │ -
6#define DUNE_ALBERTA_MESHPOINTER_HH
│ │ │ +
5#ifndef DUNE_ALBERTAGRID_IMP_HH
│ │ │ +
6#define DUNE_ALBERTAGRID_IMP_HH
│ │ │
7
│ │ │ -
13#include <limits>
│ │ │ -
14#include <string>
│ │ │ -
15
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
20
│ │ │ -
21#if HAVE_ALBERTA
│ │ │ -
22
│ │ │ -
23namespace Dune
│ │ │ -
24{
│ │ │ -
25
│ │ │ -
26 namespace Alberta
│ │ │ -
27 {
│ │ │ -
28
│ │ │ -
29 // External Forward Declarations
│ │ │ -
30 // -----------------------------
│ │ │ -
31
│ │ │ -
32 template< int dim >
│ │ │ -
33 class HierarchyDofNumbering;
│ │ │ +
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 // 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
│ │ │ -
│ │ │ - │ │ │ -
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 // 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 // --------------------
│ │ │ +
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 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
│ │ │ -
145 template< int dim >
│ │ │ -
146 template< int dimWorld >
│ │ │ -
147 struct MeshPointer< dim >::Library
│ │ │ -
148 {
│ │ │ - │ │ │ + │ │ │ + │ │ │ +
147
│ │ │ +
148 // the Traits
│ │ │ + │ │ │
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_);
│ │ │ + │ │ │ + │ │ │ +
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 increment ()
│ │ │ +
199 void unmark ( int count )
│ │ │
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 }
│ │ │ -
│ │ │ +
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
│ │ │ - │ │ │ -
│ │ │ -
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 };
│ │ │ -
│ │ │ +
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
│ │ │ -
252
│ │ │ -
253 // Implementation of MeshPointer
│ │ │ -
254 // -----------------------------
│ │ │ -
255
│ │ │ -
256 template< int dim >
│ │ │ -
│ │ │ - │ │ │ -
258 {
│ │ │ -
259 return (mesh_ ? mesh_->n_macro_el : 0);
│ │ │ -
260 }
│ │ │ -
│ │ │ -
261
│ │ │ +
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
│ │ │ -
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
│ │ │ +
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
│ │ │ -
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
│ │ │ +
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
│ │ │ -
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 }
│ │ │ -
│ │ │ +
330 template< int codim >
│ │ │ + │ │ │ +
332 leafend () const;
│ │ │ +
333
│ │ │ +
338 int size (int level, int codim) const;
│ │ │
339
│ │ │ -
340
│ │ │ -
341 template< int dim >
│ │ │ -
│ │ │ -
342 inline unsigned int MeshPointer< dim >::read ( const std::string &filename, Real &time )
│ │ │ -
343 {
│ │ │ -
344 release();
│ │ │ +
341 int size (int level, GeometryType type) const;
│ │ │ +
342
│ │ │ +
344 int size (int codim) const;
│ │ │
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 }
│ │ │ -
│ │ │ +
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
│ │ │ -
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
│ │ │ +
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
│ │ │ -
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;
│ │ │ +
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
│ │ │ -
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
│ │ │ -
│ │ │ +
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 }
│ │ │
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ - │ │ │ -
provides a wrapper for ALBERTA's macro_data structure
│ │ │ -
provides a wrapper for ALBERTA's el_info structure
│ │ │ -
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ +
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
│ │ │ +
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.
│ │ │ + │ │ │ + │ │ │ +
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
Contains #undefs for all preprocessor macros defined by alberta.
│ │ │ + │ │ │ + │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ -
ALBERTA MESH Mesh
Definition misc.hh:53
│ │ │
ALBERTA REAL Real
Definition misc.hh:48
│ │ │ -
static const int meshRefined
Definition misc.hh:56
│ │ │ -
static const int dimWorld
Definition misc.hh:46
│ │ │ -
static const int meshCoarsened
Definition misc.hh:57
│ │ │ -
Definition meshpointer.hh:40
│ │ │ -
int numMacroElements() const
Definition meshpointer.hh:257
│ │ │ -
unsigned int create(const MacroData< dim > &macroData, const ProjectionFactoryInterface< Proj, Impl > &projectionFactory)
Definition meshpointer.hh:312
│ │ │ -
void release()
Definition meshpointer.hh:361
│ │ │ -
unsigned int read(const std::string &filename, Real &time)
Definition meshpointer.hh:342
│ │ │ -
MacroIterator end() const
Definition meshpointer.hh:76
│ │ │ -
bool coarsen(typename FillFlags::Flags fillFlags=FillFlags::nothing)
Definition meshpointer.hh:398
│ │ │ -
int size(int codim) const
│ │ │ -
unsigned int create(const std::string &filename, bool binary=false)
Definition meshpointer.hh:331
│ │ │ -
void leafTraverse(Functor &functor, typename FillFlags::Flags fillFlags=FillFlags::standard) const
Definition meshpointer.hh:385
│ │ │ -
unsigned int create(const MacroData< dim > &macroData)
Definition meshpointer.hh:299
│ │ │ -
MacroIterator begin() const
Definition meshpointer.hh:71
│ │ │ -
MeshPointer(Mesh *mesh)
Definition meshpointer.hh:57
│ │ │ -
bool write(const std::string &filename, Real time) const
Definition meshpointer.hh:353
│ │ │ -
bool refine(typename FillFlags::Flags fillFlags=FillFlags::nothing)
Definition meshpointer.hh:407
│ │ │ -
MeshPointer()
Definition meshpointer.hh:53
│ │ │ -
void hierarchicTraverse(Functor &functor, typename FillFlags::Flags fillFlags=FillFlags::standard) const
Definition meshpointer.hh:370
│ │ │ -
Definition elementinfo.hh:43
│ │ │ -
void hierarchicTraverse(Functor &functor) const
Definition elementinfo.hh:695
│ │ │ -
void leafTraverse(Functor &functor) const
Definition elementinfo.hh:708
│ │ │ -
Definition macrodata.hh:30
│ │ │ -
void release()
release the macro data structure
Definition macrodata.hh:127
│ │ │ -
void read(const std::string &filename, bool binary=false)
Definition macrodata.hh:413
│ │ │ -
Definition macroelement.hh:24
│ │ │ -
bool isBoundary(const int face) const
Definition macroelement.hh:42
│ │ │ -
Definition meshpointer.hh:167
│ │ │ -
const MeshPointer & mesh() const
Definition meshpointer.hh:211
│ │ │ -
const MacroElement & macroElement() const
Definition meshpointer.hh:205
│ │ │ -
Alberta::ElementInfo< dim > ElementInfo
Definition meshpointer.hh:174
│ │ │ -
Alberta::MeshPointer< dim > MeshPointer
Definition meshpointer.hh:173
│ │ │ -
ElementInfo elementInfo(typename FillFlags::Flags fillFlags=FillFlags::standard) const
Definition meshpointer.hh:238
│ │ │ -
bool done() const
Definition meshpointer.hh:189
│ │ │ -
void increment()
Definition meshpointer.hh:199
│ │ │ -
bool equals(const MacroIterator &other) const
Definition meshpointer.hh:194
│ │ │ -
MacroIterator()
Definition meshpointer.hh:176
│ │ │ -
Definition misc.hh:231
│ │ │ -
static const Flags nothing
Definition misc.hh:234
│ │ │ -
ALBERTA FLAGS Flags
Definition misc.hh:232
│ │ │ -
static const Flags standard
Definition misc.hh:258
│ │ │ -
Definition albertagrid/projection.hh:135
│ │ │ -
Base::Projection Projection
Definition albertagrid/projection.hh:140
│ │ │ +
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
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
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:208
│ │ │ - │ │ │ +
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,643 +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 │ │ │ │ -meshpointer.hh │ │ │ │ +agrid.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ 3// -*- 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_IMP_HH │ │ │ │ +6#define DUNE_ALBERTAGRID_IMP_HH │ │ │ │ 7 │ │ │ │ -13#include │ │ │ │ -14#include │ │ │ │ -15 │ │ │ │ -16#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_i_s_c_._h_h> │ │ │ │ -17#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_e_l_e_m_e_n_t_i_n_f_o_._h_h> │ │ │ │ -18#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_a_c_r_o_d_a_t_a_._h_h> │ │ │ │ -19#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_p_r_o_j_e_c_t_i_o_n_._h_h> │ │ │ │ -20 │ │ │ │ -21#if HAVE_ALBERTA │ │ │ │ -22 │ │ │ │ -23namespace _D_u_n_e │ │ │ │ -24{ │ │ │ │ -25 │ │ │ │ -26 namespace Alberta │ │ │ │ -27 { │ │ │ │ -28 │ │ │ │ -29 // External Forward Declarations │ │ │ │ -30 // ----------------------------- │ │ │ │ -31 │ │ │ │ -32 template< int dim > │ │ │ │ -33 class HierarchyDofNumbering; │ │ │ │ +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 // 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 │ │ │ │ -_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 // 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 // -------------------- │ │ │ │ +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 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 │ │ │ │ -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; │ │ │ │ +_1_4_5 _s_t_a_t_i_c _c_o_n_s_t _i_n_t _d_i_m_e_n_s_i_o_n = _G_r_i_d_F_a_m_i_l_y_:_:_d_i_m_e_n_s_i_o_n; │ │ │ │ +_1_4_6 _s_t_a_t_i_c _c_o_n_s_t _i_n_t _d_i_m_e_n_s_i_o_n_w_o_r_l_d = _G_r_i_d_F_a_m_i_l_y_:_:_d_i_m_e_n_s_i_o_n_w_o_r_l_d; │ │ │ │ +147 │ │ │ │ +148 // the Traits │ │ │ │ +_1_4_9 _t_y_p_e_d_e_f _t_y_p_e_n_a_m_e _A_l_b_e_r_t_a_G_r_i_d_F_a_m_i_l_y< dim, dimworld >_:_:_T_r_a_i_t_s _T_r_a_i_t_s; │ │ │ │ 150 │ │ │ │ -151 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_); │ │ │ │ +_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 │ │ │ │ -_1_9_9 void _i_n_c_r_e_m_e_n_t () │ │ │ │ +199 void unmark ( int count ) │ │ │ │ 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 } │ │ │ │ +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 _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 }; │ │ │ │ +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 │ │ │ │ -252 │ │ │ │ -253 // Implementation of MeshPointer │ │ │ │ -254 // ----------------------------- │ │ │ │ -255 │ │ │ │ -256 template< int dim > │ │ │ │ -_2_5_7 inline int _M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_ _>_:_:_n_u_m_M_a_c_r_o_E_l_e_m_e_n_t_s () const │ │ │ │ -258 { │ │ │ │ -259 return (mesh_ ? mesh_->n_macro_el : 0); │ │ │ │ -260 } │ │ │ │ -261 │ │ │ │ +251 // 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 │ │ │ │ -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 │ │ │ │ +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 │ │ │ │ -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 │ │ │ │ +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 │ │ │ │ -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 } │ │ │ │ +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 │ │ │ │ -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(); │ │ │ │ +341 int _s_i_z_e (int level, GeometryType type) const; │ │ │ │ +342 │ │ │ │ +344 int _s_i_z_e (int codim) const; │ │ │ │ 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 } │ │ │ │ +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 │ │ │ │ -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 │ │ │ │ +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 │ │ │ │ -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; │ │ │ │ +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 │ │ │ │ -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 ) ) │ │ │ │ +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 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 │ │ │ │ +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#endif // #if HAVE_ALBERTA │ │ │ │ -468 │ │ │ │ -469#endif // #ifndef DUNE_ALBERTA_MESHPOINTER_HH │ │ │ │ -_m_i_s_c_._h_h │ │ │ │ -_m_a_c_r_o_d_a_t_a_._h_h │ │ │ │ -provides a wrapper for ALBERTA's macro_data structure │ │ │ │ -_e_l_e_m_e_n_t_i_n_f_o_._h_h │ │ │ │ -provides a wrapper for ALBERTA's el_info structure │ │ │ │ +_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 │ │ │ │ +_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. │ │ │ │ +_t_r_e_e_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_a_f_i_t_e_r_a_t_o_r_._h_h │ │ │ │ +_c_o_o_r_d_c_a_c_h_e_._h_h │ │ │ │ +_l_e_v_e_l_._h_h │ │ │ │ +_m_i_s_c_._h_h │ │ │ │ +_a_l_b_e_r_t_a_g_r_i_d_._c_c │ │ │ │ +_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 │ │ │ │ +_l_e_v_e_l_i_t_e_r_a_t_o_r_._h_h │ │ │ │ _D_u_n_e │ │ │ │ Include standard header files. │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h │ │ │ │ -ALBERTA MESH Mesh │ │ │ │ -DDeeffiinniittiioonn misc.hh:53 │ │ │ │ _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_R_e_a_l │ │ │ │ ALBERTA REAL Real │ │ │ │ DDeeffiinniittiioonn misc.hh:48 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_m_e_s_h_R_e_f_i_n_e_d │ │ │ │ -static const int meshRefined │ │ │ │ -DDeeffiinniittiioonn misc.hh:56 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_i_m_W_o_r_l_d │ │ │ │ -static const int dimWorld │ │ │ │ -DDeeffiinniittiioonn misc.hh:46 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_m_e_s_h_C_o_a_r_s_e_n_e_d │ │ │ │ -static const int meshCoarsened │ │ │ │ -DDeeffiinniittiioonn misc.hh:57 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:40 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_n_u_m_M_a_c_r_o_E_l_e_m_e_n_t_s │ │ │ │ -int numMacroElements() const │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:257 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_c_r_e_a_t_e │ │ │ │ -unsigned int create(const MacroData< dim > ¯oData, const │ │ │ │ -ProjectionFactoryInterface< Proj, Impl > &projectionFactory) │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:312 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_r_e_l_e_a_s_e │ │ │ │ -void release() │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:361 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_r_e_a_d │ │ │ │ -unsigned int read(const std::string &filename, Real &time) │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:342 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_e_n_d │ │ │ │ -MacroIterator end() const │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:76 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_c_o_a_r_s_e_n │ │ │ │ -bool coarsen(typename FillFlags::Flags fillFlags=FillFlags::nothing) │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:398 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_s_i_z_e │ │ │ │ -int size(int codim) const │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_c_r_e_a_t_e │ │ │ │ -unsigned int create(const std::string &filename, bool binary=false) │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:331 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_l_e_a_f_T_r_a_v_e_r_s_e │ │ │ │ -void leafTraverse(Functor &functor, typename FillFlags::Flags │ │ │ │ -fillFlags=FillFlags::standard) const │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:385 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_c_r_e_a_t_e │ │ │ │ -unsigned int create(const MacroData< dim > ¯oData) │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:299 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_b_e_g_i_n │ │ │ │ -MacroIterator begin() const │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:71 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_M_e_s_h_P_o_i_n_t_e_r │ │ │ │ -MeshPointer(Mesh *mesh) │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:57 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_w_r_i_t_e │ │ │ │ -bool write(const std::string &filename, Real time) const │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:353 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_r_e_f_i_n_e │ │ │ │ -bool refine(typename FillFlags::Flags fillFlags=FillFlags::nothing) │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:407 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_M_e_s_h_P_o_i_n_t_e_r │ │ │ │ -MeshPointer() │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:53 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_h_i_e_r_a_r_c_h_i_c_T_r_a_v_e_r_s_e │ │ │ │ -void hierarchicTraverse(Functor &functor, typename FillFlags::Flags │ │ │ │ -fillFlags=FillFlags::standard) const │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:370 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:43 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_h_i_e_r_a_r_c_h_i_c_T_r_a_v_e_r_s_e │ │ │ │ -void hierarchicTraverse(Functor &functor) const │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:695 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_l_e_a_f_T_r_a_v_e_r_s_e │ │ │ │ -void leafTraverse(Functor &functor) const │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:708 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:30 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_r_e_l_e_a_s_e │ │ │ │ -void release() │ │ │ │ -release the macro data structure │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:127 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_r_e_a_d │ │ │ │ -void read(const std::string &filename, bool binary=false) │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:413 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_E_l_e_m_e_n_t │ │ │ │ -DDeeffiinniittiioonn macroelement.hh:24 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_E_l_e_m_e_n_t_:_:_i_s_B_o_u_n_d_a_r_y │ │ │ │ -bool isBoundary(const int face) const │ │ │ │ -DDeeffiinniittiioonn macroelement.hh:42 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_M_a_c_r_o_I_t_e_r_a_t_o_r │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:167 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_M_a_c_r_o_I_t_e_r_a_t_o_r_:_:_m_e_s_h │ │ │ │ -const MeshPointer & mesh() const │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:211 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_M_a_c_r_o_I_t_e_r_a_t_o_r_:_:_m_a_c_r_o_E_l_e_m_e_n_t │ │ │ │ -const MacroElement & macroElement() const │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:205 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_M_a_c_r_o_I_t_e_r_a_t_o_r_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ -Alberta::ElementInfo< dim > ElementInfo │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:174 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_M_a_c_r_o_I_t_e_r_a_t_o_r_:_:_M_e_s_h_P_o_i_n_t_e_r │ │ │ │ -Alberta::MeshPointer< dim > MeshPointer │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:173 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_M_a_c_r_o_I_t_e_r_a_t_o_r_:_:_e_l_e_m_e_n_t_I_n_f_o │ │ │ │ -ElementInfo elementInfo(typename FillFlags::Flags fillFlags=FillFlags:: │ │ │ │ -standard) const │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:238 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_M_a_c_r_o_I_t_e_r_a_t_o_r_:_:_d_o_n_e │ │ │ │ -bool done() const │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:189 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_M_a_c_r_o_I_t_e_r_a_t_o_r_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ -void increment() │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:199 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_M_a_c_r_o_I_t_e_r_a_t_o_r_:_:_e_q_u_a_l_s │ │ │ │ -bool equals(const MacroIterator &other) const │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:194 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_M_a_c_r_o_I_t_e_r_a_t_o_r_:_:_M_a_c_r_o_I_t_e_r_a_t_o_r │ │ │ │ -MacroIterator() │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:176 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s │ │ │ │ -DDeeffiinniittiioonn misc.hh:231 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_n_o_t_h_i_n_g │ │ │ │ -static const Flags nothing │ │ │ │ -DDeeffiinniittiioonn misc.hh:234 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_F_l_a_g_s │ │ │ │ -ALBERTA FLAGS Flags │ │ │ │ -DDeeffiinniittiioonn misc.hh:232 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_s_t_a_n_d_a_r_d │ │ │ │ -static const Flags standard │ │ │ │ -DDeeffiinniittiioonn misc.hh:258 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_r_o_j_e_c_t_i_o_n_F_a_c_t_o_r_y │ │ │ │ -DDeeffiinniittiioonn albertagrid/projection.hh:135 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_r_o_j_e_c_t_i_o_n_F_a_c_t_o_r_y_:_:_P_r_o_j_e_c_t_i_o_n │ │ │ │ -Base::Projection Projection │ │ │ │ -DDeeffiinniittiioonn albertagrid/projection.hh:140 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_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_:_:_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 │ │ │ │ +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_ _> │ │ │ │ +_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_:_:_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_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/a00641.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: meshpointer.cc File Reference │ │ │ +dune-grid: albertaheader.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,28 +70,122 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -Namespaces
│ │ │ -
meshpointer.cc File Reference
│ │ │ +Macros
│ │ │ +
albertaheader.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <dune/grid/albertagrid/meshpointer.hh>
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ +
#include <alberta/alberta.h>
│ │ │ +
│ │ │ +

Go to the source code of this file.

│ │ │ +

│ │ │ -Namespaces

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

│ │ │ +Macros

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

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,18 +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 │ │ │ │ -_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. │ │ │ │ +_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 │ │ │ │   │ │ │ │ -namespace   _D_u_n_e_:_:_A_l_b_e_r_t_a │ │ │ │ +#define  _A_L_B_E_R_T_A   :: │ │ │ │   │ │ │ │ +#define  _A_L_B_E_R_T_A___D_E_B_U_G   0 │ │ │ │ +  │ │ │ │ +#define  ___M_A_X___N_O_T___D_E_F_I_N_E_D__ │ │ │ │ +  │ │ │ │ +#define  ___M_I_N___N_O_T___D_E_F_I_N_E_D__ │ │ │ │ +  │ │ │ │ +#define  ___A_B_S___N_O_T___D_E_F_I_N_E_D__ │ │ │ │ +  │ │ │ │ +********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ +********** _?◆_? __AABBSS__NNOOTT__DDEEFFIINNEEDD__ ********** │ │ │ │ +#define _ABS_NOT_DEFINED_ │ │ │ │ +********** _?◆_? __MMAAXX__NNOOTT__DDEEFFIINNEEDD__ ********** │ │ │ │ +#define _MAX_NOT_DEFINED_ │ │ │ │ +********** _?◆_? __MMIINN__NNOOTT__DDEEFFIINNEEDD__ ********** │ │ │ │ +#define _MIN_NOT_DEFINED_ │ │ │ │ +********** _?◆_? AALLBBEERRTTAA ********** │ │ │ │ +#define ALBERTA   :: │ │ │ │ +********** _?◆_? AALLBBEERRTTAA__DDEEBBUUGG ********** │ │ │ │ +#define ALBERTA_DEBUG   0 │ │ │ │ +********** _?◆_? DDIIMM__OOFF__WWOORRLLDD ********** │ │ │ │ +#define DIM_OF_WORLD   ALBERTA_DIM │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00647.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: macrodata.hh File Reference │ │ │ +dune-grid: macroelement.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,46 +72,34 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
macrodata.hh File Reference
│ │ │ +
macroelement.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 <dune/grid/albertagrid/misc.hh>
│ │ │
│ │ │

Go to the source code of this file.

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

│ │ │ Classes

class  Dune::Alberta::MacroData< dim >
 
struct  Dune::Alberta::MacroData< dim >::Library< int >
struct  Dune::Alberta::MacroElement< dim >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

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

Detailed Description

│ │ │ -

provides a wrapper for ALBERTA's macro_data structure

│ │ │ -
Author
Martin Nolte
│ │ │ -
│ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -2,32 +2,21 @@ │ │ │ │ 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 │ │ │ │ +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> │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_a_l_g_e_b_r_a_._h_h> │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_a_l_b_e_r_t_a_h_e_a_d_e_r_._h_h> │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ - class   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _> │ │ │ │ -  │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _>_:_:_L_i_b_r_a_r_y_<_ _i_n_t_ _> │ │ │ │ +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 │ │ │ │   │ │ │ │ -********** 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_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: macrodata.hh Source File │ │ │ +dune-grid: macroelement.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,518 +74,105 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
macrodata.hh
│ │ │ +
macroelement.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_MACROELEMENT_HH
│ │ │ +
6#define DUNE_ALBERTA_MACROELEMENT_HH
│ │ │
7
│ │ │ -
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;
│ │ │ + │ │ │ +
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 };
│ │ │ +
│ │ │ +
31
│ │ │
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;
│ │ │ +
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 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
│ │ │ -
│ │ │ - │ │ │ -
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 }
│ │ │ +
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 int elementCount () const
│ │ │ -
69 {
│ │ │ -
70 return (elementCount_ < 0 ? data_->n_macro_elements : elementCount_);
│ │ │ -
71 }
│ │ │ -
│ │ │ -
72
│ │ │ -
│ │ │ -
73 ElementId &element ( int i ) const;
│ │ │ -
│ │ │ -
74 GlobalVector &vertex ( int i ) const;
│ │ │ -
│ │ │ -
75 int &neighbor ( int element, int i ) const;
│ │ │ -
│ │ │ -
76 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 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 // 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
│ │ │ +
68#endif // #ifndef DUNE_ALBERTA_MACROELEMENT_HH
│ │ │ +
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ + │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ -
ALBERTA REAL_DD GlobalMatrix
Definition misc.hh:51
│ │ │ -
ALBERTA AFF_TRAFO AffineTransformation
Definition misc.hh:52
│ │ │ -
ALBERTA BNDRY_TYPE BoundaryId
Definition misc.hh:61
│ │ │
static const int InteriorBoundary
Definition misc.hh:59
│ │ │ -
ALBERTA REAL Real
Definition misc.hh:48
│ │ │ -
Data * memReAlloc(Data *ptr, size_t oldSize, size_t newSize)
Definition misc.hh:85
│ │ │ -
static const int DirichletBoundary
Definition misc.hh:60
│ │ │ -
static const int dimWorld
Definition misc.hh:46
│ │ │
ALBERTA REAL_D GlobalVector
Definition misc.hh:50
│ │ │ -
Definition macrodata.hh:30
│ │ │ -
friend struct InstantiateMacroDataLibrary
Definition macrodata.hh:45
│ │ │ -
BoundaryId & boundaryId(int element, int i) const
Definition macrodata.hh:272
│ │ │ -
int insertVertex(const GlobalVector &coords)
insert vertex
Definition macrodata.hh:149
│ │ │ -
int ElementId[numVertices]
Definition macrodata.hh:48
│ │ │ -
static const int supportPeriodicity
Definition macrodata.hh:50
│ │ │ -
void release()
release the macro data structure
Definition macrodata.hh:127
│ │ │ -
int elementCount() const
Definition macrodata.hh:68
│ │ │ -
GlobalVector & vertex(int i) const
Definition macrodata.hh:255
│ │ │ -
int vertexCount() const
Definition macrodata.hh:63
│ │ │ -
void markLongestEdge()
mark the longest edge of all elements as refinement edges
Definition macrodata.hh:325
│ │ │ -
int insertVertex(const FieldVector< Real, dimWorld > &coords)
insert vertex
Definition macrodata.hh:163
│ │ │ -
bool checkNeighbors() const
check the neighbor information
Definition macrodata.hh:339
│ │ │ -
void insertWallTrafo(const FieldMatrix< Real, dimWorld, dimWorld > &matrix, const FieldVector< Real, dimWorld > &shift)
Definition macrodata.hh:385
│ │ │ -
ElementId & element(int i) const
Definition macrodata.hh:246
│ │ │ -
void checkCycles()
Definition macrodata.hh:404
│ │ │ -
int & neighbor(int element, int i) const
Definition macrodata.hh:263
│ │ │ -
MacroData()
Definition macrodata.hh:52
│ │ │ -
void finalize()
compress macro data structure
Definition macrodata.hh:294
│ │ │ -
void insertWallTrafo(const GlobalMatrix &m, const GlobalVector &t)
Definition macrodata.hh:367
│ │ │ -
void setOrientation(const Real orientation)
set the orientation of all elements
Definition macrodata.hh:332
│ │ │ -
void create()
create a new macro data structure
Definition macrodata.hh:281
│ │ │ -
int insertElement(const ElementId &id)
insert element
Definition macrodata.hh:346
│ │ │ -
bool write(const std::string &filename, bool binary=false) const
Definition macrodata.hh:180
│ │ │ -
void read(const std::string &filename, bool binary=false)
Definition macrodata.hh:413
│ │ │ -
Definition macrodata.hh:220
│ │ │ -
static void markLongestEdge(MacroData &macroData)
│ │ │ -
Alberta::MacroData< dim > MacroData
Definition macrodata.hh:221
│ │ │ -
Definition misc.hh:148
│ │ │ +
Definition 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,531 +1,109 @@ │ │ │ │ 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 │ │ │ │ +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_ALBERTA_MACRODATA_HH │ │ │ │ -6#define DUNE_ALBERTA_MACRODATA_HH │ │ │ │ +5#ifndef DUNE_ALBERTA_MACROELEMENT_HH │ │ │ │ +6#define DUNE_ALBERTA_MACROELEMENT_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> │ │ │ │ -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; │ │ │ │ +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 │ │ │ │ +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 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; │ │ │ │ +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 public: │ │ │ │ -42 template< int > │ │ │ │ -43 struct _L_i_b_r_a_r_y; │ │ │ │ -44 │ │ │ │ -_4_5 template< int > friend struct _I_n_s_t_a_n_t_i_a_t_e_M_a_c_r_o_D_a_t_a_L_i_b_r_a_r_y; │ │ │ │ +41 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 public: │ │ │ │ -_4_8 typedef int _E_l_e_m_e_n_t_I_d[ numVertices ]; │ │ │ │ -49 │ │ │ │ -_5_0 static const int _s_u_p_p_o_r_t_P_e_r_i_o_d_i_c_i_t_y = 1; │ │ │ │ -51 │ │ │ │ -_5_2 _M_a_c_r_o_D_a_t_a () │ │ │ │ -53 : data_( NULL ), │ │ │ │ -54 vertexCount_( -1 ), │ │ │ │ -55 elementCount_( -1 ) │ │ │ │ -56 {} │ │ │ │ -57 │ │ │ │ -_5_8 operator Data * () const │ │ │ │ -59 { │ │ │ │ -60 return data_; │ │ │ │ -61 } │ │ │ │ -62 │ │ │ │ -_6_3 int _v_e_r_t_e_x_C_o_u_n_t () const │ │ │ │ -64 { │ │ │ │ -65 return (vertexCount_ < 0 ? data_->n_total_vertices : vertexCount_); │ │ │ │ -66 } │ │ │ │ -67 │ │ │ │ -_6_8 int _e_l_e_m_e_n_t_C_o_u_n_t () const │ │ │ │ -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 │ │ │ │ -_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 // 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 ) │ │ │ │ +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 │ │ │ │ -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 │ │ │ │ -_m_i_s_c_._h_h │ │ │ │ -_a_l_g_e_b_r_a_._h_h │ │ │ │ -_a_l_b_e_r_t_a_h_e_a_d_e_r_._h_h │ │ │ │ +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_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_M_a_t_r_i_x │ │ │ │ -ALBERTA REAL_DD GlobalMatrix │ │ │ │ -DDeeffiinniittiioonn misc.hh:51 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ -ALBERTA AFF_TRAFO AffineTransformation │ │ │ │ -DDeeffiinniittiioonn misc.hh:52 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_B_o_u_n_d_a_r_y_I_d │ │ │ │ -ALBERTA BNDRY_TYPE BoundaryId │ │ │ │ -DDeeffiinniittiioonn misc.hh:61 │ │ │ │ _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_I_n_t_e_r_i_o_r_B_o_u_n_d_a_r_y │ │ │ │ static const int InteriorBoundary │ │ │ │ DDeeffiinniittiioonn misc.hh:59 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_R_e_a_l │ │ │ │ -ALBERTA REAL Real │ │ │ │ -DDeeffiinniittiioonn misc.hh:48 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_m_e_m_R_e_A_l_l_o_c │ │ │ │ -Data * memReAlloc(Data *ptr, size_t oldSize, size_t newSize) │ │ │ │ -DDeeffiinniittiioonn misc.hh:85 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_i_r_i_c_h_l_e_t_B_o_u_n_d_a_r_y │ │ │ │ -static const int DirichletBoundary │ │ │ │ -DDeeffiinniittiioonn misc.hh:60 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_i_m_W_o_r_l_d │ │ │ │ -static const int dimWorld │ │ │ │ -DDeeffiinniittiioonn misc.hh:46 │ │ │ │ _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r │ │ │ │ ALBERTA REAL_D GlobalVector │ │ │ │ DDeeffiinniittiioonn misc.hh:50 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:30 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_I_n_s_t_a_n_t_i_a_t_e_M_a_c_r_o_D_a_t_a_L_i_b_r_a_r_y │ │ │ │ -friend struct InstantiateMacroDataLibrary │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:45 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_b_o_u_n_d_a_r_y_I_d │ │ │ │ -BoundaryId & boundaryId(int element, int i) const │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:272 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_i_n_s_e_r_t_V_e_r_t_e_x │ │ │ │ -int insertVertex(const GlobalVector &coords) │ │ │ │ -insert vertex │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:149 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_E_l_e_m_e_n_t_I_d │ │ │ │ -int ElementId[numVertices] │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:48 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_s_u_p_p_o_r_t_P_e_r_i_o_d_i_c_i_t_y │ │ │ │ -static const int supportPeriodicity │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:50 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_r_e_l_e_a_s_e │ │ │ │ -void release() │ │ │ │ -release the macro data structure │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:127 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_e_l_e_m_e_n_t_C_o_u_n_t │ │ │ │ -int elementCount() const │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:68 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_v_e_r_t_e_x │ │ │ │ -GlobalVector & vertex(int i) const │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:255 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_v_e_r_t_e_x_C_o_u_n_t │ │ │ │ -int vertexCount() const │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:63 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_m_a_r_k_L_o_n_g_e_s_t_E_d_g_e │ │ │ │ -void markLongestEdge() │ │ │ │ -mark the longest edge of all elements as refinement edges │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:325 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_i_n_s_e_r_t_V_e_r_t_e_x │ │ │ │ -int insertVertex(const FieldVector< Real, dimWorld > &coords) │ │ │ │ -insert vertex │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:163 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_c_h_e_c_k_N_e_i_g_h_b_o_r_s │ │ │ │ -bool checkNeighbors() const │ │ │ │ -check the neighbor information │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:339 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_i_n_s_e_r_t_W_a_l_l_T_r_a_f_o │ │ │ │ -void insertWallTrafo(const FieldMatrix< Real, dimWorld, dimWorld > &matrix, │ │ │ │ -const FieldVector< Real, dimWorld > &shift) │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:385 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_e_l_e_m_e_n_t │ │ │ │ -ElementId & element(int i) const │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:246 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_c_h_e_c_k_C_y_c_l_e_s │ │ │ │ -void checkCycles() │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:404 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_n_e_i_g_h_b_o_r │ │ │ │ -int & neighbor(int element, int i) const │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:263 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_M_a_c_r_o_D_a_t_a │ │ │ │ -MacroData() │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:52 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_f_i_n_a_l_i_z_e │ │ │ │ -void finalize() │ │ │ │ -compress macro data structure │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:294 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_i_n_s_e_r_t_W_a_l_l_T_r_a_f_o │ │ │ │ -void insertWallTrafo(const GlobalMatrix &m, const GlobalVector &t) │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:367 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_s_e_t_O_r_i_e_n_t_a_t_i_o_n │ │ │ │ -void setOrientation(const Real orientation) │ │ │ │ -set the orientation of all elements │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:332 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_c_r_e_a_t_e │ │ │ │ -void create() │ │ │ │ -create a new macro data structure │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:281 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_i_n_s_e_r_t_E_l_e_m_e_n_t │ │ │ │ -int insertElement(const ElementId &id) │ │ │ │ -insert element │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:346 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_w_r_i_t_e │ │ │ │ -bool write(const std::string &filename, bool binary=false) const │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:180 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_r_e_a_d │ │ │ │ -void read(const std::string &filename, bool binary=false) │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:413 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_L_i_b_r_a_r_y │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:220 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_L_i_b_r_a_r_y_:_:_m_a_r_k_L_o_n_g_e_s_t_E_d_g_e │ │ │ │ -static void markLongestEdge(MacroData ¯oData) │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_L_i_b_r_a_r_y_:_:_M_a_c_r_o_D_a_t_a │ │ │ │ -Alberta::MacroData< dim > MacroData │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:221 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_S_u_b_E_n_t_i_t_i_e_s │ │ │ │ -DDeeffiinniittiioonn misc.hh:148 │ │ │ │ +_D_u_n_e_:_:_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/a00650.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: macrodata.cc File Reference │ │ │ +dune-grid: dofvector.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,37 +70,60 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -Namespaces
│ │ │ -
macrodata.cc File Reference
│ │ │ +Classes | │ │ │ +Namespaces | │ │ │ +Functions
│ │ │ +
dofvector.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 <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

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

│ │ │ Namespaces

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

│ │ │ +Functions

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

Detailed Description

│ │ │ -

provides a wrapper for ALBERTA's macro_data structure

│ │ │ -
Author
Martin Nolte
│ │ │ -
│ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,26 +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 │ │ │ │ -_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 | _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> │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +CCllaasssseess │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _i_n_t_ _> │ │ │ │ +  │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _s_i_g_n_e_d_ _c_h_a_r_ _> │ │ │ │ +  │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _u_n_s_i_g_n_e_d_ _c_h_a_r_ _> │ │ │ │ +  │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _R_e_a_l_ _> │ │ │ │ +  │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _G_l_o_b_a_l_V_e_c_t_o_r_ _> │ │ │ │ +  │ │ │ │ + class   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_<_ _D_o_f_ _> │ │ │ │ +  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │   Include standard header files. │ │ │ │   │ │ │ │ namespace   _D_u_n_e_:_:_A_l_b_e_r_t_a │ │ │ │   │ │ │ │ -********** 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/a00653.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: leveliterator.hh File Reference │ │ │ +dune-grid: geometryreference.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,35 +72,41 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
leveliterator.hh File Reference
│ │ │ +
geometryreference.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <dune/grid/common/entityiterator.hh>
│ │ │ -#include <dune/grid/albertagrid/treeiterator.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::AlbertaGridLevelIterator< codim, pitype, GridImp >
class  Dune::GeometryReference< Implementation >
 
class  Dune::AlbertaGridLevelIterator< codim, Ghost_Partition, GridImp >
class  Dune::LocalGeometryReference< mydim, cdim, Grid >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

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

Detailed Description

│ │ │ +

Wrapper and interface classes for element geometries.

│ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -2,22 +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 │ │ │ │ -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> │ │ │ │ +geometryreference.hh File Reference │ │ │ │ +Wrapper and interface classes for element geometries. _M_o_r_e_._._. │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_e_o_m_e_t_r_y_._h_h> │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -class   _D_u_n_e_:_:_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_:_:_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_,_ _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_:_:_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/a00653_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: leveliterator.hh Source File │ │ │ +dune-grid: geometryreference.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,145 +74,225 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
leveliterator.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#ifndef DUNE_ALBERTA_LEVELITERATOR_HH
│ │ │ -
6#define DUNE_ALBERTA_LEVELITERATOR_HH
│ │ │ +
5#ifndef DUNE_GRID_ALBERTAGRID_GEOMETRYREFERENCE_HH
│ │ │ +
6#define DUNE_GRID_ALBERTAGRID_GEOMETRYREFERENCE_HH
│ │ │
7
│ │ │ - │ │ │ -
9
│ │ │ - │ │ │ -
11
│ │ │ -
12#if HAVE_ALBERTA
│ │ │ +
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 {}
│ │ │ -
│ │ │ +
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>())});
│ │ │
45
│ │ │ -
│ │ │ -
47 void increment ()
│ │ │ -
48 {
│ │ │ - │ │ │ -
50 }
│ │ │ -
│ │ │ -
51 };
│ │ │ -
│ │ │ +
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< int codim, class GridImp >
│ │ │ -
│ │ │ - │ │ │ -
56 : public AlbertaGridTreeIterator< codim, GridImp, false >
│ │ │ -
57 {
│ │ │ - │ │ │ - │ │ │ -
60
│ │ │ -
61 public:
│ │ │ -
62 typedef typename Base::Entity Entity;
│ │ │ - │ │ │ -
64
│ │ │ -
│ │ │ - │ │ │ -
66 {}
│ │ │ -
│ │ │ +
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 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 };
│ │ │ +
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 }
│ │ │
│ │ │ -
86}
│ │ │
87
│ │ │ -
88#endif // #if HAVE_ALBERTA
│ │ │ -
89
│ │ │ -
90#endif // #ifndef DUNE_ALBERTA_LEVELITERATOR_HH
│ │ │ - │ │ │ -
@ Ghost_Partition
only ghost entities
Definition gridenums.hh:142
│ │ │ +
│ │ │ + │ │ │ +
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
│ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ -
Definition treeiterator.hh:189
│ │ │ -
GridImp::template Codim< codim >::Entity Entity
Definition treeiterator.hh:207
│ │ │ -
int level() const
ask for level of entities
Definition treeiterator.hh:243
│ │ │ -
void increment()
increment
Definition treeiterator.hh:411
│ │ │ -
const GridImp & grid() const
obtain a reference to the grid
Definition treeiterator.hh:253
│ │ │ -
Definition leveliterator.hh:23
│ │ │ -
Base::MarkerVector MarkerVector
Definition leveliterator.hh:29
│ │ │ -
AlbertaGridLevelIterator()
Definition leveliterator.hh:31
│ │ │ -
AlbertaGridLevelIterator(const GridImp &grid, const MarkerVector *vec, int level)
Constructor making begin iterator.
Definition leveliterator.hh:40
│ │ │ -
Base::Entity Entity
Definition leveliterator.hh:28
│ │ │ -
AlbertaGridLevelIterator(const GridImp &grid, int level)
Constructor making end iterator.
Definition leveliterator.hh:35
│ │ │ -
void increment()
increment the iterator
Definition leveliterator.hh:47
│ │ │ - │ │ │ - │ │ │ -
void increment()
increment the iterator
Definition leveliterator.hh:81
│ │ │ -
Base::Entity Entity
Definition leveliterator.hh:62
│ │ │ -
Base::MarkerVector MarkerVector
Definition leveliterator.hh:63
│ │ │ -
AlbertaGridLevelIterator(const GridImp &grid, int level)
Constructor making end iterator.
Definition leveliterator.hh:69
│ │ │ -
AlbertaGridLevelIterator(const GridImp &grid, const MarkerVector *, int level)
Constructor making begin iterator (which is the end iterator in this case)
Definition leveliterator.hh:74
│ │ │ -
marker assigning subentities to one element containing them
Definition treeiterator.hh:35
│ │ │ - │ │ │ +
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,175 +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 │ │ │ │ -leveliterator.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#ifndef DUNE_ALBERTA_LEVELITERATOR_HH │ │ │ │ -6#define DUNE_ALBERTA_LEVELITERATOR_HH │ │ │ │ +5#ifndef DUNE_GRID_ALBERTAGRID_GEOMETRYREFERENCE_HH │ │ │ │ +6#define DUNE_GRID_ALBERTAGRID_GEOMETRYREFERENCE_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 │ │ │ │ +12#include │ │ │ │ 13 │ │ │ │ -14namespace _D_u_n_e │ │ │ │ -15{ │ │ │ │ -16 │ │ │ │ -17 // AlbertaGridLevelIterator │ │ │ │ -18 // ------------------------ │ │ │ │ -19 │ │ │ │ -20 template< int codim, PartitionIteratorType pitype, class GridImp > │ │ │ │ -_2_1 class _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ -22 : public _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r< codim, GridImp, false > │ │ │ │ -23 { │ │ │ │ -24 typedef _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_r_i_d_I_m_p_ _> _T_h_i_s; │ │ │ │ -25 typedef _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _f_a_l_s_e_ _> _B_a_s_e; │ │ │ │ -26 │ │ │ │ -27 public: │ │ │ │ -_2_8 typedef typename _B_a_s_e_:_:_E_n_t_i_t_y _E_n_t_i_t_y; │ │ │ │ -_2_9 typedef typename _B_a_s_e_:_:_M_a_r_k_e_r_V_e_c_t_o_r _M_a_r_k_e_r_V_e_c_t_o_r; │ │ │ │ -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 {} │ │ │ │ +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())}); │ │ │ │ 45 │ │ │ │ -_4_7 void _i_n_c_r_e_m_e_n_t () │ │ │ │ -48 { │ │ │ │ -49 _B_a_s_e_:_:_i_n_c_r_e_m_e_n_t(); │ │ │ │ -50 } │ │ │ │ -51 }; │ │ │ │ +46 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< 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 {} │ │ │ │ +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_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} │ │ │ │ +_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 │ │ │ │ -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 │ │ │ │ +_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 │ │ │ │ _D_u_n_e │ │ │ │ Include standard header files. │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:189 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _f_a_l_s_e_ _>_:_:_E_n_t_i_t_y │ │ │ │ -GridImp::template Codim< codim >::Entity Entity │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:207 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _f_a_l_s_e_ _>_:_:_l_e_v_e_l │ │ │ │ -int level() const │ │ │ │ -ask for level of entities │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:243 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _f_a_l_s_e_ _>_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ -void increment() │ │ │ │ -increment │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:411 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _f_a_l_s_e_ _>_:_:_g_r_i_d │ │ │ │ -const GridImp & grid() const │ │ │ │ -obtain a reference to the grid │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:253 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ -DDeeffiinniittiioonn leveliterator.hh:23 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_M_a_r_k_e_r_V_e_c_t_o_r │ │ │ │ -Base::MarkerVector MarkerVector │ │ │ │ -DDeeffiinniittiioonn leveliterator.hh:29 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ -AlbertaGridLevelIterator() │ │ │ │ -DDeeffiinniittiioonn leveliterator.hh:31 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ -AlbertaGridLevelIterator(const GridImp &grid, const MarkerVector *vec, int │ │ │ │ -level) │ │ │ │ -Constructor making begin iterator. │ │ │ │ -DDeeffiinniittiioonn leveliterator.hh:40 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_E_n_t_i_t_y │ │ │ │ -Base::Entity Entity │ │ │ │ -DDeeffiinniittiioonn leveliterator.hh:28 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ -AlbertaGridLevelIterator(const GridImp &grid, int level) │ │ │ │ -Constructor making end iterator. │ │ │ │ -DDeeffiinniittiioonn leveliterator.hh:35 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ -void increment() │ │ │ │ -increment the iterator │ │ │ │ -DDeeffiinniittiioonn leveliterator.hh:47 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ -DDeeffiinniittiioonn leveliterator.hh:57 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_I_m_p_ _>_:_: │ │ │ │ -_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ -AlbertaGridLevelIterator() │ │ │ │ -DDeeffiinniittiioonn leveliterator.hh:65 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_I_m_p_ _>_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ -void increment() │ │ │ │ -increment the iterator │ │ │ │ -DDeeffiinniittiioonn leveliterator.hh:81 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_I_m_p_ _>_:_:_E_n_t_i_t_y │ │ │ │ -Base::Entity Entity │ │ │ │ -DDeeffiinniittiioonn leveliterator.hh:62 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_I_m_p_ _>_:_:_M_a_r_k_e_r_V_e_c_t_o_r │ │ │ │ -Base::MarkerVector MarkerVector │ │ │ │ -DDeeffiinniittiioonn leveliterator.hh:63 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_I_m_p_ _>_:_: │ │ │ │ -_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ -AlbertaGridLevelIterator(const GridImp &grid, int level) │ │ │ │ -Constructor making end iterator. │ │ │ │ -DDeeffiinniittiioonn leveliterator.hh:69 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_I_m_p_ _>_:_: │ │ │ │ -_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ -AlbertaGridLevelIterator(const GridImp &grid, const MarkerVector *, int level) │ │ │ │ -Constructor making begin iterator (which is the end iterator in this case) │ │ │ │ -DDeeffiinniittiioonn leveliterator.hh:74 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r │ │ │ │ -marker assigning subentities to one element containing them │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:35 │ │ │ │ -_e_n_t_i_t_y_i_t_e_r_a_t_o_r_._h_h │ │ │ │ +_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/a00656.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: level.hh File Reference │ │ │ +dune-grid: leafiterator.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,34 +72,27 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
level.hh File Reference
│ │ │ +
leafiterator.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <cassert>
│ │ │ -#include <cstdlib>
│ │ │ -#include <dune/grid/albertagrid/meshpointer.hh>
│ │ │ -#include <dune/grid/albertagrid/dofadmin.hh>
│ │ │ -#include <dune/grid/albertagrid/dofvector.hh>
│ │ │ +
#include <dune/grid/common/entityiterator.hh>
│ │ │ +#include <dune/grid/albertagrid/treeiterator.hh>
│ │ │
│ │ │

Go to the source code of this file.

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

│ │ │ Classes

class  Dune::AlbertaGridLevelProvider< dim >
class  Dune::AlbertaGridLeafIterator< codim, pitype, GridImp >
 
class  Dune::AlbertaGridLevelProvider< dim >::SetLocal
 
class  Dune::AlbertaGridLevelProvider< dim >::CalcMaxLevel
 
struct  Dune::AlbertaGridLevelProvider< dim >::Interpolation
class  Dune::AlbertaGridLeafIterator< codim, Ghost_Partition, GridImp >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -2,29 +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 │ │ │ │ -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> │ │ │ │ +leafiterator.hh File Reference │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_e_n_t_i_t_y_i_t_e_r_a_t_o_r_._h_h> │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_t_r_e_e_i_t_e_r_a_t_o_r_._h_h> │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ - class   _D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_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_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_v_e_l_P_r_o_v_i_d_e_r_<_ _d_i_m_ _>_:_:_S_e_t_L_o_c_a_l │ │ │ │ -  │ │ │ │ - class   _D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_<_ _d_i_m_ _>_:_:_C_a_l_c_M_a_x_L_e_v_e_l │ │ │ │ -  │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_<_ _d_i_m_ _>_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ +class   _D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_h_o_s_t___P_a_r_t_i_t_i_o_n_,_ _G_r_i_d_I_m_p_ _> │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │   Include standard header files. │ │ │ │   │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00656_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: level.hh Source File │ │ │ +dune-grid: leafiterator.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,327 +74,146 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
level.hh
│ │ │ +
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_LEVEL_HH
│ │ │ -
6#define DUNE_ALBERTA_LEVEL_HH
│ │ │ +
5#ifndef DUNE_ALBERTA_LEAFITERATOR_HH
│ │ │ +
6#define DUNE_ALBERTA_LEAFITERATOR_HH
│ │ │
7
│ │ │ -
8#include <cassert>
│ │ │ -
9#include <cstdlib>
│ │ │ -
10
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
14
│ │ │ -
15#if HAVE_ALBERTA
│ │ │ + │ │ │ +
9
│ │ │ + │ │ │ +
11
│ │ │ +
12#if HAVE_ALBERTA
│ │ │ +
13
│ │ │ +
14namespace Dune
│ │ │ +
15{
│ │ │
16
│ │ │ -
17namespace Dune
│ │ │ -
18{
│ │ │ +
17 // AlbertaGridLeafIterator
│ │ │ +
18 // -----------------------
│ │ │
19
│ │ │ -
20 // AlbertaGridLevelProvider
│ │ │ -
21 // ------------------------
│ │ │ -
22
│ │ │ -
23 template< int dim >
│ │ │ -
│ │ │ - │ │ │ -
25 {
│ │ │ - │ │ │ -
27
│ │ │ -
28 typedef unsigned char Level;
│ │ │ -
29
│ │ │ - │ │ │ - │ │ │ -
32
│ │ │ - │ │ │ -
34
│ │ │ -
35 static const Level isNewFlag = (1 << 7);
│ │ │ -
36 static const Level levelMask = (1 << 7) - 1;
│ │ │ -
37
│ │ │ -
38 class SetLocal;
│ │ │ -
39 class CalcMaxLevel;
│ │ │ -
40
│ │ │ -
41 template< Level flags >
│ │ │ -
42 struct ClearFlags;
│ │ │ -
43
│ │ │ -
44 struct Interpolation;
│ │ │ +
20 template< int codim, PartitionIteratorType pitype, class GridImp >
│ │ │ +
│ │ │ + │ │ │ +
22 : public AlbertaGridTreeIterator< codim, GridImp, true >
│ │ │ +
23 {
│ │ │ + │ │ │ + │ │ │ +
26
│ │ │ +
27 public:
│ │ │ +
28 typedef typename Base::Entity Entity;
│ │ │ + │ │ │ +
30
│ │ │ +
│ │ │ + │ │ │ +
32 {}
│ │ │ +
│ │ │ +
33
│ │ │ +
│ │ │ +
35 AlbertaGridLeafIterator ( const GridImp &grid, int level )
│ │ │ +
36 : Base( grid, level )
│ │ │ +
37 {}
│ │ │ +
│ │ │ +
38
│ │ │ +
│ │ │ +
40 AlbertaGridLeafIterator ( const GridImp &grid,
│ │ │ +
41 const MarkerVector *vec,
│ │ │ +
42 int level )
│ │ │ +
43 : Base( grid, vec, level )
│ │ │ +
44 {}
│ │ │ +
│ │ │
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 }
│ │ │ -
│ │ │ -
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 }
│ │ │ +
│ │ │ +
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
│ │ │ -
│ │ │ -
68 bool isNew ( const ElementInfo &elementInfo ) const
│ │ │ -
69 {
│ │ │ -
70 return isNew( elementInfo.el() );
│ │ │ -
71 }
│ │ │ +
│ │ │ +
69 AlbertaGridLeafIterator ( const GridImp &grid, int level )
│ │ │ +
70 : Base( grid, level )
│ │ │ +
71 {}
│ │ │
│ │ │
72
│ │ │ -
│ │ │ -
73 Level maxLevel () const
│ │ │ -
74 {
│ │ │ -
75 CalcMaxLevel calcFromCache;
│ │ │ -
76 level_.forEach( calcFromCache );
│ │ │ -
77#ifndef NDEBUG
│ │ │ -
78 CalcMaxLevel calcFromGrid;
│ │ │ -
79 mesh().leafTraverse( calcFromGrid, FillFlags::nothing );
│ │ │ -
80 assert( calcFromCache.maxLevel() == calcFromGrid.maxLevel() );
│ │ │ -
81#endif
│ │ │ -
82 return calcFromCache.maxLevel();;
│ │ │ -
83 }
│ │ │ -
│ │ │ -
84
│ │ │ -
│ │ │ - │ │ │ -
86 {
│ │ │ -
87 return MeshPointer( level_.dofSpace()->mesh );
│ │ │ -
88 }
│ │ │ -
│ │ │ -
89
│ │ │ -
│ │ │ -
90 void markAllOld ()
│ │ │ -
91 {
│ │ │ -
92 ClearFlags< isNewFlag > clearIsNew;
│ │ │ -
93 level_.forEach( clearIsNew );
│ │ │ -
94 }
│ │ │ -
│ │ │ -
95
│ │ │ -
│ │ │ -
96 void create ( const DofNumbering &dofNumbering )
│ │ │ -
97 {
│ │ │ -
98 const Alberta::DofSpace *const dofSpace = dofNumbering.dofSpace( 0 );
│ │ │ -
99 dofAccess_ = DofAccess( dofSpace );
│ │ │ -
100
│ │ │ -
101 level_.create( dofSpace, "Element level" );
│ │ │ -
102 assert( level_ );
│ │ │ -
103 level_.template setupInterpolation< Interpolation >();
│ │ │ -
104
│ │ │ -
105 SetLocal setLocal( level_ );
│ │ │ - │ │ │ -
107 }
│ │ │ -
│ │ │ -
108
│ │ │ -
│ │ │ -
109 void release ()
│ │ │ -
110 {
│ │ │ -
111 level_.release();
│ │ │ -
112 dofAccess_ = DofAccess();
│ │ │ -
113 }
│ │ │ -
│ │ │ -
114
│ │ │ -
115 private:
│ │ │ -
116 DofVectorPointer level_;
│ │ │ -
117 DofAccess dofAccess_;
│ │ │ -
118 };
│ │ │ -
│ │ │ -
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
│ │ │ -
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 template< int dim >
│ │ │ -
181 template< typename AlbertaGridLevelProvider< dim >::Level flags >
│ │ │ -
182 struct AlbertaGridLevelProvider< dim >::ClearFlags
│ │ │ -
183 {
│ │ │ -
184 void operator() ( Level &dof ) const
│ │ │ -
185 {
│ │ │ -
186 dof &= ~flags;
│ │ │ -
187 }
│ │ │ -
188 };
│ │ │ -
189
│ │ │ -
190
│ │ │ -
191
│ │ │ -
192 // AlbertaGridLevelProvider::Interpolation
│ │ │ -
193 // ---------------------------------------
│ │ │ -
194
│ │ │ -
195 template< int dim >
│ │ │ -
│ │ │ - │ │ │ -
197 {
│ │ │ -
198 static const int dimension = dim;
│ │ │ -
199
│ │ │ - │ │ │ -
201
│ │ │ -
│ │ │ -
202 static void interpolateVector ( const DofVectorPointer &dofVector,
│ │ │ -
203 const Patch &patch )
│ │ │ -
204 {
│ │ │ -
205 const DofAccess dofAccess( dofVector.dofSpace() );
│ │ │ -
206 Level *array = (Level *)dofVector;
│ │ │ -
207
│ │ │ -
208 for( int i = 0; i < patch.count(); ++i )
│ │ │ -
209 {
│ │ │ -
210 const Alberta::Element *const father = patch[ i ];
│ │ │ -
211 assert( (array[ dofAccess( father, 0 ) ] & levelMask) < levelMask );
│ │ │ -
212 const Level childLevel = (array[ dofAccess( father, 0 ) ] + 1) | isNewFlag;
│ │ │ -
213 for( int i = 0; i < 2; ++i )
│ │ │ -
214 {
│ │ │ -
215 const Alberta::Element *child = father->child[ i ];
│ │ │ -
216 array[ dofAccess( child, 0 ) ] = childLevel;
│ │ │ -
217 }
│ │ │ -
218 }
│ │ │ -
219 }
│ │ │ -
│ │ │ -
220 };
│ │ │ -
│ │ │ -
221
│ │ │ -
222}
│ │ │ -
223
│ │ │ -
224#endif // #if HAVE_ALBERTA
│ │ │ -
225
│ │ │ -
226#endif
│ │ │ -
provides a wrapper for ALBERTA's mesh structure
│ │ │ - │ │ │ - │ │ │ +
│ │ │ +
74 AlbertaGridLeafIterator ( const GridImp &grid,
│ │ │ +
75 const MarkerVector *,
│ │ │ +
76 int level )
│ │ │ +
77 : Base( grid, level )
│ │ │ +
78 {}
│ │ │ +
│ │ │ +
79
│ │ │ +
│ │ │ +
81 void increment ()
│ │ │ +
82 {
│ │ │ + │ │ │ +
84 }
│ │ │ +
│ │ │ +
85 };
│ │ │ +
│ │ │ +
86
│ │ │ +
87}
│ │ │ +
88
│ │ │ +
89#endif // #if HAVE_ALBERTA
│ │ │ +
90
│ │ │ +
91#endif // #ifndef DUNE_ALBERTA_LEAFITERATOR_HH
│ │ │ + │ │ │ +
@ Ghost_Partition
only ghost entities
Definition gridenums.hh:142
│ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ -
ALBERTA EL Element
Definition misc.hh:54
│ │ │ -
ALBERTA FE_SPACE DofSpace
Definition misc.hh:65
│ │ │ -
Definition meshpointer.hh:40
│ │ │ -
void leafTraverse(Functor &functor, typename FillFlags::Flags fillFlags=FillFlags::standard) const
Definition meshpointer.hh:385
│ │ │ -
void hierarchicTraverse(Functor &functor, typename FillFlags::Flags fillFlags=FillFlags::standard) const
Definition meshpointer.hh:370
│ │ │ - │ │ │ -
Definition dofadmin.hh:93
│ │ │ -
const DofSpace * dofSpace(int codim) const
Definition dofadmin.hh:145
│ │ │ - │ │ │ -
void create(const DofSpace *dofSpace, const std::string &name="")
Definition dofvector.hh:236
│ │ │ -
void release()
Definition dofvector.hh:254
│ │ │ -
const DofSpace * dofSpace() const
Definition dofvector.hh:223
│ │ │ -
void forEach(Functor &functor) const
Definition dofvector.hh:264
│ │ │ -
Definition elementinfo.hh:43
│ │ │ -
int level() const
Definition elementinfo.hh:533
│ │ │ -
Element * el() const
Definition elementinfo.hh:737
│ │ │ -
Definition level.hh:25
│ │ │ -
bool isNew(const Alberta::Element *element) const
Definition level.hh:62
│ │ │ -
bool isNew(const ElementInfo &elementInfo) const
Definition level.hh:68
│ │ │ -
Alberta::MeshPointer< dim > MeshPointer
Definition level.hh:48
│ │ │ -
MeshPointer mesh() const
Definition level.hh:85
│ │ │ -
void create(const DofNumbering &dofNumbering)
Definition level.hh:96
│ │ │ -
Level maxLevel() const
Definition level.hh:73
│ │ │ -
Alberta::HierarchyDofNumbering< dim > DofNumbering
Definition level.hh:49
│ │ │ -
void release()
Definition level.hh:109
│ │ │ -
Level operator()(const Alberta::Element *element) const
Definition level.hh:51
│ │ │ -
void markAllOld()
Definition level.hh:90
│ │ │ -
Alberta::ElementInfo< dim > ElementInfo
Definition level.hh:47
│ │ │ - │ │ │ -
SetLocal(const DofVectorPointer &level)
Definition level.hh:132
│ │ │ - │ │ │ - │ │ │ -
Level maxLevel() const
Definition level.hh:169
│ │ │ - │ │ │ -
Alberta::Patch< dimension > Patch
Definition level.hh:200
│ │ │ -
static void interpolateVector(const DofVectorPointer &dofVector, const Patch &patch)
Definition level.hh:202
│ │ │ -
Definition misc.hh:231
│ │ │ -
static const Flags nothing
Definition misc.hh:234
│ │ │ -
Definition refinement.hh:40
│ │ │ -
int count() const
Definition refinement.hh:67
│ │ │ +
Definition 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,355 +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 │ │ │ │ -level.hh │ │ │ │ +leafiterator.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ 3// -*- 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_LEAFITERATOR_HH │ │ │ │ +6#define DUNE_ALBERTA_LEAFITERATOR_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 │ │ │ │ +8#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_e_n_t_i_t_y_i_t_e_r_a_t_o_r_._h_h> │ │ │ │ +9 │ │ │ │ +10#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_t_r_e_e_i_t_e_r_a_t_o_r_._h_h> │ │ │ │ +11 │ │ │ │ +12#if HAVE_ALBERTA │ │ │ │ +13 │ │ │ │ +14namespace _D_u_n_e │ │ │ │ +15{ │ │ │ │ 16 │ │ │ │ -17namespace _D_u_n_e │ │ │ │ -18{ │ │ │ │ +17 // AlbertaGridLeafIterator │ │ │ │ +18 // ----------------------- │ │ │ │ 19 │ │ │ │ -20 // AlbertaGridLevelProvider │ │ │ │ -21 // ------------------------ │ │ │ │ -22 │ │ │ │ -23 template< int dim > │ │ │ │ -_2_4 class _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r │ │ │ │ -25 { │ │ │ │ -26 typedef _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_<_ _d_i_m_ _> _T_h_i_s; │ │ │ │ -27 │ │ │ │ -28 typedef unsigned char Level; │ │ │ │ -29 │ │ │ │ -30 typedef _A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_<_ _L_e_v_e_l_ _> _D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r; │ │ │ │ -31 typedef _A_l_b_e_r_t_a_:_:_D_o_f_A_c_c_e_s_s_<_ _d_i_m_,_ _0_ _> _D_o_f_A_c_c_e_s_s; │ │ │ │ -32 │ │ │ │ -33 typedef _A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_<_ _d_i_m_ _> _F_i_l_l_F_l_a_g_s; │ │ │ │ -34 │ │ │ │ -35 static const Level isNewFlag = (1 << 7); │ │ │ │ -36 static const Level levelMask = (1 << 7) - 1; │ │ │ │ -37 │ │ │ │ -38 class _S_e_t_L_o_c_a_l; │ │ │ │ -39 class _C_a_l_c_M_a_x_L_e_v_e_l; │ │ │ │ -40 │ │ │ │ -41 template< Level flags > │ │ │ │ -42 struct ClearFlags; │ │ │ │ -43 │ │ │ │ -44 struct _I_n_t_e_r_p_o_l_a_t_i_o_n; │ │ │ │ +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 │ │ │ │ -46 public: │ │ │ │ -_4_7 typedef _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> _E_l_e_m_e_n_t_I_n_f_o; │ │ │ │ -_4_8 typedef _A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_ _> _M_e_s_h_P_o_i_n_t_e_r; │ │ │ │ -_4_9 typedef _A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_<_ _d_i_m_ _> _D_o_f_N_u_m_b_e_r_i_n_g; │ │ │ │ -50 │ │ │ │ -_5_1 Level _o_p_e_r_a_t_o_r_(_)_ ( const _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t *element ) const │ │ │ │ -52 { │ │ │ │ -53 const Level *array = (Level *)level_; │ │ │ │ -54 return array[ dofAccess_( element, 0 ) ] & levelMask; │ │ │ │ -55 } │ │ │ │ -56 │ │ │ │ -_5_7 Level _o_p_e_r_a_t_o_r_(_)_ ( const _E_l_e_m_e_n_t_I_n_f_o &elementInfo ) const │ │ │ │ -58 { │ │ │ │ -59 return (*this)( elementInfo._e_l() ); │ │ │ │ -60 } │ │ │ │ -61 │ │ │ │ -_6_2 bool _i_s_N_e_w ( const _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t *element ) const │ │ │ │ -63 { │ │ │ │ -64 const Level *array = (Level *)level_; │ │ │ │ -65 return ((array[ dofAccess_( element, 0 ) ] & isNewFlag) != 0); │ │ │ │ -66 } │ │ │ │ +_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_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 } │ │ │ │ +_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_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 {} │ │ │ │ -136 │ │ │ │ -_1_3_7 void _o_p_e_r_a_t_o_r_(_)_ ( const _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> &elementInfo ) const │ │ │ │ -138 { │ │ │ │ -139 Level *const array = (Level *)level_; │ │ │ │ -140 array[ dofAccess_( elementInfo, 0 ) ] = elementInfo._l_e_v_e_l(); │ │ │ │ -141 } │ │ │ │ -142 }; │ │ │ │ -143 │ │ │ │ -144 │ │ │ │ -145 │ │ │ │ -146 // AlbertaGridLevelProvider::CalcMaxLevel │ │ │ │ -147 // -------------------------------------- │ │ │ │ -148 │ │ │ │ -149 template< int dim > │ │ │ │ -_1_5_0 class _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r< dim >::_C_a_l_c_M_a_x_L_e_v_e_l │ │ │ │ -151 { │ │ │ │ -152 Level maxLevel_; │ │ │ │ -153 │ │ │ │ -154 public: │ │ │ │ -_1_5_5 _C_a_l_c_M_a_x_L_e_v_e_l () │ │ │ │ -156 : maxLevel_( 0 ) │ │ │ │ -157 {} │ │ │ │ -158 │ │ │ │ -_1_5_9 void _o_p_e_r_a_t_o_r_(_)_ ( const Level &dof ) │ │ │ │ -160 { │ │ │ │ -161 maxLevel_ = std::max( maxLevel_, Level( dof & levelMask ) ); │ │ │ │ -162 } │ │ │ │ -163 │ │ │ │ -_1_6_4 void _o_p_e_r_a_t_o_r_(_)_ ( const _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> &elementInfo ) │ │ │ │ -165 { │ │ │ │ -166 maxLevel_ = std::max( maxLevel_, Level( elementInfo._l_e_v_e_l() ) ); │ │ │ │ -167 } │ │ │ │ -168 │ │ │ │ -_1_6_9 Level _m_a_x_L_e_v_e_l () const │ │ │ │ -170 { │ │ │ │ -171 return maxLevel_; │ │ │ │ -172 } │ │ │ │ -173 }; │ │ │ │ -174 │ │ │ │ -175 │ │ │ │ -176 │ │ │ │ -177 // AlbertaGridLevelProvider::ClearFlags │ │ │ │ -178 // ------------------------------------ │ │ │ │ -179 │ │ │ │ -180 template< int dim > │ │ │ │ -181 template< typename AlbertaGridLevelProvider< dim >::Level flags > │ │ │ │ -182 struct _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r< dim >::ClearFlags │ │ │ │ -183 { │ │ │ │ -184 void _o_p_e_r_a_t_o_r_(_)_ ( Level &dof ) const │ │ │ │ -185 { │ │ │ │ -186 dof &= ~flags; │ │ │ │ -187 } │ │ │ │ -188 }; │ │ │ │ -189 │ │ │ │ -190 │ │ │ │ -191 │ │ │ │ -192 // AlbertaGridLevelProvider::Interpolation │ │ │ │ -193 // --------------------------------------- │ │ │ │ -194 │ │ │ │ -195 template< int dim > │ │ │ │ -_1_9_6 struct _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r< dim >::_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ -197 { │ │ │ │ -_1_9_8 static const int dimension = dim; │ │ │ │ -199 │ │ │ │ -_2_0_0 typedef _A_l_b_e_r_t_a_:_:_P_a_t_c_h_<_ _d_i_m_e_n_s_i_o_n_ _> _P_a_t_c_h; │ │ │ │ -201 │ │ │ │ -_2_0_2 static void _i_n_t_e_r_p_o_l_a_t_e_V_e_c_t_o_r ( const _D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r &dofVector, │ │ │ │ -203 const _P_a_t_c_h &patch ) │ │ │ │ -204 { │ │ │ │ -205 const _D_o_f_A_c_c_e_s_s dofAccess( dofVector._d_o_f_S_p_a_c_e() ); │ │ │ │ -206 Level *array = (Level *)dofVector; │ │ │ │ -207 │ │ │ │ -208 for( int i = 0; i < patch._c_o_u_n_t(); ++i ) │ │ │ │ -209 { │ │ │ │ -210 const _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t *const father = patch[ i ]; │ │ │ │ -211 assert( (array[ dofAccess( father, 0 ) ] & levelMask) < levelMask ); │ │ │ │ -212 const Level childLevel = (array[ dofAccess( father, 0 ) ] + 1) | isNewFlag; │ │ │ │ -213 for( int i = 0; i < 2; ++i ) │ │ │ │ -214 { │ │ │ │ -215 const _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t *child = father->child[ i ]; │ │ │ │ -216 array[ dofAccess( child, 0 ) ] = childLevel; │ │ │ │ -217 } │ │ │ │ -218 } │ │ │ │ -219 } │ │ │ │ -220 }; │ │ │ │ -221 │ │ │ │ -222} │ │ │ │ -223 │ │ │ │ -224#endif // #if HAVE_ALBERTA │ │ │ │ -225 │ │ │ │ -226#endif │ │ │ │ -_m_e_s_h_p_o_i_n_t_e_r_._h_h │ │ │ │ -provides a wrapper for ALBERTA's mesh structure │ │ │ │ -_d_o_f_v_e_c_t_o_r_._h_h │ │ │ │ -_d_o_f_a_d_m_i_n_._h_h │ │ │ │ +_7_4 _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r ( const GridImp &_g_r_i_d, │ │ │ │ +75 const _M_a_r_k_e_r_V_e_c_t_o_r *, │ │ │ │ +76 int _l_e_v_e_l ) │ │ │ │ +77 : _B_a_s_e( _g_r_i_d, _l_e_v_e_l ) │ │ │ │ +78 {} │ │ │ │ +79 │ │ │ │ +_8_1 void _i_n_c_r_e_m_e_n_t () │ │ │ │ +82 { │ │ │ │ +83 _B_a_s_e_:_:_i_n_c_r_e_m_e_n_t(); │ │ │ │ +84 } │ │ │ │ +85 }; │ │ │ │ +86 │ │ │ │ +87} │ │ │ │ +88 │ │ │ │ +89#endif // #if HAVE_ALBERTA │ │ │ │ +90 │ │ │ │ +91#endif // #ifndef DUNE_ALBERTA_LEAFITERATOR_HH │ │ │ │ +_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_:_:_E_l_e_m_e_n_t │ │ │ │ -ALBERTA EL Element │ │ │ │ -DDeeffiinniittiioonn misc.hh:54 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_S_p_a_c_e │ │ │ │ -ALBERTA FE_SPACE DofSpace │ │ │ │ -DDeeffiinniittiioonn misc.hh:65 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:40 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_l_e_a_f_T_r_a_v_e_r_s_e │ │ │ │ -void leafTraverse(Functor &functor, typename FillFlags::Flags │ │ │ │ -fillFlags=FillFlags::standard) const │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:385 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_:_:_h_i_e_r_a_r_c_h_i_c_T_r_a_v_e_r_s_e │ │ │ │ -void hierarchicTraverse(Functor &functor, typename FillFlags::Flags │ │ │ │ -fillFlags=FillFlags::standard) const │ │ │ │ -DDeeffiinniittiioonn meshpointer.hh:370 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_A_c_c_e_s_s_<_ _d_i_m_,_ _0_ _> │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g │ │ │ │ -DDeeffiinniittiioonn dofadmin.hh:93 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_H_i_e_r_a_r_c_h_y_D_o_f_N_u_m_b_e_r_i_n_g_:_:_d_o_f_S_p_a_c_e │ │ │ │ -const DofSpace * dofSpace(int codim) const │ │ │ │ -DDeeffiinniittiioonn dofadmin.hh:145 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_<_ _L_e_v_e_l_ _> │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_c_r_e_a_t_e │ │ │ │ -void create(const DofSpace *dofSpace, const std::string &name="") │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:236 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_r_e_l_e_a_s_e │ │ │ │ -void release() │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:254 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_d_o_f_S_p_a_c_e │ │ │ │ -const DofSpace * dofSpace() const │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:223 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_:_:_f_o_r_E_a_c_h │ │ │ │ -void forEach(Functor &functor) const │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:264 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:43 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_l_e_v_e_l │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_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 │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:533 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_e_l │ │ │ │ -Element * el() const │ │ │ │ -DDeeffiinniittiioonn elementinfo.hh:737 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r │ │ │ │ -DDeeffiinniittiioonn level.hh:25 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_i_s_N_e_w │ │ │ │ -bool isNew(const Alberta::Element *element) const │ │ │ │ -DDeeffiinniittiioonn level.hh:62 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_i_s_N_e_w │ │ │ │ -bool isNew(const ElementInfo &elementInfo) const │ │ │ │ -DDeeffiinniittiioonn level.hh:68 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_M_e_s_h_P_o_i_n_t_e_r │ │ │ │ -Alberta::MeshPointer< dim > MeshPointer │ │ │ │ -DDeeffiinniittiioonn level.hh:48 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_m_e_s_h │ │ │ │ -MeshPointer mesh() const │ │ │ │ -DDeeffiinniittiioonn level.hh:85 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_c_r_e_a_t_e │ │ │ │ -void create(const DofNumbering &dofNumbering) │ │ │ │ -DDeeffiinniittiioonn level.hh:96 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_m_a_x_L_e_v_e_l │ │ │ │ -Level maxLevel() const │ │ │ │ -DDeeffiinniittiioonn level.hh:73 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_D_o_f_N_u_m_b_e_r_i_n_g │ │ │ │ -Alberta::HierarchyDofNumbering< dim > DofNumbering │ │ │ │ -DDeeffiinniittiioonn level.hh:49 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_r_e_l_e_a_s_e │ │ │ │ -void release() │ │ │ │ -DDeeffiinniittiioonn level.hh:109 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ -Level operator()(const Alberta::Element *element) const │ │ │ │ -DDeeffiinniittiioonn level.hh:51 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_m_a_r_k_A_l_l_O_l_d │ │ │ │ -void markAllOld() │ │ │ │ -DDeeffiinniittiioonn level.hh:90 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ -Alberta::ElementInfo< dim > ElementInfo │ │ │ │ -DDeeffiinniittiioonn level.hh:47 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_S_e_t_L_o_c_a_l │ │ │ │ -DDeeffiinniittiioonn level.hh:127 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_S_e_t_L_o_c_a_l_:_:_S_e_t_L_o_c_a_l │ │ │ │ -SetLocal(const DofVectorPointer &level) │ │ │ │ -DDeeffiinniittiioonn level.hh:132 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_C_a_l_c_M_a_x_L_e_v_e_l │ │ │ │ -DDeeffiinniittiioonn level.hh:151 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_C_a_l_c_M_a_x_L_e_v_e_l_:_:_C_a_l_c_M_a_x_L_e_v_e_l │ │ │ │ -CalcMaxLevel() │ │ │ │ -DDeeffiinniittiioonn level.hh:155 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_C_a_l_c_M_a_x_L_e_v_e_l_:_:_m_a_x_L_e_v_e_l │ │ │ │ -Level maxLevel() const │ │ │ │ -DDeeffiinniittiioonn level.hh:169 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ -DDeeffiinniittiioonn level.hh:197 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_P_a_t_c_h │ │ │ │ -Alberta::Patch< dimension > Patch │ │ │ │ -DDeeffiinniittiioonn level.hh:200 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_i_n_t_e_r_p_o_l_a_t_e_V_e_c_t_o_r │ │ │ │ -static void interpolateVector(const DofVectorPointer &dofVector, const Patch │ │ │ │ -&patch) │ │ │ │ -DDeeffiinniittiioonn level.hh:202 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s │ │ │ │ -DDeeffiinniittiioonn misc.hh:231 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_n_o_t_h_i_n_g │ │ │ │ -static const Flags nothing │ │ │ │ -DDeeffiinniittiioonn misc.hh:234 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_a_t_c_h │ │ │ │ -DDeeffiinniittiioonn refinement.hh:40 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_a_t_c_h_:_:_c_o_u_n_t │ │ │ │ -int count() const │ │ │ │ -DDeeffiinniittiioonn refinement.hh:67 │ │ │ │ +ask for level of entities │ │ │ │ +DDeeffiinniittiioonn 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/a00659.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: leafiterator.hh File Reference │ │ │ +dune-grid: coordcache.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,34 +72,39 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
leafiterator.hh File Reference
│ │ │ +
coordcache.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <dune/grid/common/entityiterator.hh>
│ │ │ -#include <dune/grid/albertagrid/treeiterator.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.

│ │ │

│ │ │ Namespaces

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

│ │ │ Classes

class  Dune::AlbertaGridLeafIterator< codim, pitype, GridImp >
class  Dune::Alberta::CoordCache< dim >
 
class  Dune::AlbertaGridLeafIterator< codim, Ghost_Partition, GridImp >
class  Dune::Alberta::CoordCache< dim >::LocalCaching
 
struct  Dune::Alberta::CoordCache< dim >::Interpolation
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ + │ │ │

│ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::Alberta
 
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -2,22 +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 │ │ │ │ -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> │ │ │ │ +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_:_:_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_:_:_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_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_:_:_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 │ │ │ │ +  │ │ │ │ =============================================================================== │ │ │ │ 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: leafiterator.hh Source File │ │ │ +dune-grid: coordcache.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,146 +74,225 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
leafiterator.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_ALBERTA_LEAFITERATOR_HH
│ │ │ -
6#define DUNE_ALBERTA_LEAFITERATOR_HH
│ │ │ +
5#ifndef DUNE_ALBERTA_COORDCACHE_HH
│ │ │ +
6#define DUNE_ALBERTA_COORDCACHE_HH
│ │ │
7
│ │ │ - │ │ │ -
9
│ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │
11
│ │ │
12#if HAVE_ALBERTA
│ │ │
13
│ │ │
14namespace Dune
│ │ │
15{
│ │ │
16
│ │ │ -
17 // AlbertaGridLeafIterator
│ │ │ -
18 // -----------------------
│ │ │ +
17 namespace Alberta
│ │ │ +
18 {
│ │ │
19
│ │ │ -
20 template< int codim, PartitionIteratorType pitype, class GridImp >
│ │ │ -
│ │ │ - │ │ │ -
22 : public AlbertaGridTreeIterator< codim, GridImp, true >
│ │ │ -
23 {
│ │ │ - │ │ │ - │ │ │ -
26
│ │ │ -
27 public:
│ │ │ -
28 typedef typename Base::Entity Entity;
│ │ │ - │ │ │ -
30
│ │ │ -
│ │ │ - │ │ │ -
32 {}
│ │ │ -
│ │ │ -
33
│ │ │ -
│ │ │ -
35 AlbertaGridLeafIterator ( const GridImp &grid, int level )
│ │ │ -
36 : Base( grid, level )
│ │ │ -
37 {}
│ │ │ -
│ │ │ +
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
│ │ │ -
│ │ │ -
40 AlbertaGridLeafIterator ( const GridImp &grid,
│ │ │ -
41 const MarkerVector *vec,
│ │ │ -
42 int level )
│ │ │ -
43 : Base( grid, vec, level )
│ │ │ -
44 {}
│ │ │ +
│ │ │ +
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
│ │ │ -
│ │ │ -
47 void increment ()
│ │ │ -
48 {
│ │ │ - │ │ │ -
50 }
│ │ │ -
│ │ │ -
51 };
│ │ │ -
│ │ │ -
52
│ │ │ -
53
│ │ │ -
54 template< int codim, class GridImp >
│ │ │ -
│ │ │ - │ │ │ -
56 : public AlbertaGridTreeIterator< codim, GridImp, true >
│ │ │ -
57 {
│ │ │ - │ │ │ - │ │ │ +
│ │ │ +
46 GlobalVector &operator() ( const ElementInfo &elementInfo, int vertex ) const
│ │ │ +
47 {
│ │ │ +
48 return (*this)( elementInfo.el(), vertex );
│ │ │ +
49 }
│ │ │ +
│ │ │ +
50
│ │ │ +
│ │ │ +
51 void create ( const DofNumbering &dofNumbering )
│ │ │ +
52 {
│ │ │ +
53 MeshPointer mesh = dofNumbering.mesh();
│ │ │ +
54 const DofSpace *dofSpace = dofNumbering.dofSpace( dimension );
│ │ │ +
55
│ │ │ +
56 coords_.create( dofSpace, "Coordinate Cache" );
│ │ │ +
57 LocalCaching localCaching( coords_ );
│ │ │ + │ │ │ +
59 coords_.template setupInterpolation< Interpolation >();
│ │ │
60
│ │ │ -
61 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 };
│ │ │ -
│ │ │ -
86
│ │ │ -
87}
│ │ │ -
88
│ │ │ -
89#endif // #if HAVE_ALBERTA
│ │ │ +
61 dofAccess_ = DofAccess( dofSpace );
│ │ │ +
62 }
│ │ │ +
│ │ │ +
63
│ │ │ +
│ │ │ +
64 void release ()
│ │ │ +
65 {
│ │ │ +
66 coords_.release();
│ │ │ +
67 }
│ │ │ +
│ │ │ +
68
│ │ │ +
69 private:
│ │ │ +
70 CoordVectorPointer coords_;
│ │ │ +
71 DofAccess dofAccess_;
│ │ │ +
72 };
│ │ │ +
│ │ │ +
73
│ │ │ +
74
│ │ │ +
75
│ │ │ +
76 // CoordCache::LocalCaching
│ │ │ +
77 // ------------------------
│ │ │ +
78
│ │ │ +
79 template< int dim >
│ │ │ +
│ │ │ + │ │ │ +
81 {
│ │ │ +
82 CoordVectorPointer coords_;
│ │ │ +
83 DofAccess dofAccess_;
│ │ │ +
84
│ │ │ +
85 public:
│ │ │ +
│ │ │ +
86 explicit LocalCaching ( const CoordVectorPointer &coords )
│ │ │ +
87 : coords_( coords ),
│ │ │ +
88 dofAccess_( coords.dofSpace() )
│ │ │ +
89 {}
│ │ │ +
│ │ │
90
│ │ │ -
91#endif // #ifndef DUNE_ALBERTA_LEAFITERATOR_HH
│ │ │ - │ │ │ -
@ Ghost_Partition
only ghost entities
Definition gridenums.hh:142
│ │ │ +
│ │ │ +
91 void operator() ( const ElementInfo &elementInfo ) const
│ │ │ +
92 {
│ │ │ +
93 GlobalVector *array = (GlobalVector *)coords_;
│ │ │ +
94 for( int i = 0; i < DofAccess::numSubEntities; ++i )
│ │ │ +
95 {
│ │ │ +
96 const GlobalVector &x = elementInfo.coordinate( i );
│ │ │ +
97 GlobalVector &y = array[ dofAccess_( elementInfo.el(), i ) ];
│ │ │ +
98 for( int i = 0; i < dimWorld; ++i )
│ │ │ +
99 y[ i ] = x[ i ];
│ │ │ +
100 }
│ │ │ +
101 }
│ │ │ +
│ │ │ +
102 };
│ │ │ +
│ │ │ +
103
│ │ │ +
104
│ │ │ +
105
│ │ │ +
106 // CoordCache::Interpolation
│ │ │ +
107 // -------------------------
│ │ │ +
108
│ │ │ +
109 template< int dim >
│ │ │ +
│ │ │ + │ │ │ +
111 {
│ │ │ +
112 static const int dimension = dim;
│ │ │ +
113
│ │ │ + │ │ │ +
115
│ │ │ +
116 static void
│ │ │ +
│ │ │ +
117 interpolateVector ( const CoordVectorPointer &dofVector, const Patch &patch )
│ │ │ +
118 {
│ │ │ +
119 DofAccess dofAccess( dofVector.dofSpace() );
│ │ │ +
120 GlobalVector *array = (GlobalVector *)dofVector;
│ │ │ +
121
│ │ │ +
122 const Element *element = patch[ 0 ];
│ │ │ +
123
│ │ │ +
124 // new vertex is always the last one
│ │ │ +
125 assert( element->child[ 0 ] != NULL );
│ │ │ +
126 GlobalVector &newCoord = array[ dofAccess( element->child[ 0 ], dimension ) ];
│ │ │ +
127
│ │ │ +
128 if( element->new_coord != NULL )
│ │ │ +
129 {
│ │ │ +
130 for( int j = 0; j < dimWorld; ++j )
│ │ │ +
131 newCoord[ j ] = element->new_coord[ j ];
│ │ │ +
132 }
│ │ │ +
133 else
│ │ │ +
134 {
│ │ │ +
135 // new coordinate is the average of of old ones on the same edge
│ │ │ +
136 // refinement edge is always between vertices 0 and 1
│ │ │ +
137 const GlobalVector &coord0 = array[ dofAccess( element, 0 ) ];
│ │ │ +
138 const GlobalVector &coord1 = array[ dofAccess( element, 1 ) ];
│ │ │ +
139 for( int j = 0; j < dimWorld; ++j )
│ │ │ +
140 newCoord[ j ] = 0.5 * (coord0[ j ] + coord1[ j ]);
│ │ │ +
141 }
│ │ │ +
142 }
│ │ │ +
│ │ │ +
143 };
│ │ │ +
│ │ │ +
144
│ │ │ +
145 }
│ │ │ +
146
│ │ │ +
147}
│ │ │ +
148
│ │ │ +
149#endif // #if HAVE_ALBERTA
│ │ │ +
150
│ │ │ +
151#endif // #ifndef DUNE_ALBERTA_COORDCACHE_HH
│ │ │ + │ │ │ +
provides a wrapper for ALBERTA's mesh structure
│ │ │ + │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ -
Definition treeiterator.hh:189
│ │ │ -
GridImp::template Codim< codim >::Entity Entity
Definition treeiterator.hh:207
│ │ │ -
int level() const
ask for level of entities
Definition treeiterator.hh:243
│ │ │ -
void increment()
increment
Definition treeiterator.hh:411
│ │ │ -
const GridImp & grid() const
obtain a reference to the grid
Definition treeiterator.hh:253
│ │ │ -
Definition leafiterator.hh:23
│ │ │ -
Base::Entity Entity
Definition leafiterator.hh:28
│ │ │ -
AlbertaGridLeafIterator(const GridImp &grid, int level)
Constructor making end iterator.
Definition leafiterator.hh:35
│ │ │ -
Base::MarkerVector MarkerVector
Definition leafiterator.hh:29
│ │ │ -
AlbertaGridLeafIterator(const GridImp &grid, const MarkerVector *vec, int level)
Constructor making begin iterator.
Definition leafiterator.hh:40
│ │ │ -
AlbertaGridLeafIterator()
Definition leafiterator.hh:31
│ │ │ -
void increment()
increment the iterator
Definition leafiterator.hh:47
│ │ │ - │ │ │ -
Base::Entity Entity
Definition leafiterator.hh:62
│ │ │ -
void increment()
increment the iterator
Definition leafiterator.hh:81
│ │ │ -
AlbertaGridLeafIterator(const GridImp &grid, const MarkerVector *, int level)
Constructor making begin iterator (which is the end iterator in this case)
Definition leafiterator.hh:74
│ │ │ - │ │ │ -
Base::MarkerVector MarkerVector
Definition leafiterator.hh:63
│ │ │ -
AlbertaGridLeafIterator(const GridImp &grid, int level)
Constructor making end iterator.
Definition leafiterator.hh:69
│ │ │ -
marker assigning subentities to one element containing them
Definition treeiterator.hh:35
│ │ │ - │ │ │ +
ALBERTA EL Element
Definition misc.hh:54
│ │ │ +
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,176 +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 │ │ │ │ -leafiterator.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_ALBERTA_LEAFITERATOR_HH │ │ │ │ -6#define DUNE_ALBERTA_LEAFITERATOR_HH │ │ │ │ +5#ifndef DUNE_ALBERTA_COORDCACHE_HH │ │ │ │ +6#define DUNE_ALBERTA_COORDCACHE_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> │ │ │ │ +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 // AlbertaGridLeafIterator │ │ │ │ -18 // ----------------------- │ │ │ │ +17 namespace Alberta │ │ │ │ +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 {} │ │ │ │ +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 │ │ │ │ -_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 {} │ │ │ │ +_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_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; │ │ │ │ +_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 ); │ │ │ │ +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 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 }; │ │ │ │ -86 │ │ │ │ -87} │ │ │ │ -88 │ │ │ │ -89#endif // #if HAVE_ALBERTA │ │ │ │ +61 dofAccess_ = _D_o_f_A_c_c_e_s_s( dofSpace ); │ │ │ │ +62 } │ │ │ │ +63 │ │ │ │ +_6_4 void _r_e_l_e_a_s_e () │ │ │ │ +65 { │ │ │ │ +66 coords_._r_e_l_e_a_s_e(); │ │ │ │ +67 } │ │ │ │ +68 │ │ │ │ +69 private: │ │ │ │ +70 CoordVectorPointer coords_; │ │ │ │ +71 _D_o_f_A_c_c_e_s_s dofAccess_; │ │ │ │ +72 }; │ │ │ │ +73 │ │ │ │ +74 │ │ │ │ +75 │ │ │ │ +76 // CoordCache::LocalCaching │ │ │ │ +77 // ------------------------ │ │ │ │ +78 │ │ │ │ +79 template< int dim > │ │ │ │ +_8_0 class _C_o_o_r_d_C_a_c_h_e< dim >::_L_o_c_a_l_C_a_c_h_i_n_g │ │ │ │ +81 { │ │ │ │ +82 _C_o_o_r_d_V_e_c_t_o_r_P_o_i_n_t_e_r coords_; │ │ │ │ +83 _D_o_f_A_c_c_e_s_s dofAccess_; │ │ │ │ +84 │ │ │ │ +85 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 │ │ │ │ -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 │ │ │ │ +_9_1 void _o_p_e_r_a_t_o_r_(_)_ ( const _E_l_e_m_e_n_t_I_n_f_o &elementInfo ) const │ │ │ │ +92 { │ │ │ │ +93 _G_l_o_b_a_l_V_e_c_t_o_r *array = (_G_l_o_b_a_l_V_e_c_t_o_r *)coords_; │ │ │ │ +94 for( int i = 0; i < _D_o_f_A_c_c_e_s_s_:_:_n_u_m_S_u_b_E_n_t_i_t_i_e_s; ++i ) │ │ │ │ +95 { │ │ │ │ +96 const _G_l_o_b_a_l_V_e_c_t_o_r &x = elementInfo._c_o_o_r_d_i_n_a_t_e( i ); │ │ │ │ +97 _G_l_o_b_a_l_V_e_c_t_o_r &y = array[ dofAccess_( elementInfo._e_l(), i ) ]; │ │ │ │ +98 for( int i = 0; i < _d_i_m_W_o_r_l_d; ++i ) │ │ │ │ +99 y[ i ] = x[ i ]; │ │ │ │ +100 } │ │ │ │ +101 } │ │ │ │ +102 }; │ │ │ │ +103 │ │ │ │ +104 │ │ │ │ +105 │ │ │ │ +106 // CoordCache::Interpolation │ │ │ │ +107 // ------------------------- │ │ │ │ +108 │ │ │ │ +109 template< int dim > │ │ │ │ +_1_1_0 struct _C_o_o_r_d_C_a_c_h_e< dim >::_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ +111 { │ │ │ │ +_1_1_2 static const int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ +113 │ │ │ │ +_1_1_4 typedef _A_l_b_e_r_t_a_:_:_P_a_t_c_h_<_ _d_i_m_e_n_s_i_o_n_ _> _P_a_t_c_h; │ │ │ │ +115 │ │ │ │ +116 static void │ │ │ │ +_1_1_7 _i_n_t_e_r_p_o_l_a_t_e_V_e_c_t_o_r ( const _C_o_o_r_d_V_e_c_t_o_r_P_o_i_n_t_e_r &dofVector, const _P_a_t_c_h &patch │ │ │ │ +) │ │ │ │ +118 { │ │ │ │ +119 _D_o_f_A_c_c_e_s_s dofAccess( dofVector._d_o_f_S_p_a_c_e() ); │ │ │ │ +120 _G_l_o_b_a_l_V_e_c_t_o_r *array = (_G_l_o_b_a_l_V_e_c_t_o_r *)dofVector; │ │ │ │ +121 │ │ │ │ +122 const _E_l_e_m_e_n_t *element = patch[ 0 ]; │ │ │ │ +123 │ │ │ │ +124 // new vertex is always the last one │ │ │ │ +125 assert( element->child[ 0 ] != NULL ); │ │ │ │ +126 _G_l_o_b_a_l_V_e_c_t_o_r &newCoord = array[ dofAccess( element->child[ 0 ], _d_i_m_e_n_s_i_o_n ) │ │ │ │ +]; │ │ │ │ +127 │ │ │ │ +128 if( element->new_coord != NULL ) │ │ │ │ +129 { │ │ │ │ +130 for( int j = 0; j < _d_i_m_W_o_r_l_d; ++j ) │ │ │ │ +131 newCoord[ j ] = element->new_coord[ j ]; │ │ │ │ +132 } │ │ │ │ +133 else │ │ │ │ +134 { │ │ │ │ +135 // new coordinate is the average of of old ones on the same edge │ │ │ │ +136 // refinement edge is always between vertices 0 and 1 │ │ │ │ +137 const _G_l_o_b_a_l_V_e_c_t_o_r &coord0 = array[ dofAccess( element, 0 ) ]; │ │ │ │ +138 const _G_l_o_b_a_l_V_e_c_t_o_r &coord1 = array[ dofAccess( element, 1 ) ]; │ │ │ │ +139 for( int j = 0; j < _d_i_m_W_o_r_l_d; ++j ) │ │ │ │ +140 newCoord[ j ] = 0.5 * (coord0[ j ] + coord1[ j ]); │ │ │ │ +141 } │ │ │ │ +142 } │ │ │ │ +143 }; │ │ │ │ +144 │ │ │ │ +145 } │ │ │ │ +146 │ │ │ │ +147} │ │ │ │ +148 │ │ │ │ +149#endif // #if HAVE_ALBERTA │ │ │ │ +150 │ │ │ │ +151#endif // #ifndef DUNE_ALBERTA_COORDCACHE_HH │ │ │ │ +_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_o_f_a_d_m_i_n_._h_h │ │ │ │ _D_u_n_e │ │ │ │ Include standard header files. │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r │ │ │ │ -DDeeffiinniittiioonn treeiterator.hh:189 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_,_ _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_:_:_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/a00662.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: intersection.cc File Reference │ │ │ +dune-grid: level.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,56 +71,43 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces | │ │ │ -Macros
│ │ │ -
intersection.cc File Reference
│ │ │ +Namespaces
│ │ │ +
level.hh File Reference
│ │ │ │ │ │
│ │ │ -
#include <dune/grid/albertagrid/intersection.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

struct  Dune::AlbertaGridIntersectionBase< Grid >::GlobalCoordReader< GridImp >
class  Dune::AlbertaGridLevelProvider< dim >
 
struct  Dune::AlbertaGridIntersectionBase< Grid >::LocalCoordReader< GridImp >
class  Dune::AlbertaGridLevelProvider< dim >::SetLocal
 
class  Dune::AlbertaGridLevelProvider< dim >::CalcMaxLevel
 
struct  Dune::AlbertaGridLevelProvider< dim >::Interpolation
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ 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,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 │ │ │ │ -_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 │ │ │ │ +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 │ │ │ │ -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_v_e_l_P_r_o_v_i_d_e_r_<_ _d_i_m_ _> │ │ │ │   │ │ │ │ -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_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. │ │ │ │   │ │ │ │ -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/a00662_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: intersection.cc Source File │ │ │ +dune-grid: level.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,618 +74,327 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
intersection.cc
│ │ │ +
level.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_LEVEL_HH
│ │ │ +
6#define DUNE_ALBERTA_LEVEL_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
│ │ │ +
8#include <cassert>
│ │ │ +
9#include <cstdlib>
│ │ │ +
10
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
14
│ │ │ +
15#if HAVE_ALBERTA
│ │ │ +
16
│ │ │ +
17namespace Dune
│ │ │ +
18{
│ │ │ +
19
│ │ │ +
20 // AlbertaGridLevelProvider
│ │ │ +
21 // ------------------------
│ │ │ +
22
│ │ │ +
23 template< int dim >
│ │ │ +
│ │ │ + │ │ │ +
25 {
│ │ │ + │ │ │ +
27
│ │ │ +
28 typedef unsigned char Level;
│ │ │ +
29
│ │ │ + │ │ │ + │ │ │
32
│ │ │ -
33 template< class Grid >
│ │ │ -
34 inline typename Grid::template Codim< 0 >::Entity
│ │ │ -
│ │ │ - │ │ │ -
36 {
│ │ │ - │ │ │ -
38 return EntityImp( grid(), elementInfo(), 0 );
│ │ │ -
39 }
│ │ │ -
│ │ │ + │ │ │ +
34
│ │ │ +
35 static const Level isNewFlag = (1 << 7);
│ │ │ +
36 static const Level levelMask = (1 << 7) - 1;
│ │ │ +
37
│ │ │ +
38 class SetLocal;
│ │ │ +
39 class CalcMaxLevel;
│ │ │
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 }
│ │ │ +
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 }
│ │ │
│ │ │
61
│ │ │
│ │ │ - │ │ │ -
63 template< class Grid >
│ │ │ -
│ │ │ - │ │ │ -
65 {
│ │ │ -
│ │ │ -
66 assert( boundary() );
│ │ │ -
67 const Alberta::BasicNodeProjection *projection = elementInfo().boundaryProjection( oppVertex_ );
│ │ │ +
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 assert( projection );
│ │ │ -
│ │ │ -
69 return projection->boundaryIndex();
│ │ │ -
70 }
│ │ │ -
71
│ │ │ -
│ │ │ - │ │ │ -
73 template< class Grid >
│ │ │ -
│ │ │ - │ │ │ -
75 {
│ │ │ -
│ │ │ -
76 const int face = (dimension > 1 ? oppVertex_ : 1-oppVertex_);
│ │ │ -
│ │ │ -
77 return grid().alberta2generic( 1, face );
│ │ │ -
│ │ │ -
78 }
│ │ │ -
79
│ │ │ -
│ │ │ - │ │ │ -
│ │ │ -
81 template< class Grid >
│ │ │ -
│ │ │ -
82 inline GeometryType AlbertaGridIntersectionBase< Grid >::type () const
│ │ │ -
83 {
│ │ │ -
84 return GeometryTypes::simplex( dimension-1 );
│ │ │ -
85 }
│ │ │ -
│ │ │ -
86
│ │ │ -
87
│ │ │ -
│ │ │ -
88 template< class Grid >
│ │ │ -
│ │ │ - │ │ │ +
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
│ │ │
│ │ │ - │ │ │ -
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();
│ │ │ +
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 NormalVector normal;
│ │ │ -
102 jInvT.mv( refNormal, normal );
│ │ │ -
103 normal *= geoInside.impl().integrationElement();
│ │ │ +
101 level_.create( dofSpace, "Element level" );
│ │ │ +
102 assert( level_ );
│ │ │ +
103 level_.template setupInterpolation< Interpolation >();
│ │ │
104
│ │ │ -
105 return normal;
│ │ │ -
106 }
│ │ │ +
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 };
│ │ │
│ │ │ -
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_ ];
│ │ │ +
143
│ │ │ +
144
│ │ │
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 )
│ │ │ +
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 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 }
│ │ │ +
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 }
│ │ │
│ │ │ -
167
│ │ │
168
│ │ │ -
169 template< class Grid >
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
172 {
│ │ │ -
173 return centerIntegrationOuterNormal();
│ │ │ -
174 }
│ │ │ +
│ │ │ +
169 Level maxLevel () const
│ │ │ +
170 {
│ │ │ +
171 return maxLevel_;
│ │ │ +
172 }
│ │ │
│ │ │ +
173 };
│ │ │ +
│ │ │ +
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
│ │ │ +
177 // AlbertaGridLevelProvider::ClearFlags
│ │ │ +
178 // ------------------------------------
│ │ │ +
179
│ │ │ +
180 template< int dim >
│ │ │ +
181 template< typename AlbertaGridLevelProvider< dim >::Level flags >
│ │ │ +
182 struct AlbertaGridLevelProvider< dim >::ClearFlags
│ │ │ +
183 {
│ │ │ +
184 void operator() ( Level &dof ) const
│ │ │ +
185 {
│ │ │ +
186 dof &= ~flags;
│ │ │ +
187 }
│ │ │ +
188 };
│ │ │ +
189
│ │ │ +
190
│ │ │ +
191
│ │ │ +
192 // AlbertaGridLevelProvider::Interpolation
│ │ │ +
193 // ---------------------------------------
│ │ │
194
│ │ │ -
195 template< class Grid >
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
198 {
│ │ │ -
199 return centerOuterNormal();
│ │ │ -
200 }
│ │ │ -
│ │ │ +
195 template< int dim >
│ │ │ +
│ │ │ + │ │ │ +
197 {
│ │ │ +
198 static const int dimension = dim;
│ │ │ +
199
│ │ │ + │ │ │
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
│ │ │ +
│ │ │ +
202 static void interpolateVector ( const DofVectorPointer &dofVector,
│ │ │ +
203 const Patch &patch )
│ │ │ +
204 {
│ │ │ +
205 const DofAccess dofAccess( dofVector.dofSpace() );
│ │ │ +
206 Level *array = (Level *)dofVector;
│ │ │ +
207
│ │ │ +
208 for( int i = 0; i < patch.count(); ++i )
│ │ │ +
209 {
│ │ │ +
210 const Alberta::Element *const father = patch[ i ];
│ │ │ +
211 assert( (array[ dofAccess( father, 0 ) ] & levelMask) < levelMask );
│ │ │ +
212 const Level childLevel = (array[ dofAccess( father, 0 ) ] + 1) | isNewFlag;
│ │ │ +
213 for( int i = 0; i < 2; ++i )
│ │ │ +
214 {
│ │ │ +
215 const Alberta::Element *child = father->child[ i ];
│ │ │ +
216 array[ dofAccess( child, 0 ) ] = childLevel;
│ │ │ +
217 }
│ │ │ +
218 }
│ │ │ +
219 }
│ │ │ +
│ │ │ +
220 };
│ │ │ +
│ │ │ +
221
│ │ │ +
222}
│ │ │ +
223
│ │ │ +
224#endif // #if HAVE_ALBERTA
│ │ │
225
│ │ │ -
226 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
│ │ │ +
226#endif
│ │ │ + │ │ │ +
provides a wrapper for ALBERTA's mesh structure
│ │ │ + │ │ │
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
│ │ │ - │ │ │ +
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,671 +1,355 @@ │ │ │ │ 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 │ │ │ │ +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_ALBERTA_INTERSECTION_CC │ │ │ │ -_6#define DUNE_ALBERTA_INTERSECTION_CC │ │ │ │ +5#ifndef DUNE_ALBERTA_LEVEL_HH │ │ │ │ +6#define DUNE_ALBERTA_LEVEL_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> │ │ │ │ -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 │ │ │ │ +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 │ │ │ │ +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 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 } │ │ │ │ +33 typedef _A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_<_ _d_i_m_ _> _F_i_l_l_F_l_a_g_s; │ │ │ │ +34 │ │ │ │ +35 static const Level isNewFlag = (1 << 7); │ │ │ │ +36 static const Level levelMask = (1 << 7) - 1; │ │ │ │ +37 │ │ │ │ +38 class _S_e_t_L_o_c_a_l; │ │ │ │ +39 class _C_a_l_c_M_a_x_L_e_v_e_l; │ │ │ │ 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; │ │ │ │ +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 } │ │ │ │ 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 } │ │ │ │ -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 │ │ │ │ +_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 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(); │ │ │ │ +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 _N_o_r_m_a_l_V_e_c_t_o_r normal; │ │ │ │ -102 jInvT.mv( refNormal, normal ); │ │ │ │ -103 normal *= geoInside.impl().integrationElement(); │ │ │ │ +101 level_._c_r_e_a_t_e( dofSpace, "Element level" ); │ │ │ │ +102 assert( level_ ); │ │ │ │ +103 level_.template setupInterpolation< Interpolation >(); │ │ │ │ 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_ ]; │ │ │ │ +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 │ │ │ │ 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 ) │ │ │ │ +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 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 │ │ │ │ +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 │ │ │ │ -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 } │ │ │ │ +_1_6_9 Level _m_a_x_L_e_v_e_l () const │ │ │ │ +170 { │ │ │ │ +171 return maxLevel_; │ │ │ │ +172 } │ │ │ │ +173 }; │ │ │ │ +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 │ │ │ │ +177 // AlbertaGridLevelProvider::ClearFlags │ │ │ │ +178 // ------------------------------------ │ │ │ │ +179 │ │ │ │ +180 template< int dim > │ │ │ │ +181 template< typename AlbertaGridLevelProvider< dim >::Level flags > │ │ │ │ +182 struct _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_P_r_o_v_i_d_e_r< dim >::ClearFlags │ │ │ │ +183 { │ │ │ │ +184 void _o_p_e_r_a_t_o_r_(_)_ ( Level &dof ) const │ │ │ │ +185 { │ │ │ │ +186 dof &= ~flags; │ │ │ │ +187 } │ │ │ │ +188 }; │ │ │ │ +189 │ │ │ │ +190 │ │ │ │ +191 │ │ │ │ +192 // AlbertaGridLevelProvider::Interpolation │ │ │ │ +193 // --------------------------------------- │ │ │ │ 194 │ │ │ │ -195 template< 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 } │ │ │ │ +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 │ │ │ │ -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 │ │ │ │ +_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 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 │ │ │ │ +215 const _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t *child = father->child[ i ]; │ │ │ │ +216 array[ dofAccess( child, 0 ) ] = childLevel; │ │ │ │ +217 } │ │ │ │ +218 } │ │ │ │ +219 } │ │ │ │ +220 }; │ │ │ │ +221 │ │ │ │ +222} │ │ │ │ +223 │ │ │ │ +224#endif // #if HAVE_ALBERTA │ │ │ │ 225 │ │ │ │ -226 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 │ │ │ │ +226#endif │ │ │ │ +_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_o_f_a_d_m_i_n_._h_h │ │ │ │ _D_u_n_e │ │ │ │ Include standard header files. │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_R_e_a_l │ │ │ │ -ALBERTA REAL Real │ │ │ │ -DDeeffiinniittiioonn misc.hh:48 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_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_:_:_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/a00668.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: indexsets.cc File Reference │ │ │ +dune-grid: meshpointer.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,27 +70,49 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ +Classes | │ │ │ Namespaces
│ │ │ -
indexsets.cc File Reference
│ │ │ +
meshpointer.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <dune/grid/albertagrid/indexsets.hh>
│ │ │ -#include <dune/grid/albertagrid/agrid.hh>
│ │ │ -
│ │ │ + │ │ │ +

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

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

Go to the source code of this file.

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

│ │ │ +Classes

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

│ │ │ Namespaces

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

Detailed Description

│ │ │ +

provides a wrapper for ALBERTA's mesh structure

│ │ │ +
Author
Martin Nolte
│ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,17 +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 │ │ │ │ -_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 │ │ │ │ +meshpointer.hh File Reference │ │ │ │ +provides a wrapper for ALBERTA's mesh structure _M_o_r_e_._._. │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_i_s_c_._h_h> │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_e_l_e_m_e_n_t_i_n_f_o_._h_h> │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_a_c_r_o_d_a_t_a_._h_h> │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_p_r_o_j_e_c_t_i_o_n_._h_h> │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +CCllaasssseess │ │ │ │ +class   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_ _> │ │ │ │ +  │ │ │ │ +class   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_ _>_:_:_M_a_c_r_o_I_t_e_r_a_t_o_r │ │ │ │ +  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │   Include standard header files. │ │ │ │   │ │ │ │ +namespace   _D_u_n_e_:_:_A_l_b_e_r_t_a │ │ │ │ +  │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ +provides a wrapper for ALBERTA's mesh structure │ │ │ │ + Author │ │ │ │ + Martin Nolte │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00671.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: hierarchiciterator.hh File Reference │ │ │ +dune-grid: elementinfo.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,33 +72,50 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
hierarchiciterator.hh File Reference
│ │ │ +
elementinfo.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <dune/grid/albertagrid/elementinfo.hh>
│ │ │ -#include <dune/grid/common/entityiterator.hh>
│ │ │ + │ │ │ +

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

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

Go to the source code of this file.

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

│ │ │ Classes

class  Dune::AlbertaGridHierarchicIterator< GridImp >
class  Dune::Alberta::ElementInfo< dim >
 
struct  Dune::Alberta::ElementInfo< dim >::Instance
 
class  Dune::Alberta::ElementInfo< dim >::Stack
 
struct  Dune::Alberta::ElementInfo< dim >::Seed
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ + │ │ │

│ │ │ Namespaces

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

Detailed Description

│ │ │ +

provides a wrapper for ALBERTA's el_info structure

│ │ │ +
Author
Martin Nolte
│ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -2,20 +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 │ │ │ │ -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> │ │ │ │ +elementinfo.hh File Reference │ │ │ │ +provides a wrapper for ALBERTA's el_info structure _M_o_r_e_._._. │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_g_e_o_m_e_t_r_y_c_a_c_h_e_._h_h> │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_a_c_r_o_e_l_e_m_e_n_t_._h_h> │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -class   _D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ + class   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> │ │ │ │ +  │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_I_n_s_t_a_n_c_e │ │ │ │ +  │ │ │ │ + class   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_S_t_a_c_k │ │ │ │ +  │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_S_e_e_d │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │   Include standard header files. │ │ │ │   │ │ │ │ +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/a00671_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: hierarchiciterator.hh Source File │ │ │ +dune-grid: elementinfo.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,210 +74,1228 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
hierarchiciterator.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_HIERARCHICITERATOR_HH
│ │ │ -
6#define DUNE_ALBERTA_HIERARCHICITERATOR_HH
│ │ │ +
5#ifndef DUNE_ALBERTA_ELEMENTINFO_HH
│ │ │ +
6#define DUNE_ALBERTA_ELEMENTINFO_HH
│ │ │
7
│ │ │ - │ │ │ - │ │ │ -
10
│ │ │ -
11#if HAVE_ALBERTA
│ │ │ -
12
│ │ │ -
13namespace Dune
│ │ │ -
14{
│ │ │ -
15
│ │ │ -
16 // AlbertaGridHierarchicIterator
│ │ │ -
17 // -----------------------------
│ │ │ -
18
│ │ │ -
27 template< class GridImp >
│ │ │ -
│ │ │ - │ │ │ -
29 {
│ │ │ - │ │ │ -
31
│ │ │ -
32 public:
│ │ │ -
33 typedef typename GridImp::template Codim<0>::Entity Entity;
│ │ │ -
34 typedef typename GridImp::ctype ctype;
│ │ │ +
13#include <cassert>
│ │ │ +
14#include <vector>
│ │ │ +
15#include <utility>
│ │ │ +
16
│ │ │ + │ │ │ + │ │ │ +
19
│ │ │ +
20#if HAVE_ALBERTA
│ │ │ +
21
│ │ │ +
22namespace Dune
│ │ │ +
23{
│ │ │ +
24
│ │ │ +
25 namespace Alberta
│ │ │ +
26 {
│ │ │ +
27
│ │ │ +
28 // External Forward Declarations
│ │ │ +
29 // -----------------------------
│ │ │ +
30
│ │ │ +
31 template< int dim >
│ │ │ +
32 class MeshPointer;
│ │ │ +
33
│ │ │ +
34 struct BasicNodeProjection;
│ │ │
35
│ │ │ - │ │ │ - │ │ │ -
38
│ │ │ -
39 typedef typename EntityImp::ElementInfo ElementInfo;
│ │ │ +
36
│ │ │ +
37
│ │ │ +
38 // ElementInfo
│ │ │ +
39 // -----------
│ │ │
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 );
│ │ │ +
41 template< int dim >
│ │ │ +
│ │ │ + │ │ │ +
43 {
│ │ │ +
44 struct Instance;
│ │ │ +
45 class Stack;
│ │ │ +
46
│ │ │ +
47 template< int >
│ │ │ +
48 struct Library;
│ │ │ +
49
│ │ │ +
50 typedef Instance *InstancePtr;
│ │ │
51
│ │ │ -
53 AlbertaGridHierarchicIterator ( const This &other );
│ │ │ +
52 public:
│ │ │ +
53 static const int dimension = dim;
│ │ │
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 }
│ │ │ -
│ │ │ -
66
│ │ │ -
│ │ │ - │ │ │ -
69 {
│ │ │ -
70 return entity_;
│ │ │ -
71 }
│ │ │ -
│ │ │ -
72
│ │ │ -
│ │ │ -
74 int level () const
│ │ │ -
75 {
│ │ │ -
76 return entity_.impl().level();
│ │ │ -
77 }
│ │ │ -
│ │ │ -
78
│ │ │ -
79 protected:
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
61
│ │ │ +
62 static const int maxNeighbors = N_NEIGH_MAX;
│ │ │ +
63
│ │ │ +
64 static const int maxLevelNeighbors = Library< dimWorld >::maxLevelNeighbors;
│ │ │ +
65
│ │ │ +
66#if !DUNE_ALBERTA_CACHE_COORDINATES
│ │ │ + │ │ │ +
68#endif
│ │ │ +
69
│ │ │ +
70 struct Seed;
│ │ │ +
71
│ │ │ +
72 private:
│ │ │ +
73 explicit ElementInfo ( const InstancePtr &instance );
│ │ │ +
74
│ │ │ +
75 public:
│ │ │ +
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
78 typename FillFlags::Flags fillFlags = FillFlags::standard );
│ │ │ +
│ │ │ +
79 ElementInfo ( const MeshPointer &mesh, const Seed &seed,
│ │ │ +
80 typename FillFlags::Flags fillFlags = FillFlags::standard );
│ │ │
│ │ │ -
81 const GridImp &grid () const
│ │ │ -
82 {
│ │ │ -
83 return entity_.impl().grid();
│ │ │ -
84 }
│ │ │ -
│ │ │ +
81 ElementInfo ( const ElementInfo &other );
│ │ │ +
│ │ │ + │ │ │ +
83
│ │ │ +
│ │ │ + │ │ │
85
│ │ │ -
86 private:
│ │ │ -
87 void increment ( ElementInfo elementInfo );
│ │ │ +
│ │ │ + │ │ │ +
│ │ │ + │ │ │
88
│ │ │ -
89 mutable Entity entity_;
│ │ │ +
89 explicit operator bool () const { return (instance_ != null()); }
│ │ │
90
│ │ │ -
91 // level on which the iterator was started
│ │ │ -
92 int startLevel_;
│ │ │ +
│ │ │ +
91 bool operator== ( const ElementInfo &other ) const;
│ │ │ +
│ │ │ +
92 bool operator!= ( const ElementInfo &other ) const;
│ │ │
93
│ │ │ -
94 // maximal level to go down to
│ │ │ -
95 int maxlevel_;
│ │ │ -
96 };
│ │ │ -
│ │ │ -
97
│ │ │ -
98
│ │ │ -
99 template< class GridImp >
│ │ │ -
100 inline AlbertaGridHierarchicIterator< GridImp >
│ │ │ -
│ │ │ -
101 ::AlbertaGridHierarchicIterator( const GridImp &grid, int actLevel, int maxLevel )
│ │ │ -
102 : entity_( EntityImp( grid ) ),
│ │ │ -
103 startLevel_( actLevel ),
│ │ │ -
104 maxlevel_( maxLevel )
│ │ │ -
105 {}
│ │ │ -
│ │ │ -
106
│ │ │ -
107
│ │ │ -
108 template< class GridImp >
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
111 const ElementInfo &elementInfo,
│ │ │ -
112 int maxLevel )
│ │ │ -
113 : entity_( EntityImp( grid ) ),
│ │ │ -
114 startLevel_( elementInfo.level() ),
│ │ │ -
115 maxlevel_( maxLevel )
│ │ │ -
116 {
│ │ │ -
117 increment( elementInfo );
│ │ │ -
118 }
│ │ │ -
│ │ │ -
119
│ │ │ -
120
│ │ │ -
121 template< class GridImp >
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
124 : entity_( other.entity_ ),
│ │ │ -
125 startLevel_( other.startLevel_ ),
│ │ │ -
126 maxlevel_( other.maxlevel_ )
│ │ │ -
127 {}
│ │ │ -
│ │ │ +
│ │ │ +
94 const MacroElement &macroElement () const;
│ │ │ +
│ │ │ + │ │ │ +
│ │ │ +
96 int indexInFather () const;
│ │ │ +
│ │ │ +
97 ElementInfo child ( int i ) const;
│ │ │ +
│ │ │ +
98 bool isLeaf () const;
│ │ │ +
99
│ │ │ +
│ │ │ +
100 Seed seed () const;
│ │ │ +
101
│ │ │ +
│ │ │ + │ │ │ +
103
│ │ │ +
│ │ │ +
104 bool mightVanish () const;
│ │ │ +
105
│ │ │ +
│ │ │ +
106 int level () const;
│ │ │ +
107 // see ALBERTA documentation for definition of element type
│ │ │ +
108 // values are 0, 1, 2
│ │ │ +
│ │ │ +
109 int type () const;
│ │ │ +
110
│ │ │ +
│ │ │ +
111 int getMark () const;
│ │ │ +
│ │ │ +
112 void setMark ( int refCount ) const;
│ │ │ +
113
│ │ │ +
│ │ │ +
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
│ │ │ -
130 template< class GridImp >
│ │ │ - │ │ │ +
129 template< int codim >
│ │ │ +
│ │ │ +
130 int twist ( int subEntity ) const;
│ │ │ +
│ │ │ +
131 int twistInNeighbor ( int face ) const;
│ │ │
│ │ │ - │ │ │ -
133 {
│ │ │ -
134 entity_ = other.entity_;
│ │ │ -
135 startLevel_ = other.startLevel_;
│ │ │ -
136 maxlevel_ = other.maxlevel_;
│ │ │ -
137 return *this;
│ │ │ -
138 }
│ │ │ -
│ │ │ -
139
│ │ │ -
140
│ │ │ -
141 template< class GridImp >
│ │ │ -
│ │ │ - │ │ │ -
143 {
│ │ │ -
144 increment( entity_.impl().elementInfo() );
│ │ │ -
145 }
│ │ │ -
│ │ │ -
146
│ │ │ -
147 template< class GridImp >
│ │ │ - │ │ │ -
149 ::increment ( ElementInfo elementInfo )
│ │ │ -
150 {
│ │ │ -
151 assert( !elementInfo == false );
│ │ │ -
152 if( (elementInfo.level() >= maxlevel_) || elementInfo.isLeaf() )
│ │ │ -
153 {
│ │ │ -
154 while( (elementInfo.level() > startLevel_) && (elementInfo.indexInFather() == 1) )
│ │ │ -
155 elementInfo = elementInfo.father();
│ │ │ -
156 if( elementInfo.level() > startLevel_ )
│ │ │ -
157 entity_.impl().setElement( elementInfo.father().child( 1 ), 0 );
│ │ │ -
158 else
│ │ │ -
159 entity_.impl().clearElement();
│ │ │ -
160 }
│ │ │ -
161 else
│ │ │ -
162 entity_.impl().setElement( elementInfo.child( 0 ), 0 );
│ │ │ -
163 }
│ │ │ -
164
│ │ │ -
165}
│ │ │ -
166
│ │ │ -
167#endif // #if HAVE_ALBERTA
│ │ │ +
132 bool isBoundary ( int face ) const;
│ │ │ +
│ │ │ +
133 int boundaryId ( int face ) const;
│ │ │ +
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
136
│ │ │ +
│ │ │ +
137 bool hasCoordinates () const;
│ │ │ +
│ │ │ +
138 const GlobalVector &coordinate ( int vertex ) const;
│ │ │ +
139#if !DUNE_ALBERTA_CACHE_COORDINATES
│ │ │ +
│ │ │ + │ │ │ +
141 {
│ │ │ +
142 return GeometryCache( instance_->geometryCache, instance_->elInfo );
│ │ │ +
143 }
│ │ │ +
│ │ │ +
144#endif
│ │ │ +
145
│ │ │ +
146 template< class Functor >
│ │ │ +
│ │ │ +
147 void hierarchicTraverse ( Functor &functor ) const;
│ │ │ +
148
│ │ │ +
149 template< class Functor >
│ │ │ +
│ │ │ +
150 void leafTraverse ( Functor &functor ) const;
│ │ │ +
151
│ │ │ +
│ │ │ +
152 const Element *element () const;
│ │ │ +
│ │ │ +
153 const Element *neighbor ( int face ) const;
│ │ │ +
│ │ │ +
154 Element *el () const;
│ │ │ +
│ │ │ +
155 ALBERTA EL_INFO &elInfo () const;
│ │ │ +
156
│ │ │ +
157 static ElementInfo
│ │ │ +
│ │ │ + │ │ │ +
159 const Element *element, int level, int type = 0 );
│ │ │ +
│ │ │ +
160 static ElementInfo createFake ( const ALBERTA EL_INFO &elInfo );
│ │ │ +
161
│ │ │ +
162 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#endif // #ifndef DUNE_ALBERTA_HIERARCHICITERATOR_HH
│ │ │ -
provides a wrapper for ALBERTA's el_info structure
│ │ │ +
169 void addReference () const;
│ │ │ +
170 void removeReference () const;
│ │ │ +
171
│ │ │ +
172 static InstancePtr null ();
│ │ │ +
173 static Stack &stack ();
│ │ │ +
174
│ │ │ +
175 InstancePtr instance_;
│ │ │ +
176 };
│ │ │ +
177
│ │ │ +
178
│ │ │ +
179
│ │ │ +
180 // ElementInfo::Instance
│ │ │ +
181 // ---------------------
│ │ │ +
182
│ │ │ +
183 template< int dim >
│ │ │ +
│ │ │ +
184 struct ElementInfo< dim >::Instance
│ │ │ +
185 {
│ │ │ + │ │ │ +
187 unsigned int refCount;
│ │ │ +
188
│ │ │ +
│ │ │ + │ │ │ +
190 {
│ │ │ +
191 return parent_;
│ │ │ +
192 }
│ │ │ +
│ │ │ +
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 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
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ + │ │ │ +
#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
│ │ │ -
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 MESH Mesh
Definition misc.hh:53
│ │ │ +
ALBERTA AFF_TRAFO AffineTransformation
Definition misc.hh:52
│ │ │ +
ALBERTA EL Element
Definition misc.hh:54
│ │ │ +
ALBERTA REAL_D GlobalVector
Definition misc.hh:50
│ │ │ + │ │ │ +
Definition elementinfo.hh:43
│ │ │ +
ElementInfo leafNeighbor(const int face) const
Definition elementinfo.hh:585
│ │ │ +
bool isLeaf() const
Definition elementinfo.hh:488
│ │ │ +
static ElementInfo createFake(const MeshPointer &mesh, const Element *element, int level, int type=0)
Definition elementinfo.hh:752
│ │ │ +
ElementInfo child(int i) const
Definition elementinfo.hh:470
│ │ │ +
int level() const
Definition elementinfo.hh:533
│ │ │ +
bool mightVanish() const
Definition elementinfo.hh:526
│ │ │ +
static const int numFaces
Definition elementinfo.hh:56
│ │ │ +
int twist(int subEntity) const
Definition elementinfo.hh:605
│ │ │ +
int twistInNeighbor(int face) const
Definition elementinfo.hh:612
│ │ │ +
Alberta::MacroElement< dimension > MacroElement
Definition elementinfo.hh:58
│ │ │ +
BasicNodeProjection * boundaryProjection(int face) const
Definition elementinfo.hh:664
│ │ │ +
const MacroElement & macroElement() const
Definition elementinfo.hh:440
│ │ │ +
static const int maxLevelNeighbors
Definition elementinfo.hh:64
│ │ │ +
ElementInfo father() const
Definition elementinfo.hh:449
│ │ │ +
ElementInfo(const ElementInfo &other)
Definition elementinfo.hh:382
│ │ │ +
GeometryCacheProxy< dim > GeometryCache
Definition elementinfo.hh:67
│ │ │ +
ElementInfo & operator=(const ElementInfo &other)
Definition elementinfo.hh:405
│ │ │ +
bool hasLeafNeighbor(const int face) const
Definition elementinfo.hh:570
│ │ │ +
bool operator==(const ElementInfo &other) const
Definition elementinfo.hh:424
│ │ │ +
static const int dimension
Definition elementinfo.hh:53
│ │ │ +
void hierarchicTraverse(Functor &functor) const
Definition elementinfo.hh:695
│ │ │ +
int type() const
Definition elementinfo.hh:540
│ │ │ +
static const int maxNeighbors
Definition elementinfo.hh:62
│ │ │ +
void setMark(int refCount) const
Definition elementinfo.hh:561
│ │ │ +
~ElementInfo()
Definition elementinfo.hh:397
│ │ │ +
const GlobalVector & coordinate(int vertex) const
Definition elementinfo.hh:685
│ │ │ +
static const int numVertices
Definition elementinfo.hh:55
│ │ │ +
int getMark() const
Definition elementinfo.hh:554
│ │ │ +
void leafTraverse(Functor &functor) const
Definition elementinfo.hh:708
│ │ │ +
Alberta::MeshPointer< dimension > MeshPointer
Definition elementinfo.hh:59
│ │ │ +
const Element * neighbor(int face) const
Definition elementinfo.hh:728
│ │ │ +
static ElementInfo createFake(const ALBERTA EL_INFO &elInfo)
Definition elementinfo.hh:773
│ │ │ +
ElementInfo()
Definition elementinfo.hh:310
│ │ │ +
int boundaryId(int face) const
Definition elementinfo.hh:635
│ │ │ +
bool operator!=(const ElementInfo &other) const
Definition elementinfo.hh:432
│ │ │ +
Alberta::FillFlags< dimension > FillFlags
Definition elementinfo.hh:60
│ │ │ +
ElementInfo(const MeshPointer &mesh, const MacroElement &macroElement, typename FillFlags::Flags fillFlags=FillFlags::standard)
Definition elementinfo.hh:319
│ │ │ +
AffineTransformation * transformation(int face) const
Definition elementinfo.hh:651
│ │ │ +
bool isBoundary(int face) const
Definition elementinfo.hh:620
│ │ │ +
int indexInFather() const
Definition elementinfo.hh:457
│ │ │ +
Seed seed() const
Definition elementinfo.hh:496
│ │ │ +
Element * el() const
Definition elementinfo.hh:737
│ │ │ +
const Element * element() const
Definition elementinfo.hh:721
│ │ │ +
ALBERTA EL_INFO & elInfo() const
Definition elementinfo.hh:744
│ │ │ +
MeshPointer mesh() const
Definition elementinfo.hh:519
│ │ │ +
GeometryCache geometryCache() const
Definition elementinfo.hh:140
│ │ │ +
bool hasCoordinates() const
Definition elementinfo.hh:679
│ │ │ +
int levelNeighbors(const int face, ElementInfo(&neighbor)[maxLevelNeighbors], int(&faceInNeighbor)[maxLevelNeighbors]) const
Definition elementinfo.hh:596
│ │ │ +
ElementInfo(ElementInfo &&other)
Definition elementinfo.hh:389
│ │ │ +
ElementInfo(const MeshPointer &mesh, const Seed &seed, typename FillFlags::Flags fillFlags=FillFlags::standard)
Definition elementinfo.hh:340
│ │ │ +
Definition elementinfo.hh:185
│ │ │ +
InstancePtr & parent()
Definition elementinfo.hh:189
│ │ │ +
Alberta::GeometryCache< dim > geometryCache
Definition elementinfo.hh:199
│ │ │ +
ALBERTA EL_INFO elInfo
Definition elementinfo.hh:186
│ │ │ +
unsigned int refCount
Definition elementinfo.hh:187
│ │ │ +
Definition elementinfo.hh:210
│ │ │ +
InstancePtr null()
Definition elementinfo.hh:907
│ │ │ +
~Stack()
Definition elementinfo.hh:871
│ │ │ +
void release(InstancePtr &p)
Definition elementinfo.hh:897
│ │ │ +
Stack()
Definition elementinfo.hh:861
│ │ │ +
InstancePtr allocate()
Definition elementinfo.hh:884
│ │ │ +
Definition elementinfo.hh:255
│ │ │ +
Seed(const int macroIndex, const int level, const unsigned long path)
Definition elementinfo.hh:260
│ │ │ +
Seed()
Definition elementinfo.hh:256
│ │ │ +
int level() const
Definition elementinfo.hh:287
│ │ │ +
bool isValid() const
Definition elementinfo.hh:284
│ │ │ +
unsigned long path() const
Definition elementinfo.hh:288
│ │ │ +
int macroIndex() const
Definition elementinfo.hh:286
│ │ │ +
Definition geometrycache.hh:24
│ │ │ +
Definition geometrycache.hh:91
│ │ │ +
Definition macroelement.hh:24
│ │ │ +
Definition misc.hh:148
│ │ │ +
Definition misc.hh:231
│ │ │ +
static const Flags nothing
Definition misc.hh:234
│ │ │ +
static const Flags boundaryId
Definition misc.hh:246
│ │ │ +
ALBERTA FLAGS Flags
Definition misc.hh:232
│ │ │ +
static const Flags coords
Definition misc.hh:236
│ │ │ +
static const Flags standard
Definition misc.hh:258
│ │ │ +
static const Flags neighbor
Definition misc.hh:238
│ │ │ +
static int twist(const Element *element, int subEntity)
Definition misc.hh:538
│ │ │ +
Definition albertagrid/projection.hh:208
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,224 +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 │ │ │ │ -hierarchiciterator.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_HIERARCHICITERATOR_HH │ │ │ │ -6#define DUNE_ALBERTA_HIERARCHICITERATOR_HH │ │ │ │ +5#ifndef DUNE_ALBERTA_ELEMENTINFO_HH │ │ │ │ +6#define DUNE_ALBERTA_ELEMENTINFO_HH │ │ │ │ 7 │ │ │ │ -8#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_e_l_e_m_e_n_t_i_n_f_o_._h_h> │ │ │ │ -9#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_e_n_t_i_t_y_i_t_e_r_a_t_o_r_._h_h> │ │ │ │ -10 │ │ │ │ -11#if HAVE_ALBERTA │ │ │ │ -12 │ │ │ │ -13namespace _D_u_n_e │ │ │ │ -14{ │ │ │ │ -15 │ │ │ │ -16 // AlbertaGridHierarchicIterator │ │ │ │ -17 // ----------------------------- │ │ │ │ -18 │ │ │ │ -27 template< class GridImp > │ │ │ │ -_2_8 class _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ -29 { │ │ │ │ -30 typedef _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_ _G_r_i_d_I_m_p_ _> _T_h_i_s; │ │ │ │ -31 │ │ │ │ -32 public: │ │ │ │ -_3_3 typedef typename GridImp::template Codim<0>::Entity _E_n_t_i_t_y; │ │ │ │ -_3_4 typedef typename GridImp::ctype _c_t_y_p_e; │ │ │ │ +13#include │ │ │ │ +14#include │ │ │ │ +15#include │ │ │ │ +16 │ │ │ │ +17#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_g_e_o_m_e_t_r_y_c_a_c_h_e_._h_h> │ │ │ │ +18#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_a_c_r_o_e_l_e_m_e_n_t_._h_h> │ │ │ │ +19 │ │ │ │ +20#if HAVE_ALBERTA │ │ │ │ +21 │ │ │ │ +22namespace _D_u_n_e │ │ │ │ +23{ │ │ │ │ +24 │ │ │ │ +25 namespace Alberta │ │ │ │ +26 { │ │ │ │ +27 │ │ │ │ +28 // External Forward Declarations │ │ │ │ +29 // ----------------------------- │ │ │ │ +30 │ │ │ │ +31 template< int dim > │ │ │ │ +32 class MeshPointer; │ │ │ │ +33 │ │ │ │ +34 struct BasicNodeProjection; │ │ │ │ 35 │ │ │ │ -_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; │ │ │ │ +36 │ │ │ │ +37 │ │ │ │ +38 // ElementInfo │ │ │ │ +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 ); │ │ │ │ -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 ); │ │ │ │ +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 │ │ │ │ -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 ); │ │ │ │ +52 public: │ │ │ │ +_5_3 static const int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ 54 │ │ │ │ -56 This &_o_p_e_r_a_t_o_r_=_ ( const This &other ); │ │ │ │ +_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 │ │ │ │ -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 } │ │ │ │ +_5_8 typedef _A_l_b_e_r_t_a_:_:_M_a_c_r_o_E_l_e_m_e_n_t_<_ _d_i_m_e_n_s_i_o_n_ _> _M_a_c_r_o_E_l_e_m_e_n_t; │ │ │ │ +_5_9 typedef _A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_e_n_s_i_o_n_ _> _M_e_s_h_P_o_i_n_t_e_r; │ │ │ │ +_6_0 typedef _A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_<_ _d_i_m_e_n_s_i_o_n_ _> _F_i_l_l_F_l_a_g_s; │ │ │ │ +61 │ │ │ │ +_6_2 static const int _m_a_x_N_e_i_g_h_b_o_r_s = N_NEIGH_MAX; │ │ │ │ +63 │ │ │ │ +_6_4 static const int _m_a_x_L_e_v_e_l_N_e_i_g_h_b_o_r_s = Library< dimWorld >::maxLevelNeighbors; │ │ │ │ +65 │ │ │ │ +66#if !DUNE_ALBERTA_CACHE_COORDINATES │ │ │ │ +_6_7 typedef _G_e_o_m_e_t_r_y_C_a_c_h_e_P_r_o_x_y_<_ _d_i_m_ _> _G_e_o_m_e_t_r_y_C_a_c_h_e; │ │ │ │ +68#endif │ │ │ │ +69 │ │ │ │ +70 struct _S_e_e_d; │ │ │ │ +71 │ │ │ │ +72 private: │ │ │ │ +73 explicit _E_l_e_m_e_n_t_I_n_f_o ( const _I_n_s_t_a_n_c_e_P_t_r &instance ); │ │ │ │ +74 │ │ │ │ +75 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 │ │ │ │ -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 ); │ │ │ │ +_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 │ │ │ │ -89 mutable _E_n_t_i_t_y entity_; │ │ │ │ +_8_9 explicit operator bool () const { return (instance_ != null()); } │ │ │ │ 90 │ │ │ │ -91 // level on which the iterator was started │ │ │ │ -92 int startLevel_; │ │ │ │ +_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 │ │ │ │ -94 // maximal level to go down to │ │ │ │ -95 int maxlevel_; │ │ │ │ -96 }; │ │ │ │ -97 │ │ │ │ -98 │ │ │ │ -99 template< class GridImp > │ │ │ │ -100 inline AlbertaGridHierarchicIterator< GridImp > │ │ │ │ -_1_0_1 ::AlbertaGridHierarchicIterator( const GridImp &grid, int actLevel, int │ │ │ │ -maxLevel ) │ │ │ │ -102 : entity_( _E_n_t_i_t_y_I_m_p( grid ) ), │ │ │ │ -103 startLevel_( actLevel ), │ │ │ │ -104 maxlevel_( maxLevel ) │ │ │ │ -105 {} │ │ │ │ -106 │ │ │ │ -107 │ │ │ │ -108 template< class GridImp > │ │ │ │ -109 inline _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ -_1_1_0_ _:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r ( const GridImp &grid, │ │ │ │ -111 const _E_l_e_m_e_n_t_I_n_f_o &elementInfo, │ │ │ │ -112 int maxLevel ) │ │ │ │ -113 : entity_( _E_n_t_i_t_y_I_m_p( grid ) ), │ │ │ │ -114 startLevel_( elementInfo.level() ), │ │ │ │ -115 maxlevel_( maxLevel ) │ │ │ │ -116 { │ │ │ │ -117 _i_n_c_r_e_m_e_n_t( elementInfo ); │ │ │ │ -118 } │ │ │ │ -119 │ │ │ │ -120 │ │ │ │ -121 template< class GridImp > │ │ │ │ -122 inline _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ -_1_2_3_ _:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r( const _T_h_i_s &other ) │ │ │ │ -124 : entity_( other.entity_ ), │ │ │ │ -125 startLevel_( other.startLevel_ ), │ │ │ │ -126 maxlevel_( other.maxlevel_ ) │ │ │ │ -127 {} │ │ │ │ +_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 │ │ │ │ -130 template< class GridImp > │ │ │ │ -131 inline typename _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_ _G_r_i_d_I_m_p_ _>_:_:_T_h_i_s & │ │ │ │ -_1_3_2 _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_ _G_r_i_d_I_m_p_ _>_:_:_o_p_e_r_a_t_o_r_=_ ( const _T_h_i_s &other ) │ │ │ │ -133 { │ │ │ │ -134 entity_ = other.entity_; │ │ │ │ -135 startLevel_ = other.startLevel_; │ │ │ │ -136 maxlevel_ = other.maxlevel_; │ │ │ │ -137 return *this; │ │ │ │ -138 } │ │ │ │ -139 │ │ │ │ -140 │ │ │ │ -141 template< class GridImp > │ │ │ │ -_1_4_2 inline void _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_ _G_r_i_d_I_m_p_ _>_:_:_i_n_c_r_e_m_e_n_t () │ │ │ │ -143 { │ │ │ │ -144 increment( entity_.impl().elementInfo() ); │ │ │ │ -145 } │ │ │ │ -146 │ │ │ │ -147 template< class GridImp > │ │ │ │ -148 inline void _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ -149_ _:_:_i_n_c_r_e_m_e_n_t ( ElementInfo elementInfo ) │ │ │ │ -150 { │ │ │ │ -151 assert( !elementInfo == false ); │ │ │ │ -152 if( (elementInfo.level() >= maxlevel_) || elementInfo.isLeaf() ) │ │ │ │ -153 { │ │ │ │ -154 while( (elementInfo.level() > startLevel_) && (elementInfo.indexInFather() │ │ │ │ -== 1) ) │ │ │ │ -155 elementInfo = elementInfo.father(); │ │ │ │ -156 if( elementInfo.level() > startLevel_ ) │ │ │ │ -157 entity_.impl().setElement( elementInfo.father().child( 1 ), 0 ); │ │ │ │ -158 else │ │ │ │ -159 entity_.impl().clearElement(); │ │ │ │ -160 } │ │ │ │ -161 else │ │ │ │ -162 entity_.impl().setElement( elementInfo.child( 0 ), 0 ); │ │ │ │ -163 } │ │ │ │ -164 │ │ │ │ -165} │ │ │ │ -166 │ │ │ │ -167#endif // #if HAVE_ALBERTA │ │ │ │ +129 template< int codim > │ │ │ │ +_1_3_0 int _t_w_i_s_t ( int subEntity ) const; │ │ │ │ +_1_3_1 int _t_w_i_s_t_I_n_N_e_i_g_h_b_o_r ( int face ) const; │ │ │ │ +_1_3_2 bool _i_s_B_o_u_n_d_a_r_y ( int face ) const; │ │ │ │ +_1_3_3 int _b_o_u_n_d_a_r_y_I_d ( int face ) const; │ │ │ │ +_1_3_4 _A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n *_t_r_a_n_s_f_o_r_m_a_t_i_o_n ( int face ) const; │ │ │ │ +_1_3_5 _B_a_s_i_c_N_o_d_e_P_r_o_j_e_c_t_i_o_n *_b_o_u_n_d_a_r_y_P_r_o_j_e_c_t_i_o_n ( int face ) const; │ │ │ │ +136 │ │ │ │ +_1_3_7 bool _h_a_s_C_o_o_r_d_i_n_a_t_e_s () const; │ │ │ │ +_1_3_8 const _G_l_o_b_a_l_V_e_c_t_o_r &_c_o_o_r_d_i_n_a_t_e ( int vertex ) const; │ │ │ │ +139#if !DUNE_ALBERTA_CACHE_COORDINATES │ │ │ │ +_1_4_0 _G_e_o_m_e_t_r_y_C_a_c_h_e _g_e_o_m_e_t_r_y_C_a_c_h_e () const │ │ │ │ +141 { │ │ │ │ +142 return _G_e_o_m_e_t_r_y_C_a_c_h_e( instance_->_g_e_o_m_e_t_r_y_C_a_c_h_e, instance_->_e_l_I_n_f_o ); │ │ │ │ +143 } │ │ │ │ +144#endif │ │ │ │ +145 │ │ │ │ +146 template< class Functor > │ │ │ │ +_1_4_7 void _h_i_e_r_a_r_c_h_i_c_T_r_a_v_e_r_s_e ( Functor &functor ) const; │ │ │ │ +148 │ │ │ │ +149 template< class Functor > │ │ │ │ +_1_5_0 void _l_e_a_f_T_r_a_v_e_r_s_e ( Functor &functor ) const; │ │ │ │ +151 │ │ │ │ +_1_5_2 const _E_l_e_m_e_n_t *_e_l_e_m_e_n_t () const; │ │ │ │ +_1_5_3 const _E_l_e_m_e_n_t *_n_e_i_g_h_b_o_r ( int face ) const; │ │ │ │ +_1_5_4 _E_l_e_m_e_n_t *_e_l () const; │ │ │ │ +_1_5_5 _A_L_B_E_R_T_A EL_INFO &_e_l_I_n_f_o () const; │ │ │ │ +156 │ │ │ │ +157 static _E_l_e_m_e_n_t_I_n_f_o │ │ │ │ +_1_5_8 _c_r_e_a_t_e_F_a_k_e ( const _M_e_s_h_P_o_i_n_t_e_r &_m_e_s_h, │ │ │ │ +159 const _E_l_e_m_e_n_t *_e_l_e_m_e_n_t, int _l_e_v_e_l, int _t_y_p_e = 0 ); │ │ │ │ +_1_6_0 static _E_l_e_m_e_n_t_I_n_f_o _c_r_e_a_t_e_F_a_k_e ( const _A_L_B_E_R_T_A EL_INFO &_e_l_I_n_f_o ); │ │ │ │ +161 │ │ │ │ +162 private: │ │ │ │ +163 static bool _i_s_L_e_a_f ( _E_l_e_m_e_n_t *_e_l_e_m_e_n_t ); │ │ │ │ +164 static bool _m_i_g_h_t_V_a_n_i_s_h ( _E_l_e_m_e_n_t *_e_l_e_m_e_n_t, int depth ); │ │ │ │ +165 │ │ │ │ +166 static void fill ( _M_e_s_h *_m_e_s_h, const _A_L_B_E_R_T_A MACRO_EL *mel, _A_L_B_E_R_T_A EL_INFO │ │ │ │ +&_e_l_I_n_f_o ); │ │ │ │ +167 static void fill ( int ichild, const _A_L_B_E_R_T_A EL_INFO &parentInfo, _A_L_B_E_R_T_A │ │ │ │ +EL_INFO &_e_l_I_n_f_o ); │ │ │ │ 168 │ │ │ │ -169#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 void addReference () const; │ │ │ │ +170 void removeReference () const; │ │ │ │ +171 │ │ │ │ +172 static InstancePtr null (); │ │ │ │ +173 static Stack &stack (); │ │ │ │ +174 │ │ │ │ +175 InstancePtr instance_; │ │ │ │ +176 }; │ │ │ │ +177 │ │ │ │ +178 │ │ │ │ +179 │ │ │ │ +180 // ElementInfo::Instance │ │ │ │ +181 // --------------------- │ │ │ │ +182 │ │ │ │ +183 template< int dim > │ │ │ │ +_1_8_4 struct _E_l_e_m_e_n_t_I_n_f_o< dim >::_I_n_s_t_a_n_c_e │ │ │ │ +185 { │ │ │ │ +_1_8_6 _A_L_B_E_R_T_A EL_INFO _e_l_I_n_f_o; │ │ │ │ +_1_8_7 unsigned int _r_e_f_C_o_u_n_t; │ │ │ │ +188 │ │ │ │ +_1_8_9 _I_n_s_t_a_n_c_e_P_t_r &_p_a_r_e_n_t () │ │ │ │ +190 { │ │ │ │ +191 return parent_; │ │ │ │ +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 template< int dim > │ │ │ │ +_2_0_9 class _E_l_e_m_e_n_t_I_n_f_o< dim >::_S_t_a_c_k │ │ │ │ +210 { │ │ │ │ +211 _I_n_s_t_a_n_c_e_P_t_r top_; │ │ │ │ +212 _I_n_s_t_a_n_c_e null_; │ │ │ │ +213 │ │ │ │ +214 public: │ │ │ │ +_2_1_5 Stack (); │ │ │ │ +_2_1_6 ~Stack (); │ │ │ │ +217 │ │ │ │ +_2_1_8 InstancePtr allocate (); │ │ │ │ +_2_1_9 void release ( InstancePtr &p ); │ │ │ │ +_2_2_0 InstancePtr null (); │ │ │ │ +221 }; │ │ │ │ +222 │ │ │ │ +223 │ │ │ │ +224 │ │ │ │ +225 // ElementInfo::Library │ │ │ │ +226 // -------------------- │ │ │ │ +227 │ │ │ │ +228 template< int dim > │ │ │ │ +229 template< int > │ │ │ │ +230 struct _E_l_e_m_e_n_t_I_n_f_o< dim >::Library │ │ │ │ +231 { │ │ │ │ +232 typedef _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> _E_l_e_m_e_n_t_I_n_f_o; │ │ │ │ +233 │ │ │ │ +234 static const int _m_a_x_L_e_v_e_l_N_e_i_g_h_b_o_r_s = (1 << (dim-1)); │ │ │ │ +235 │ │ │ │ +236 static int │ │ │ │ +237 _l_e_a_f_N_e_i_g_h_b_o_r ( const _E_l_e_m_e_n_t_I_n_f_o &_e_l_e_m_e_n_t, const int face, _E_l_e_m_e_n_t_I_n_f_o │ │ │ │ +&_n_e_i_g_h_b_o_r ); │ │ │ │ +238 │ │ │ │ +239 static int │ │ │ │ +240 _l_e_v_e_l_N_e_i_g_h_b_o_r_s ( const _E_l_e_m_e_n_t_I_n_f_o &_e_l_e_m_e_n_t, const int face, │ │ │ │ +241 _E_l_e_m_e_n_t_I_n_f_o (&_n_e_i_g_h_b_o_r)[ _m_a_x_L_e_v_e_l_N_e_i_g_h_b_o_r_s ], int (&faceInNeighbor) │ │ │ │ +[ _m_a_x_L_e_v_e_l_N_e_i_g_h_b_o_r_s ] ); │ │ │ │ +242 │ │ │ │ +243 private: │ │ │ │ +244 static int │ │ │ │ +245 macroNeighbor ( const _E_l_e_m_e_n_t_I_n_f_o &_e_l_e_m_e_n_t, const int face, _E_l_e_m_e_n_t_I_n_f_o │ │ │ │ +&_n_e_i_g_h_b_o_r ); │ │ │ │ +246 }; │ │ │ │ +247 │ │ │ │ +248 │ │ │ │ +249 │ │ │ │ +250 // ElementInfo::Seed │ │ │ │ +251 // ----------------- │ │ │ │ +252 │ │ │ │ +253 template< int dim > │ │ │ │ +_2_5_4 struct _E_l_e_m_e_n_t_I_n_f_o< dim >::_S_e_e_d │ │ │ │ +255 { │ │ │ │ +_2_5_6 _S_e_e_d () │ │ │ │ +257 : macroIndex_( -1 ), level_( 0 ), path_( 0 ) │ │ │ │ +258 {} │ │ │ │ +259 │ │ │ │ +_2_6_0 _S_e_e_d ( const int macroIndex, const int _l_e_v_e_l, const unsigned long path ) │ │ │ │ +261 : macroIndex_( macroIndex ), level_( _l_e_v_e_l ), path_( path ) │ │ │ │ +262 {} │ │ │ │ +263 │ │ │ │ +_2_6_4 bool _o_p_e_r_a_t_o_r_=_=_ ( const _S_e_e_d &other ) const │ │ │ │ +265 { │ │ │ │ +266 return (macroIndex() == other._m_a_c_r_o_I_n_d_e_x()) && (_l_e_v_e_l() == other._l_e_v_e_l()) │ │ │ │ +&& (path() == other._p_a_t_h()); │ │ │ │ +267 } │ │ │ │ +268 │ │ │ │ +_2_6_9 bool operator< ( const _S_e_e_d &other ) const │ │ │ │ +270 { │ │ │ │ +271 const bool ml = (macroIndex() < other._m_a_c_r_o_I_n_d_e_x()); │ │ │ │ +272 const bool me = (macroIndex() == other._m_a_c_r_o_I_n_d_e_x()); │ │ │ │ +273 const bool ll = (_l_e_v_e_l() < other._l_e_v_e_l()); │ │ │ │ +274 const bool le = (_l_e_v_e_l() == other._l_e_v_e_l()); │ │ │ │ +275 const bool pl = (path() < other._p_a_t_h()); │ │ │ │ +276 return ml | (me & (ll | (le & pl))); │ │ │ │ +277 } │ │ │ │ +278 │ │ │ │ +_2_7_9 bool _o_p_e_r_a_t_o_r_!_=_ ( const _S_e_e_d &other ) const { return !(*this == other); } │ │ │ │ +_2_8_0 bool operator<= ( const _S_e_e_d &other ) const { return !(other < *this); } │ │ │ │ +_2_8_1 bool operator> ( const _S_e_e_d &other ) const { return (other < *this); } │ │ │ │ +_2_8_2 bool operator>= ( const _S_e_e_d &other ) const { return !(*this < other); } │ │ │ │ +283 │ │ │ │ +_2_8_4 bool _i_s_V_a_l_i_d ( ) const { return macroIndex_ != -1; } │ │ │ │ +285 │ │ │ │ +_2_8_6 int _m_a_c_r_o_I_n_d_e_x () const { return macroIndex_; } │ │ │ │ +_2_8_7 int _l_e_v_e_l () const { return level_; } │ │ │ │ +_2_8_8 unsigned long _p_a_t_h () const { return path_; } │ │ │ │ +289 │ │ │ │ +290 private: │ │ │ │ +291 int macroIndex_; │ │ │ │ +292 int level_; │ │ │ │ +293 unsigned long path_; │ │ │ │ +294 }; │ │ │ │ +295 │ │ │ │ +296 │ │ │ │ +297 │ │ │ │ +298 // Implementation of ElementInfo │ │ │ │ +299 // ----------------------------- │ │ │ │ +300 │ │ │ │ +301 template< int dim > │ │ │ │ +302 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_E_l_e_m_e_n_t_I_n_f_o ( const InstancePtr &instance ) │ │ │ │ +303 : instance_( instance ) │ │ │ │ +304 { │ │ │ │ +305 addReference(); │ │ │ │ +306 } │ │ │ │ +307 │ │ │ │ +308 │ │ │ │ +309 template< int dim > │ │ │ │ +_3_1_0 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_E_l_e_m_e_n_t_I_n_f_o () │ │ │ │ +311 : instance_( null() ) │ │ │ │ +312 { │ │ │ │ +313 addReference(); │ │ │ │ +314 } │ │ │ │ +315 │ │ │ │ +316 │ │ │ │ +317 template< int dim > │ │ │ │ +318 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> │ │ │ │ +_3_1_9_ _:_:_E_l_e_m_e_n_t_I_n_f_o ( const _M_e_s_h_P_o_i_n_t_e_r &mesh, const _M_a_c_r_o_E_l_e_m_e_n_t ¯oElement, │ │ │ │ +320 typename _F_i_l_l_F_l_a_g_s_:_:_F_l_a_g_s fillFlags ) │ │ │ │ +321 { │ │ │ │ +322 instance_ = stack().allocate(); │ │ │ │ +323 instance_->parent() = null(); │ │ │ │ +324 ++(instance_->parent()->refCount); │ │ │ │ +325 │ │ │ │ +326 addReference(); │ │ │ │ +327 │ │ │ │ +328 elInfo().fill_flag = fillFlags; │ │ │ │ +329 │ │ │ │ +330 // Alberta fills opp_vertex only if there is a neighbor │ │ │ │ +331 for( int k = 0; k < maxNeighbors; ++k ) │ │ │ │ +332 elInfo().opp_vertex[ k ] = -1; │ │ │ │ +333 │ │ │ │ +334 fill( mesh, ¯oElement, elInfo() ); │ │ │ │ +335 } │ │ │ │ +336 │ │ │ │ +337 │ │ │ │ +338 template< int dim > │ │ │ │ +339 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> │ │ │ │ +_3_4_0_ _:_:_E_l_e_m_e_n_t_I_n_f_o ( const _M_e_s_h_P_o_i_n_t_e_r &mesh, const _S_e_e_d &seed, │ │ │ │ +341 typename _F_i_l_l_F_l_a_g_s_:_:_F_l_a_g_s fillFlags ) │ │ │ │ +342 { │ │ │ │ +343 instance_ = stack().allocate(); │ │ │ │ +344 instance_->parent() = null(); │ │ │ │ +345 ++(instance_->parent()->refCount); │ │ │ │ +346 │ │ │ │ +347 addReference(); │ │ │ │ +348 │ │ │ │ +349 // fill in macro element info │ │ │ │ +350 elInfo().fill_flag = fillFlags; │ │ │ │ +351 │ │ │ │ +352 // Alberta fills opp_vertex only if there is a neighbor │ │ │ │ +353 for( int k = 0; k < maxNeighbors; ++k ) │ │ │ │ +354 elInfo().opp_vertex[ k ] = -1; │ │ │ │ +355 │ │ │ │ +356 fill( mesh, ((_M_e_s_h *)mesh)->macro_els + seed._m_a_c_r_o_I_n_d_e_x(), elInfo() ); │ │ │ │ +357 │ │ │ │ +358 // traverse the seed's path │ │ │ │ +359 unsigned long path = seed._p_a_t_h(); │ │ │ │ +360 for( int i = 0; i < seed._l_e_v_e_l(); ++i ) │ │ │ │ +361 { │ │ │ │ +362 _I_n_s_t_a_n_c_e_P_t_r child = stack().allocate(); │ │ │ │ +363 child->_p_a_r_e_n_t() = instance_; │ │ │ │ +364 │ │ │ │ +365 // Alberta fills opp_vertex only if there is a neighbor │ │ │ │ +366 for( int k = 0; k < maxNeighbors; ++k ) │ │ │ │ +367 child->_e_l_I_n_f_o.opp_vertex[ k ] = -2; │ │ │ │ +368 │ │ │ │ +369 fill( path & 1, elInfo(), child->_e_l_I_n_f_o ); │ │ │ │ +370 │ │ │ │ +371 instance_ = child; │ │ │ │ +372 addReference(); │ │ │ │ +373 │ │ │ │ +374 path = path >> 1; │ │ │ │ +375 } │ │ │ │ +376 │ │ │ │ +377 assert( this->seed() == seed ); │ │ │ │ +378 } │ │ │ │ +379 │ │ │ │ +380 │ │ │ │ +381 template< int dim > │ │ │ │ +_3_8_2 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_E_l_e_m_e_n_t_I_n_f_o ( const _E_l_e_m_e_n_t_I_n_f_o &other ) │ │ │ │ +383 : instance_( other.instance_ ) │ │ │ │ +384 { │ │ │ │ +385 addReference(); │ │ │ │ +386 } │ │ │ │ +387 │ │ │ │ +388 template< int dim > │ │ │ │ +_3_8_9 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_E_l_e_m_e_n_t_I_n_f_o ( _E_l_e_m_e_n_t_I_n_f_o &&other ) │ │ │ │ +390 : instance_( NULL ) │ │ │ │ +391 { │ │ │ │ +392 using _s_t_d_:_:_s_w_a_p; │ │ │ │ +393 swap( instance_, other.instance_ ); │ │ │ │ +394 } │ │ │ │ +395 │ │ │ │ +396 template< int dim > │ │ │ │ +_3_9_7 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_~_E_l_e_m_e_n_t_I_n_f_o () │ │ │ │ +398 { │ │ │ │ +399 removeReference(); │ │ │ │ +400 } │ │ │ │ +401 │ │ │ │ +402 │ │ │ │ +403 template< int dim > │ │ │ │ +404 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> & │ │ │ │ +_4_0_5 _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_o_p_e_r_a_t_o_r_=_ ( const _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> &other ) │ │ │ │ +406 { │ │ │ │ +407 other.addReference(); │ │ │ │ +408 removeReference(); │ │ │ │ +409 instance_ = other.instance_; │ │ │ │ +410 return *this; │ │ │ │ +411 } │ │ │ │ +412 │ │ │ │ +413 template< int dim > │ │ │ │ +414 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> & │ │ │ │ +_4_1_5 _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_o_p_e_r_a_t_o_r_=_ ( _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> &&other ) │ │ │ │ +416 { │ │ │ │ +417 using _s_t_d_:_:_s_w_a_p; │ │ │ │ +418 swap( instance_, other.instance_ ); │ │ │ │ +419 return *this; │ │ │ │ +420 } │ │ │ │ +421 │ │ │ │ +422 template< int dim > │ │ │ │ +423 inline bool │ │ │ │ +_4_2_4 _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_o_p_e_r_a_t_o_r_=_=_ ( const _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> &other ) const │ │ │ │ +425 { │ │ │ │ +426 return (instance_->elInfo.el == other.instance_->_e_l_I_n_f_o.el); │ │ │ │ +427 } │ │ │ │ +428 │ │ │ │ +429 │ │ │ │ +430 template< int dim > │ │ │ │ +431 inline bool │ │ │ │ +_4_3_2 _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_o_p_e_r_a_t_o_r_!_=_ ( const _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> &other ) const │ │ │ │ +433 { │ │ │ │ +434 return (instance_->elInfo.el != other.instance_->_e_l_I_n_f_o.el); │ │ │ │ +435 } │ │ │ │ +436 │ │ │ │ +437 │ │ │ │ +438 template< int dim > │ │ │ │ +439 inline const typename _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_M_a_c_r_o_E_l_e_m_e_n_t & │ │ │ │ +_4_4_0 _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_m_a_c_r_o_E_l_e_m_e_n_t () const │ │ │ │ +441 { │ │ │ │ +442 assert( !!(*this) ); │ │ │ │ +443 assert( elInfo().macro_el != NULL ); │ │ │ │ +444 return static_cast< const _M_a_c_r_o_E_l_e_m_e_n_t & >( *(elInfo().macro_el) ); │ │ │ │ +445 } │ │ │ │ +446 │ │ │ │ +447 │ │ │ │ +448 template< int dim > │ │ │ │ +_4_4_9 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_f_a_t_h_e_r () const │ │ │ │ +450 { │ │ │ │ +451 assert( !!(*this) ); │ │ │ │ +452 return _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>( instance_->parent() ); │ │ │ │ +453 } │ │ │ │ +454 │ │ │ │ +455 │ │ │ │ +456 template< int dim > │ │ │ │ +_4_5_7 inline int _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_i_n_d_e_x_I_n_F_a_t_h_e_r () const │ │ │ │ +458 { │ │ │ │ +459 const _E_l_e_m_e_n_t *element = elInfo()._e_l; │ │ │ │ +460 const _E_l_e_m_e_n_t *father = elInfo().parent->el; │ │ │ │ +461 assert( father != NULL ); │ │ │ │ +462 │ │ │ │ +463 const int index = (father->child[ 0 ] == element ? 0 : 1); │ │ │ │ +464 assert( father->child[ index ] == element ); │ │ │ │ +465 return index; │ │ │ │ +466 } │ │ │ │ +467 │ │ │ │ +468 │ │ │ │ +469 template< int dim > │ │ │ │ +_4_7_0 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_c_h_i_l_d ( int i ) const │ │ │ │ +471 { │ │ │ │ +472 assert( !isLeaf() ); │ │ │ │ +473 │ │ │ │ +474 _I_n_s_t_a_n_c_e_P_t_r child = stack().allocate(); │ │ │ │ +475 child->_p_a_r_e_n_t() = instance_; │ │ │ │ +476 addReference(); │ │ │ │ +477 │ │ │ │ +478 // Alberta fills opp_vertex only if there is a neighbor │ │ │ │ +479 for( int k = 0; k < maxNeighbors; ++k ) │ │ │ │ +480 child->_e_l_I_n_f_o.opp_vertex[ k ] = -2; │ │ │ │ +481 │ │ │ │ +482 fill( i, elInfo(), child->_e_l_I_n_f_o ); │ │ │ │ +483 return _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>( child ); │ │ │ │ +484 } │ │ │ │ +485 │ │ │ │ +486 │ │ │ │ +487 template< int dim > │ │ │ │ +_4_8_8 inline bool _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_i_s_L_e_a_f () const │ │ │ │ +489 { │ │ │ │ +490 assert( !(*this) == false ); │ │ │ │ +491 return isLeaf( el() ); │ │ │ │ +492 } │ │ │ │ +493 │ │ │ │ +494 │ │ │ │ +495 template< int dim > │ │ │ │ +_4_9_6 inline typename _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_S_e_e_d _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_s_e_e_d () const │ │ │ │ +497 { │ │ │ │ +498 assert( !!(*this) ); │ │ │ │ +499 │ │ │ │ +500 int level = 0; │ │ │ │ +501 unsigned long path = 0; │ │ │ │ +502 for( _I_n_s_t_a_n_c_e_P_t_r p = instance_; p->_p_a_r_e_n_t() != null(); p = p->_p_a_r_e_n_t() ) │ │ │ │ +503 { │ │ │ │ +504 const _E_l_e_m_e_n_t *element = p->_e_l_I_n_f_o.el; │ │ │ │ +505 const _E_l_e_m_e_n_t *father = p->parent()->elInfo.el; │ │ │ │ +506 const unsigned long child = static_cast< unsigned long >( father->child[ 1 │ │ │ │ +] == element ); │ │ │ │ +507 path = (path << 1) | child; │ │ │ │ +508 ++level; │ │ │ │ +509 } │ │ │ │ +510 │ │ │ │ +511 if( level != elInfo().level ) │ │ │ │ +512 DUNE_THROW( NotImplemented, "Seed for fake elements not implemented." ); │ │ │ │ +513 │ │ │ │ +514 return _S_e_e_d( macroElement().index, level, path ); │ │ │ │ +515 } │ │ │ │ +516 │ │ │ │ +517 │ │ │ │ +518 template< int dim > │ │ │ │ +_5_1_9 inline typename _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_M_e_s_h_P_o_i_n_t_e_r _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_m_e_s_h () │ │ │ │ +const │ │ │ │ +520 { │ │ │ │ +521 return _M_e_s_h_P_o_i_n_t_e_r( elInfo().mesh ); │ │ │ │ +522 } │ │ │ │ +523 │ │ │ │ +524 │ │ │ │ +525 template< int dim > │ │ │ │ +_5_2_6 inline bool _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_m_i_g_h_t_V_a_n_i_s_h () const │ │ │ │ +527 { │ │ │ │ +528 return mightVanish( el(), 0 ); │ │ │ │ +529 } │ │ │ │ +530 │ │ │ │ +531 │ │ │ │ +532 template< int dim > │ │ │ │ +_5_3_3 inline int _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_l_e_v_e_l () const │ │ │ │ +534 { │ │ │ │ +535 return elInfo().level; │ │ │ │ +536 } │ │ │ │ +537 │ │ │ │ +538 │ │ │ │ +539 template< int dim > │ │ │ │ +_5_4_0 inline int _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_t_y_p_e () const │ │ │ │ +541 { │ │ │ │ +542 return 0; │ │ │ │ +543 } │ │ │ │ +544 │ │ │ │ +545 │ │ │ │ +546 template<> │ │ │ │ +_5_4_7 inline int _E_l_e_m_e_n_t_I_n_f_o_<_ _3_ _>_:_:_t_y_p_e () const │ │ │ │ +548 { │ │ │ │ +549 return instance_->elInfo.el_type; │ │ │ │ +550 } │ │ │ │ +551 │ │ │ │ +552 │ │ │ │ +553 template< int dim > │ │ │ │ +_5_5_4 inline int _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_g_e_t_M_a_r_k () const │ │ │ │ +555 { │ │ │ │ +556 return el()->mark; │ │ │ │ +557 } │ │ │ │ +558 │ │ │ │ +559 │ │ │ │ +560 template< int dim > │ │ │ │ +_5_6_1 inline void _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_s_e_t_M_a_r_k ( int refCount ) const │ │ │ │ +562 { │ │ │ │ +563 assert( isLeaf() ); │ │ │ │ +564 assert( (refCount >= -128) && (refCount < 127) ); │ │ │ │ +565 el()->mark = refCount; │ │ │ │ +566 } │ │ │ │ +567 │ │ │ │ +568 │ │ │ │ +569 template< int dim > │ │ │ │ +_5_7_0 inline bool _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_h_a_s_L_e_a_f_N_e_i_g_h_b_o_r ( const int face ) const │ │ │ │ +571 { │ │ │ │ +572 assert( !!(*this) ); │ │ │ │ +573 assert( (face >= 0) && (face < maxNeighbors) ); │ │ │ │ +574 │ │ │ │ +575 assert( (elInfo().fill_flag & _F_i_l_l_F_l_a_g_s_:_:_b_o_u_n_d_a_r_y_I_d) != 0 ); │ │ │ │ +576 const int macroFace = elInfo().macro_wall[ face ]; │ │ │ │ +577 if( macroFace >= 0 ) │ │ │ │ +578 return (macroElement().neighbor( macroFace ) != NULL); │ │ │ │ +579 else │ │ │ │ +580 return true; │ │ │ │ +581 } │ │ │ │ +582 │ │ │ │ +583 │ │ │ │ +584 template< int dim > │ │ │ │ +_5_8_5 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_l_e_a_f_N_e_i_g_h_b_o_r ( const int face │ │ │ │ +) const │ │ │ │ +586 { │ │ │ │ +587 assert( (face >= 0) && (face < numFaces) ); │ │ │ │ +588 _E_l_e_m_e_n_t_I_n_f_o neighbor; │ │ │ │ +589 Library< dimWorld >::leafNeighbor( *this, face, neighbor ); │ │ │ │ +590 return neighbor; │ │ │ │ +591 } │ │ │ │ +592 │ │ │ │ +593 │ │ │ │ +594 template< int dim > │ │ │ │ +595 inline int _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> │ │ │ │ +_5_9_6_ _:_:_l_e_v_e_l_N_e_i_g_h_b_o_r_s ( const int face, _E_l_e_m_e_n_t_I_n_f_o (&neighbor) │ │ │ │ +[ maxLevelNeighbors ], int (&faceInNeighbor)[ maxLevelNeighbors ] ) const │ │ │ │ +597 { │ │ │ │ +598 assert( (face >= 0) && (face < numFaces) ); │ │ │ │ +599 return Library< dimWorld >::levelNeighbors( *this, face, neighbor, │ │ │ │ +faceInNeighbor ); │ │ │ │ +600 } │ │ │ │ +601 │ │ │ │ +602 │ │ │ │ +603 template< int dim > │ │ │ │ +604 template< int codim > │ │ │ │ +_6_0_5 inline int _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_t_w_i_s_t ( int subEntity ) const │ │ │ │ +606 { │ │ │ │ +607 return _T_w_i_s_t_<_ _d_i_m_,_ _d_i_m_-_c_o_d_i_m_ _>_:_:_t_w_i_s_t( element(), subEntity ); │ │ │ │ +608 } │ │ │ │ +609 │ │ │ │ +610 │ │ │ │ +611 template< int dim > │ │ │ │ +_6_1_2 inline int _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_t_w_i_s_t_I_n_N_e_i_g_h_b_o_r ( const int face ) const │ │ │ │ +613 { │ │ │ │ +614 assert( neighbor( face ) != NULL ); │ │ │ │ +615 return _T_w_i_s_t_<_ _d_i_m_,_ _d_i_m_-_1_ _>_:_:_t_w_i_s_t( neighbor( face ), elInfo().opp_vertex │ │ │ │ +[ face ] ); │ │ │ │ +616 } │ │ │ │ +617 │ │ │ │ +618 │ │ │ │ +619 template< int dim > │ │ │ │ +_6_2_0 inline bool _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_i_s_B_o_u_n_d_a_r_y ( int face ) const │ │ │ │ +621 { │ │ │ │ +622 assert( !!(*this) ); │ │ │ │ +623 assert( (face >= 0) && (face < maxNeighbors) ); │ │ │ │ +624 │ │ │ │ +625 assert( (elInfo().fill_flag & _F_i_l_l_F_l_a_g_s_:_:_b_o_u_n_d_a_r_y_I_d) != 0 ); │ │ │ │ +626 const int macroFace = elInfo().macro_wall[ face ]; │ │ │ │ +627 if( macroFace >= 0 ) │ │ │ │ +628 return macroElement().isBoundary( macroFace ); │ │ │ │ +629 else │ │ │ │ +630 return false; │ │ │ │ +631 } │ │ │ │ +632 │ │ │ │ +633 │ │ │ │ +634 template< int dim > │ │ │ │ +_6_3_5 inline int _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_b_o_u_n_d_a_r_y_I_d ( int face ) const │ │ │ │ +636 { │ │ │ │ +637 assert( !!(*this) ); │ │ │ │ +638 assert( (face >= 0) && (face < N_WALLS_MAX) ); │ │ │ │ +639 │ │ │ │ +640 assert( (elInfo().fill_flag & _F_i_l_l_F_l_a_g_s_:_:_b_o_u_n_d_a_r_y_I_d) != 0 ); │ │ │ │ +641 const int macroFace = elInfo().macro_wall[ face ]; │ │ │ │ +642 const int id = macroElement().boundaryId( macroFace ); │ │ │ │ +643 // this assertion is only allowed, if FILL_BOUND is set │ │ │ │ +644 // assert( id == elInfo().wall_bound[ face ] ); │ │ │ │ +645 return id; │ │ │ │ +646 } │ │ │ │ +647 │ │ │ │ +648 │ │ │ │ +649 template< int dim > │ │ │ │ +650 inline _A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n * │ │ │ │ +_6_5_1 _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_t_r_a_n_s_f_o_r_m_a_t_i_o_n ( int face ) const │ │ │ │ +652 { │ │ │ │ +653 assert( !!(*this) ); │ │ │ │ +654 assert( (face >= 0) && (face < N_WALLS_MAX) ); │ │ │ │ +655 │ │ │ │ +656 assert( (elInfo().fill_flag & _F_i_l_l_F_l_a_g_s_:_:_b_o_u_n_d_a_r_y_I_d) != 0 ); │ │ │ │ +657 const int macroFace = elInfo().macro_wall[ face ]; │ │ │ │ +658 return (macroFace < 0 ? NULL : macroElement().wall_trafo[ macroFace ]); │ │ │ │ +659 } │ │ │ │ +660 │ │ │ │ +661 │ │ │ │ +662 template< int dim > │ │ │ │ +663 inline _B_a_s_i_c_N_o_d_e_P_r_o_j_e_c_t_i_o_n * │ │ │ │ +_6_6_4 _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_b_o_u_n_d_a_r_y_P_r_o_j_e_c_t_i_o_n ( int face ) const │ │ │ │ +665 { │ │ │ │ +666 assert( !!(*this) ); │ │ │ │ +667 assert( (face >= 0) && (face < N_WALLS_MAX) ); │ │ │ │ +668 │ │ │ │ +669 assert( (elInfo().fill_flag & _F_i_l_l_F_l_a_g_s_:_:_b_o_u_n_d_a_r_y_I_d) != 0 ); │ │ │ │ +670 const int macroFace = elInfo().macro_wall[ face ]; │ │ │ │ +671 if( macroFace >= 0 ) │ │ │ │ +672 return static_cast< _B_a_s_i_c_N_o_d_e_P_r_o_j_e_c_t_i_o_n * >( macroElement().projection │ │ │ │ +[ macroFace+1 ] ); │ │ │ │ +673 else │ │ │ │ +674 return 0; │ │ │ │ +675 } │ │ │ │ +676 │ │ │ │ +677 │ │ │ │ +678 template< int dim > │ │ │ │ +_6_7_9 inline bool _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_h_a_s_C_o_o_r_d_i_n_a_t_e_s () const │ │ │ │ +680 { │ │ │ │ +681 return ((elInfo().fill_flag & _F_i_l_l_F_l_a_g_s_:_:_c_o_o_r_d_s) != 0); │ │ │ │ +682 } │ │ │ │ +683 │ │ │ │ +684 template< int dim > │ │ │ │ +_6_8_5 inline const _G_l_o_b_a_l_V_e_c_t_o_r &_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_c_o_o_r_d_i_n_a_t_e ( int vertex ) │ │ │ │ +const │ │ │ │ +686 { │ │ │ │ +687 assert( hasCoordinates() ); │ │ │ │ +688 assert( (vertex >= 0) && (vertex < numVertices) ); │ │ │ │ +689 return elInfo().coord[ vertex ]; │ │ │ │ +690 } │ │ │ │ +691 │ │ │ │ +692 │ │ │ │ +693 template< int dim > │ │ │ │ +694 template< class Functor > │ │ │ │ +_6_9_5 inline void _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_h_i_e_r_a_r_c_h_i_c_T_r_a_v_e_r_s_e ( Functor &functor ) │ │ │ │ +const │ │ │ │ +696 { │ │ │ │ +697 functor( *this ); │ │ │ │ +698 if( !isLeaf() ) │ │ │ │ +699 { │ │ │ │ +700 child( 0 ).hierarchicTraverse( functor ); │ │ │ │ +701 child( 1 ).hierarchicTraverse( functor ); │ │ │ │ +702 } │ │ │ │ +703 } │ │ │ │ +704 │ │ │ │ +705 │ │ │ │ +706 template< int dim > │ │ │ │ +707 template< class Functor > │ │ │ │ +_7_0_8 inline void _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_l_e_a_f_T_r_a_v_e_r_s_e ( Functor &functor ) const │ │ │ │ +709 { │ │ │ │ +710 if( !isLeaf() ) │ │ │ │ +711 { │ │ │ │ +712 child( 0 ).leafTraverse( functor ); │ │ │ │ +713 child( 1 ).leafTraverse( functor ); │ │ │ │ +714 } │ │ │ │ +715 else │ │ │ │ +716 functor( *this ); │ │ │ │ +717 } │ │ │ │ +718 │ │ │ │ +719 │ │ │ │ +720 template< int dim > │ │ │ │ +_7_2_1 inline const _E_l_e_m_e_n_t *_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_e_l_e_m_e_n_t () const │ │ │ │ +722 { │ │ │ │ +723 return elInfo().el; │ │ │ │ +724 } │ │ │ │ +725 │ │ │ │ +726 │ │ │ │ +727 template< int dim > │ │ │ │ +_7_2_8 inline const _E_l_e_m_e_n_t *_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_n_e_i_g_h_b_o_r ( int face ) const │ │ │ │ +729 { │ │ │ │ +730 assert( (face >= 0) && (face < numFaces) ); │ │ │ │ +731 assert( (elInfo().fill_flag & _F_i_l_l_F_l_a_g_s_:_:_n_e_i_g_h_b_o_r) != 0 ); │ │ │ │ +732 return elInfo().neigh[ face ]; │ │ │ │ +733 } │ │ │ │ +734 │ │ │ │ +735 │ │ │ │ +736 template< int dim > │ │ │ │ +_7_3_7 inline _E_l_e_m_e_n_t *_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_e_l () const │ │ │ │ +738 { │ │ │ │ +739 return elInfo().el; │ │ │ │ +740 } │ │ │ │ +741 │ │ │ │ +742 │ │ │ │ +743 template< int dim > │ │ │ │ +_7_4_4 inline _A_L_B_E_R_T_A EL_INFO &_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_e_l_I_n_f_o () const │ │ │ │ +745 { │ │ │ │ +746 return (instance_->elInfo); │ │ │ │ +747 } │ │ │ │ +748 │ │ │ │ +749 │ │ │ │ +750 template< int dim > │ │ │ │ +751 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> │ │ │ │ +_7_5_2 _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_c_r_e_a_t_e_F_a_k_e ( const _M_e_s_h_P_o_i_n_t_e_r &mesh, │ │ │ │ +753 const _E_l_e_m_e_n_t *element, int level, int type ) │ │ │ │ +754 { │ │ │ │ +755 _I_n_s_t_a_n_c_e_P_t_r instance = stack().allocate(); │ │ │ │ +756 instance->_p_a_r_e_n_t() = null(); │ │ │ │ +757 ++(instance->_p_a_r_e_n_t()->_r_e_f_C_o_u_n_t); │ │ │ │ +758 │ │ │ │ +759 instance->_e_l_I_n_f_o.mesh = mesh; │ │ │ │ +760 instance->_e_l_I_n_f_o.macro_el = NULL; │ │ │ │ +761 instance->_e_l_I_n_f_o.el = const_cast< _E_l_e_m_e_n_t * >( element ); │ │ │ │ +762 instance->_e_l_I_n_f_o.parent = NULL; │ │ │ │ +763 instance->_e_l_I_n_f_o.fill_flag = _F_i_l_l_F_l_a_g_s_:_:_n_o_t_h_i_n_g; │ │ │ │ +764 instance->_e_l_I_n_f_o.level = level; │ │ │ │ +765 instance->_e_l_I_n_f_o.el_type = type; │ │ │ │ +766 │ │ │ │ +767 return _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>( instance ); │ │ │ │ +768 } │ │ │ │ +769 │ │ │ │ +770 │ │ │ │ +771 template< int dim > │ │ │ │ +772 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> │ │ │ │ +_7_7_3 _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_c_r_e_a_t_e_F_a_k_e ( const _A_L_B_E_R_T_A EL_INFO &elInfo ) │ │ │ │ +774 { │ │ │ │ +775 _I_n_s_t_a_n_c_e_P_t_r instance = stack().allocate(); │ │ │ │ +776 instance->_p_a_r_e_n_t() = null(); │ │ │ │ +777 ++(instance->_p_a_r_e_n_t()->_r_e_f_C_o_u_n_t); │ │ │ │ +778 │ │ │ │ +779 instance->_e_l_I_n_f_o = elInfo; │ │ │ │ +780 return _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>( instance ); │ │ │ │ +781 } │ │ │ │ +782 │ │ │ │ +783 │ │ │ │ +784 template< int dim > │ │ │ │ +785 inline bool _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_i_s_L_e_a_f ( _E_l_e_m_e_n_t *element ) │ │ │ │ +786 { │ │ │ │ +787 return IS_LEAF_EL( element ); │ │ │ │ +788 } │ │ │ │ +789 │ │ │ │ +790 │ │ │ │ +791 template< int dim > │ │ │ │ +792 inline bool _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_m_i_g_h_t_V_a_n_i_s_h ( _A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t *element, │ │ │ │ +int depth ) │ │ │ │ +793 { │ │ │ │ +794 if( isLeaf( element ) ) │ │ │ │ +795 return (element->mark < depth); │ │ │ │ +796 else │ │ │ │ +797 return (mightVanish( element->child[ 0 ], depth-1 ) && mightVanish │ │ │ │ +( element->child[ 1 ], depth-1 )); │ │ │ │ +798 } │ │ │ │ +799 │ │ │ │ +800 │ │ │ │ +801 template< int dim > │ │ │ │ +802 inline void ElementInfo< dim > │ │ │ │ +803 ::fill ( _M_e_s_h *mesh, const _A_L_B_E_R_T_A MACRO_EL *mel, _A_L_B_E_R_T_A EL_INFO &elInfo ) │ │ │ │ +804 { │ │ │ │ +805 _A_L_B_E_R_T_A fill_macro_info( mesh, mel, &elInfo ); │ │ │ │ +806 } │ │ │ │ +807 │ │ │ │ +808 template< int dim > │ │ │ │ +809 inline void ElementInfo< dim > │ │ │ │ +810 ::fill ( int ichild, const _A_L_B_E_R_T_A EL_INFO &parentInfo, _A_L_B_E_R_T_A EL_INFO │ │ │ │ +&elInfo ) │ │ │ │ +811 { │ │ │ │ +812 _A_L_B_E_R_T_A fill_elinfo( ichild, FILL_ANY, &parentInfo, &elInfo ); │ │ │ │ +813 } │ │ │ │ +814 │ │ │ │ +815 │ │ │ │ +816 template< int dim > │ │ │ │ +817 inline void ElementInfo< dim >::addReference () const │ │ │ │ +818 { │ │ │ │ +819 ++(instance_->refCount); │ │ │ │ +820 } │ │ │ │ +821 │ │ │ │ +822 │ │ │ │ +823 template< int dim > │ │ │ │ +824 inline void ElementInfo< dim >::removeReference () const │ │ │ │ +825 { │ │ │ │ +826 // short-circuit for rvalues that have been drained as argument to a move │ │ │ │ +operation │ │ │ │ +827 if ( !instance_ ) │ │ │ │ +828 return; │ │ │ │ +829 // this loop breaks when instance becomes null() │ │ │ │ +830 for( InstancePtr instance = instance_; --(instance->refCount) == 0; ) │ │ │ │ +831 { │ │ │ │ +832 const InstancePtr parent = instance->parent(); │ │ │ │ +833 stack().release( instance ); │ │ │ │ +834 instance = parent; │ │ │ │ +835 } │ │ │ │ +836 } │ │ │ │ +837 │ │ │ │ +838 │ │ │ │ +839 template< int dim > │ │ │ │ +840 inline typename ElementInfo< dim >::InstancePtr │ │ │ │ +841 ElementInfo< dim >::null () │ │ │ │ +842 { │ │ │ │ +843 return stack().null(); │ │ │ │ +844 } │ │ │ │ +845 │ │ │ │ +846 │ │ │ │ +847 template< int dim > │ │ │ │ +848 inline typename ElementInfo< dim >::Stack & │ │ │ │ +849 ElementInfo< dim >::stack () │ │ │ │ +850 { │ │ │ │ +851 static Stack s; │ │ │ │ +852 return s; │ │ │ │ +853 } │ │ │ │ +854 │ │ │ │ +855 │ │ │ │ +856 │ │ │ │ +857 // Implementation of ElementInfo::Stack │ │ │ │ +858 // ------------------------------------ │ │ │ │ +859 │ │ │ │ +860 template< int dim > │ │ │ │ +_8_6_1 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_S_t_a_c_k_:_:_S_t_a_c_k () │ │ │ │ +862 : top_( 0 ) │ │ │ │ +863 { │ │ │ │ +864 null_._e_l_I_n_f_o.el = NULL; │ │ │ │ +865 null_._r_e_f_C_o_u_n_t = 1; │ │ │ │ +866 null_._p_a_r_e_n_t() = 0; │ │ │ │ +867 } │ │ │ │ +868 │ │ │ │ +869 │ │ │ │ +870 template< int dim > │ │ │ │ +_8_7_1 inline _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_S_t_a_c_k_:_:_~_S_t_a_c_k () │ │ │ │ +872 { │ │ │ │ +873 while( top_ != 0 ) │ │ │ │ +874 { │ │ │ │ +875 _I_n_s_t_a_n_c_e_P_t_r p = top_; │ │ │ │ +876 top_ = p->_p_a_r_e_n_t(); │ │ │ │ +877 delete p; │ │ │ │ +878 } │ │ │ │ +879 } │ │ │ │ +880 │ │ │ │ +881 │ │ │ │ +882 template< int dim > │ │ │ │ +883 inline typename _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_I_n_s_t_a_n_c_e_P_t_r │ │ │ │ +_8_8_4 _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_S_t_a_c_k_:_:_a_l_l_o_c_a_t_e () │ │ │ │ +885 { │ │ │ │ +886 _I_n_s_t_a_n_c_e_P_t_r p = top_; │ │ │ │ +887 if( p != 0 ) │ │ │ │ +888 top_ = p->_p_a_r_e_n_t(); │ │ │ │ +889 else │ │ │ │ +890 p = new _I_n_s_t_a_n_c_e; │ │ │ │ +891 p->_r_e_f_C_o_u_n_t = 0; │ │ │ │ +892 return p; │ │ │ │ +893 } │ │ │ │ +894 │ │ │ │ +895 │ │ │ │ +896 template< int dim > │ │ │ │ +_8_9_7 inline void _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_S_t_a_c_k_:_:_r_e_l_e_a_s_e ( _I_n_s_t_a_n_c_e_P_t_r &p ) │ │ │ │ +898 { │ │ │ │ +899 assert( (p != null()) && (p->_r_e_f_C_o_u_n_t == 0) ); │ │ │ │ +900 p->_p_a_r_e_n_t() = top_; │ │ │ │ +901 top_ = p; │ │ │ │ +902 } │ │ │ │ +903 │ │ │ │ +904 │ │ │ │ +905 template< int dim > │ │ │ │ +906 inline typename _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_I_n_s_t_a_n_c_e_P_t_r │ │ │ │ +_9_0_7 _E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_S_t_a_c_k_:_:_n_u_l_l () │ │ │ │ +908 { │ │ │ │ +909 return &null_; │ │ │ │ +910 } │ │ │ │ +911 │ │ │ │ +912 } // namespace Alberta │ │ │ │ +913 │ │ │ │ +914} // namespace Dune │ │ │ │ +915 │ │ │ │ +916#endif // #if HAVE_ALBERTA │ │ │ │ +917 │ │ │ │ +918#endif // #ifndef DUNE_ALBERTA_ELEMENTINFO_HH │ │ │ │ +_g_e_o_m_e_t_r_y_c_a_c_h_e_._h_h │ │ │ │ +_A_L_B_E_R_T_A │ │ │ │ +#define ALBERTA │ │ │ │ +DDeeffiinniittiioonn albertaheader.hh:29 │ │ │ │ +_m_a_c_r_o_e_l_e_m_e_n_t_._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_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ -DDeeffiinniittiioonn hierarchiciterator.hh:29 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_d_e_r_e_f_e_r_e_n_c_e │ │ │ │ -Entity & dereference() const │ │ │ │ -dereferencing │ │ │ │ -DDeeffiinniittiioonn hierarchiciterator.hh:68 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_E_n_t_i_t_y │ │ │ │ -GridImp::template Codim< 0 >::Entity Entity │ │ │ │ -DDeeffiinniittiioonn hierarchiciterator.hh:33 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_g_r_i_d │ │ │ │ -const GridImp & grid() const │ │ │ │ -obtain a reference to the grid │ │ │ │ -DDeeffiinniittiioonn hierarchiciterator.hh:81 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ -EntityImp::ElementInfo ElementInfo │ │ │ │ -DDeeffiinniittiioonn hierarchiciterator.hh:39 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_l_e_v_e_l │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h │ │ │ │ +ALBERTA MESH Mesh │ │ │ │ +DDeeffiinniittiioonn misc.hh:53 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ +ALBERTA AFF_TRAFO AffineTransformation │ │ │ │ +DDeeffiinniittiioonn misc.hh:52 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t │ │ │ │ +ALBERTA EL Element │ │ │ │ +DDeeffiinniittiioonn misc.hh:54 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r │ │ │ │ +ALBERTA REAL_D GlobalVector │ │ │ │ +DDeeffiinniittiioonn misc.hh:50 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h_P_o_i_n_t_e_r_<_ _d_i_m_e_n_s_i_o_n_ _> │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:43 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_l_e_a_f_N_e_i_g_h_b_o_r │ │ │ │ +ElementInfo leafNeighbor(const int face) const │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:585 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_i_s_L_e_a_f │ │ │ │ +bool isLeaf() const │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:488 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_c_r_e_a_t_e_F_a_k_e │ │ │ │ +static ElementInfo createFake(const MeshPointer &mesh, const Element *element, │ │ │ │ +int level, int type=0) │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:752 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_c_h_i_l_d │ │ │ │ +ElementInfo child(int i) const │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:470 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_l_e_v_e_l │ │ │ │ int level() const │ │ │ │ -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 │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:533 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_m_i_g_h_t_V_a_n_i_s_h │ │ │ │ +bool mightVanish() const │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:526 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_n_u_m_F_a_c_e_s │ │ │ │ +static const int numFaces │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:56 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_t_w_i_s_t │ │ │ │ +int twist(int subEntity) const │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:605 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_t_w_i_s_t_I_n_N_e_i_g_h_b_o_r │ │ │ │ +int twistInNeighbor(int face) const │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:612 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_M_a_c_r_o_E_l_e_m_e_n_t │ │ │ │ +Alberta::MacroElement< dimension > MacroElement │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:58 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_b_o_u_n_d_a_r_y_P_r_o_j_e_c_t_i_o_n │ │ │ │ +BasicNodeProjection * boundaryProjection(int face) const │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:664 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_m_a_c_r_o_E_l_e_m_e_n_t │ │ │ │ +const MacroElement & macroElement() const │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:440 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_m_a_x_L_e_v_e_l_N_e_i_g_h_b_o_r_s │ │ │ │ +static const int maxLevelNeighbors │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:64 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_f_a_t_h_e_r │ │ │ │ +ElementInfo father() const │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:449 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ +ElementInfo(const ElementInfo &other) │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:382 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e │ │ │ │ +GeometryCacheProxy< dim > GeometryCache │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:67 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ +ElementInfo & operator=(const ElementInfo &other) │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:405 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_h_a_s_L_e_a_f_N_e_i_g_h_b_o_r │ │ │ │ +bool hasLeafNeighbor(const int face) const │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:570 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_o_p_e_r_a_t_o_r_=_= │ │ │ │ +bool operator==(const ElementInfo &other) const │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:424 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ +static const int dimension │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:53 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_h_i_e_r_a_r_c_h_i_c_T_r_a_v_e_r_s_e │ │ │ │ +void hierarchicTraverse(Functor &functor) const │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:695 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_t_y_p_e │ │ │ │ +int type() const │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:540 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_m_a_x_N_e_i_g_h_b_o_r_s │ │ │ │ +static const int maxNeighbors │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:62 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_s_e_t_M_a_r_k │ │ │ │ +void setMark(int refCount) const │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:561 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_~_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ +~ElementInfo() │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:397 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_c_o_o_r_d_i_n_a_t_e │ │ │ │ +const GlobalVector & coordinate(int vertex) const │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:685 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_n_u_m_V_e_r_t_i_c_e_s │ │ │ │ +static const int numVertices │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:55 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_g_e_t_M_a_r_k │ │ │ │ +int getMark() const │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:554 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_l_e_a_f_T_r_a_v_e_r_s_e │ │ │ │ +void leafTraverse(Functor &functor) const │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:708 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_M_e_s_h_P_o_i_n_t_e_r │ │ │ │ +Alberta::MeshPointer< dimension > MeshPointer │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:59 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_n_e_i_g_h_b_o_r │ │ │ │ +const Element * neighbor(int face) const │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:728 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_c_r_e_a_t_e_F_a_k_e │ │ │ │ +static ElementInfo createFake(const ALBERTA EL_INFO &elInfo) │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:773 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ +ElementInfo() │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:310 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_b_o_u_n_d_a_r_y_I_d │ │ │ │ +int boundaryId(int face) const │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:635 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_o_p_e_r_a_t_o_r_!_= │ │ │ │ +bool operator!=(const ElementInfo &other) const │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:432 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_F_i_l_l_F_l_a_g_s │ │ │ │ +Alberta::FillFlags< dimension > FillFlags │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:60 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ +ElementInfo(const MeshPointer &mesh, const MacroElement ¯oElement, typename │ │ │ │ +FillFlags::Flags fillFlags=FillFlags::standard) │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:319 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_t_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ +AffineTransformation * transformation(int face) const │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:651 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_i_s_B_o_u_n_d_a_r_y │ │ │ │ +bool isBoundary(int face) const │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:620 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_i_n_d_e_x_I_n_F_a_t_h_e_r │ │ │ │ +int indexInFather() const │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:457 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_s_e_e_d │ │ │ │ +Seed seed() const │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:496 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_e_l │ │ │ │ +Element * el() const │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:737 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_e_l_e_m_e_n_t │ │ │ │ +const Element * element() const │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:721 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_e_l_I_n_f_o │ │ │ │ +ALBERTA EL_INFO & elInfo() const │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:744 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_m_e_s_h │ │ │ │ +MeshPointer mesh() const │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:519 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_g_e_o_m_e_t_r_y_C_a_c_h_e │ │ │ │ +GeometryCache geometryCache() const │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:140 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_h_a_s_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ +bool hasCoordinates() const │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:679 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_l_e_v_e_l_N_e_i_g_h_b_o_r_s │ │ │ │ +int levelNeighbors(const int face, ElementInfo(&neighbor)[maxLevelNeighbors], │ │ │ │ +int(&faceInNeighbor)[maxLevelNeighbors]) const │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:596 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ +ElementInfo(ElementInfo &&other) │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:389 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ +ElementInfo(const MeshPointer &mesh, const Seed &seed, typename FillFlags:: │ │ │ │ +Flags fillFlags=FillFlags::standard) │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:340 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_I_n_s_t_a_n_c_e │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:185 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_I_n_s_t_a_n_c_e_:_:_p_a_r_e_n_t │ │ │ │ +InstancePtr & parent() │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:189 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_I_n_s_t_a_n_c_e_:_:_g_e_o_m_e_t_r_y_C_a_c_h_e │ │ │ │ +Alberta::GeometryCache< dim > geometryCache │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:199 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_I_n_s_t_a_n_c_e_:_:_e_l_I_n_f_o │ │ │ │ +ALBERTA EL_INFO elInfo │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:186 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_I_n_s_t_a_n_c_e_:_:_r_e_f_C_o_u_n_t │ │ │ │ +unsigned int refCount │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:187 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_S_t_a_c_k │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:210 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_S_t_a_c_k_:_:_n_u_l_l │ │ │ │ +InstancePtr null() │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:907 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_S_t_a_c_k_:_:_~_S_t_a_c_k │ │ │ │ +~Stack() │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:871 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_S_t_a_c_k_:_:_r_e_l_e_a_s_e │ │ │ │ +void release(InstancePtr &p) │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:897 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_S_t_a_c_k_:_:_S_t_a_c_k │ │ │ │ +Stack() │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:861 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_S_t_a_c_k_:_:_a_l_l_o_c_a_t_e │ │ │ │ +InstancePtr allocate() │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:884 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_S_e_e_d │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:255 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_S_e_e_d_:_:_S_e_e_d │ │ │ │ +Seed(const int macroIndex, const int level, const unsigned long path) │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:260 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_S_e_e_d_:_:_S_e_e_d │ │ │ │ +Seed() │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:256 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_S_e_e_d_:_:_l_e_v_e_l │ │ │ │ +int level() const │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:287 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_S_e_e_d_:_:_i_s_V_a_l_i_d │ │ │ │ +bool isValid() const │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:284 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_S_e_e_d_:_:_p_a_t_h │ │ │ │ +unsigned long path() const │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:288 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_:_:_S_e_e_d_:_:_m_a_c_r_o_I_n_d_e_x │ │ │ │ +int macroIndex() const │ │ │ │ +DDeeffiinniittiioonn elementinfo.hh:286 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e │ │ │ │ +DDeeffiinniittiioonn geometrycache.hh:24 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_C_a_c_h_e_P_r_o_x_y │ │ │ │ +DDeeffiinniittiioonn geometrycache.hh:91 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_E_l_e_m_e_n_t │ │ │ │ +DDeeffiinniittiioonn macroelement.hh:24 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_N_u_m_S_u_b_E_n_t_i_t_i_e_s │ │ │ │ +DDeeffiinniittiioonn misc.hh:148 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s │ │ │ │ +DDeeffiinniittiioonn misc.hh:231 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_n_o_t_h_i_n_g │ │ │ │ +static const Flags nothing │ │ │ │ +DDeeffiinniittiioonn misc.hh:234 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_b_o_u_n_d_a_r_y_I_d │ │ │ │ +static const Flags boundaryId │ │ │ │ +DDeeffiinniittiioonn misc.hh:246 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_F_l_a_g_s │ │ │ │ +ALBERTA FLAGS Flags │ │ │ │ +DDeeffiinniittiioonn misc.hh:232 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_c_o_o_r_d_s │ │ │ │ +static const Flags coords │ │ │ │ +DDeeffiinniittiioonn misc.hh:236 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_s_t_a_n_d_a_r_d │ │ │ │ +static const Flags standard │ │ │ │ +DDeeffiinniittiioonn misc.hh:258 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_i_l_l_F_l_a_g_s_:_:_n_e_i_g_h_b_o_r │ │ │ │ +static const Flags neighbor │ │ │ │ +DDeeffiinniittiioonn misc.hh:238 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_T_w_i_s_t_:_:_t_w_i_s_t │ │ │ │ +static int twist(const Element *element, int subEntity) │ │ │ │ +DDeeffiinniittiioonn misc.hh:538 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_B_a_s_i_c_N_o_d_e_P_r_o_j_e_c_t_i_o_n │ │ │ │ +DDeeffiinniittiioonn albertagrid/projection.hh:208 │ │ │ │ =============================================================================== │ │ │ │ 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: geometryreference.hh File Reference │ │ │ +dune-grid: indexstack.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,41 +72,41 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
geometryreference.hh File Reference
│ │ │ +
indexstack.hh File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

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

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

│ │ │ -
#include <dune/common/typetraits.hh>
│ │ │ -#include <dune/geometry/type.hh>
│ │ │ -#include <dune/grid/common/geometry.hh>
│ │ │ +
#include <assert.h>
│ │ │ +#include <stack>
│ │ │ +#include <dune/common/exceptions.hh>
│ │ │ +#include <dune/common/reservedvector.hh>
│ │ │
│ │ │

Go to the source code of this file.

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

│ │ │ Classes

class  Dune::GeometryReference< Implementation >
 
class  Dune::LocalGeometryReference< mydim, cdim, Grid >
class  Dune::IndexStack< T, length >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │

Detailed Description

│ │ │ -

Wrapper and interface classes for element geometries.

│ │ │ +

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

│ │ │ +
Author
Robert Kloefkorn
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -2,26 +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 │ │ │ │ -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> │ │ │ │ +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_:_:_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_<_ _I_m_p_l_e_m_e_n_t_a_t_i_o_n_ _> │ │ │ │ -  │ │ │ │ -class   _D_u_n_e_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e_<_ _m_y_d_i_m_,_ _c_d_i_m_,_ _G_r_i_d_ _> │ │ │ │ +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 ********** │ │ │ │ -Wrapper and interface classes for element geometries. │ │ │ │ +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/a00674_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: geometryreference.hh Source File │ │ │ +dune-grid: indexstack.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,225 +74,257 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
geometryreference.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_GRID_ALBERTAGRID_GEOMETRYREFERENCE_HH
│ │ │ -
6#define DUNE_GRID_ALBERTAGRID_GEOMETRYREFERENCE_HH
│ │ │ +
5#ifndef DUNE_ALBERTAGRID_INDEXSTACK_HH
│ │ │ +
6#define DUNE_ALBERTAGRID_INDEXSTACK_HH
│ │ │
7
│ │ │ -
12#include <dune/common/typetraits.hh>
│ │ │ +
8#include <assert.h>
│ │ │ +
9#include <stack>
│ │ │ +
10
│ │ │ +
11#include <dune/common/exceptions.hh>
│ │ │ +
12#include <dune/common/reservedvector.hh>
│ │ │
13
│ │ │ -
14#include <dune/geometry/type.hh>
│ │ │ -
15
│ │ │ - │ │ │ -
17
│ │ │ -
18namespace Dune
│ │ │ -
19{
│ │ │ -
20
│ │ │ -
21 // GeometryReference
│ │ │ -
22 // -----------------
│ │ │ -
23
│ │ │ -
24 template< class Implementation >
│ │ │ +
20namespace Dune {
│ │ │ +
21
│ │ │ +
24 template <class T, int length>
│ │ │
│ │ │ - │ │ │ + │ │ │
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>())});
│ │ │ -
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>())});
│ │ │ +
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 };
│ │ │
50
│ │ │ -
51 using JacobianDefault = decltype(transpose(std::declval<JacobianTransposed>()));
│ │ │ -
52
│ │ │ +
51 typedef MyFiniteStack StackType;
│ │ │ +
52 typedef typename std::stack < StackType * > StackListType;
│ │ │
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 }
│ │ │ +
54 StackListType fullStackList_;
│ │ │ +
55 StackListType emptyStackList_;
│ │ │ +
56
│ │ │ +
57 //typedef typename StackListType::Iterator DListIteratorType;
│ │ │ +
58 StackType * stack_;
│ │ │
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 }
│ │ │ +
60 // current maxIndex
│ │ │ +
61 int maxIndex_;
│ │ │ +
62 public:
│ │ │ +
64 inline IndexStack();
│ │ │
65
│ │ │ -
66 public:
│ │ │ -
67
│ │ │ -
68 using Jacobian = Std::detected_or_t<JacobianDefault, JacobianOfImplementation, Implementation>;
│ │ │ -
69 using JacobianInverse = Std::detected_or_t<JacobianInverseDefault, JacobianInverseOfImplementation, Implementation>;
│ │ │ -
70
│ │ │ -
│ │ │ -
71 explicit GeometryReference ( const Implementation &impl )
│ │ │ -
72 : impl_( &impl )
│ │ │ -
73 {}
│ │ │ -
│ │ │ +
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
│ │ │ -
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 }
│ │ │ -
│ │ │ +
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
│ │ │ -
│ │ │ - │ │ │ -
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 }
│ │ │ +
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
│ │ │ -
│ │ │ - │ │ │ -
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
│ │ │ +
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 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 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,277 +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 │ │ │ │ -geometryreference.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_GRID_ALBERTAGRID_GEOMETRYREFERENCE_HH │ │ │ │ -6#define DUNE_GRID_ALBERTAGRID_GEOMETRYREFERENCE_HH │ │ │ │ +5#ifndef DUNE_ALBERTAGRID_INDEXSTACK_HH │ │ │ │ +6#define DUNE_ALBERTAGRID_INDEXSTACK_HH │ │ │ │ 7 │ │ │ │ -12#include │ │ │ │ +8#include │ │ │ │ +9#include │ │ │ │ +10 │ │ │ │ +11#include │ │ │ │ +12#include │ │ │ │ 13 │ │ │ │ -14#include │ │ │ │ -15 │ │ │ │ -16#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_e_o_m_e_t_r_y_._h_h> │ │ │ │ -17 │ │ │ │ -18namespace _D_u_n_e │ │ │ │ -19{ │ │ │ │ -20 │ │ │ │ -21 // GeometryReference │ │ │ │ -22 // ----------------- │ │ │ │ -23 │ │ │ │ -24 template< class Implementation > │ │ │ │ -_2_5 class _G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e │ │ │ │ +20namespace _D_u_n_e { │ │ │ │ +21 │ │ │ │ +24 template │ │ │ │ +_2_5 class _I_n_d_e_x_S_t_a_c_k │ │ │ │ 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())}); │ │ │ │ -45 │ │ │ │ -46 using JacobianInverseDefault = decltype(transpose(std:: │ │ │ │ -declval())); │ │ │ │ -47 │ │ │ │ -48 template │ │ │ │ -49 using JacobianOfImplementation = decltype(typename Implementation_T:: │ │ │ │ -Jacobian{std::declval().jacobian(std:: │ │ │ │ -declval())}); │ │ │ │ +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 }; │ │ │ │ 50 │ │ │ │ -51 using JacobianDefault = decltype(transpose(std::declval │ │ │ │ -())); │ │ │ │ -52 │ │ │ │ +51 typedef MyFiniteStack StackType; │ │ │ │ +52 typedef typename std::stack < StackType * > StackListType; │ │ │ │ 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 } │ │ │ │ +54 StackListType fullStackList_; │ │ │ │ +55 StackListType emptyStackList_; │ │ │ │ +56 │ │ │ │ +57 //typedef typename StackListType::Iterator DListIteratorType; │ │ │ │ +58 StackType * stack_; │ │ │ │ 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 } │ │ │ │ +60 // current maxIndex │ │ │ │ +61 int maxIndex_; │ │ │ │ +62 public: │ │ │ │ +64 inline _I_n_d_e_x_S_t_a_c_k(); │ │ │ │ 65 │ │ │ │ -66 public: │ │ │ │ -67 │ │ │ │ -_6_8 using _J_a_c_o_b_i_a_n = Std::detected_or_t; │ │ │ │ -_6_9 using _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e = Std::detected_or_t; │ │ │ │ -70 │ │ │ │ -_7_1 explicit _G_e_o_m_e_t_r_y_R_e_f_e_r_e_n_c_e ( const Implementation &_i_m_p_l ) │ │ │ │ -72 : impl_( &_i_m_p_l ) │ │ │ │ -73 {} │ │ │ │ +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_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 } │ │ │ │ +_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 │ │ │ │ -_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 │ │ │ │ +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 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 } │ │ │ │ +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 │ │ │ │ -_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 │ │ │ │ +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_:_:_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_:_:_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/a00677.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: geometrycache.hh File Reference │ │ │ +dune-grid: transformation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,36 +72,32 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
geometrycache.hh File Reference
│ │ │ +
transformation.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <dune/grid/albertagrid/misc.hh>
│ │ │ -#include <dune/grid/albertagrid/algebra.hh>
│ │ │ +
#include <dune/common/fvector.hh>
│ │ │ +#include <dune/grid/albertagrid/misc.hh>
│ │ │
│ │ │

Go to the source code of this file.

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

│ │ │ Classes

class  Dune::Alberta::GeometryCache< dim >
 
struct  Dune::Alberta::GeometryCacheProxy< dim >
class  Dune::AlbertaTransformation
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │

│ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::Alberta
 
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -2,24 +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 │ │ │ │ -geometrycache.hh File Reference │ │ │ │ +transformation.hh File Reference │ │ │ │ +#include │ │ │ │ #include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_i_s_c_._h_h> │ │ │ │ -#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_:_:_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_ _> │ │ │ │ +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 │ │ │ │ -  │ │ │ │ =============================================================================== │ │ │ │ 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: geometrycache.hh Source File │ │ │ +dune-grid: transformation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,187 +74,119 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
geometrycache.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_GEOMETRYCACHE_HH
│ │ │ -
6#define DUNE_ALBERTA_GEOMETRYCACHE_HH
│ │ │ +
5#ifndef DUNE_ALBERTA_TRANSFORMATION_HH
│ │ │ +
6#define DUNE_ALBERTA_TRANSFORMATION_HH
│ │ │
7
│ │ │ - │ │ │ - │ │ │ -
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);
│ │ │ -
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_;
│ │ │ +
8#include <dune/common/fvector.hh>
│ │ │ +
9
│ │ │ + │ │ │ +
11
│ │ │ +
12#if HAVE_ALBERTA
│ │ │ +
13
│ │ │ +
14namespace Dune
│ │ │ +
15{
│ │ │ +
16
│ │ │ +
│ │ │ + │ │ │ +
18 {
│ │ │ + │ │ │ +
20
│ │ │ +
21 public:
│ │ │ + │ │ │ +
23
│ │ │ +
24 static const int dimension = Alberta::dimWorld;
│ │ │ +
25
│ │ │ +
26 typedef FieldVector< ctype, dimension > WorldVector;
│ │ │ +
27
│ │ │ +
28 explicit
│ │ │ +
│ │ │ + │ │ │ +
30 : matrix_( (trafo != NULL ? trafo->M : GlobalSpace::identityMatrix()) ),
│ │ │ +
31 shift_( (trafo != NULL ? trafo->t : GlobalSpace::nullVector()) )
│ │ │ +
32 {}
│ │ │ +
│ │ │ +
33
│ │ │ +
│ │ │ + │ │ │ +
35 const GlobalSpace::Vector &shift )
│ │ │ +
36 : matrix_( matrix ),
│ │ │ +
37 shift_( shift )
│ │ │ +
38 {}
│ │ │ +
│ │ │ +
39
│ │ │ +
│ │ │ +
40 WorldVector evaluate ( const WorldVector &x ) const
│ │ │ +
41 {
│ │ │ + │ │ │ +
43 for( int i = 0; i < dimension; ++i )
│ │ │ +
44 {
│ │ │ +
45 const GlobalSpace::Vector &row = matrix_[ i ];
│ │ │ +
46 y[ i ] = shift_[ i ];
│ │ │ +
47 for( int j = 0; j < dimension; ++j )
│ │ │ +
48 y[ i ] += row[ j ] * x[ j ];
│ │ │ +
49 }
│ │ │ +
50 return y;
│ │ │ +
51 }
│ │ │ +
│ │ │ +
52
│ │ │ +
│ │ │ + │ │ │ +
54 {
│ │ │ +
55 // Note: ALBERTA requires the matrix to be orthogonal
│ │ │ +
56 WorldVector x( ctype( 0 ) );
│ │ │ +
57 for( int i = 0; i < dimension; ++i )
│ │ │ +
58 {
│ │ │ +
59 const GlobalSpace::Vector &row = matrix_[ i ];
│ │ │ +
60 const ctype v = y[ i ] - shift_[ i ];
│ │ │ +
61 for( int j = 0; j < dimension; ++j )
│ │ │ +
62 x[ j ] += row[ j ] * v;
│ │ │
63 }
│ │ │ +
64 return x;
│ │ │ +
65 }
│ │ │
│ │ │ -
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;
│ │ │ -
94
│ │ │ -
│ │ │ -
95 GeometryCacheProxy ( GeometryCache< dim > &geometryCache, const ALBERTA EL_INFO &elInfo )
│ │ │ -
96 : geometryCache_( geometryCache ),
│ │ │ -
97 elInfo_( elInfo )
│ │ │ -
98 {}
│ │ │ -
│ │ │ -
99
│ │ │ -
│ │ │ - │ │ │ -
101 {
│ │ │ -
102 return geometryCache_.integrationElement( elInfo_ );
│ │ │ -
103 }
│ │ │ -
│ │ │ -
104
│ │ │ -
│ │ │ - │ │ │ -
106 {
│ │ │ -
107 return geometryCache_.jacobianTransposed( elInfo_ );
│ │ │ -
108 }
│ │ │ -
│ │ │ -
109
│ │ │ -
│ │ │ - │ │ │ -
111 {
│ │ │ -
112 return geometryCache_.jacobianInverseTransposed( elInfo_ );
│ │ │ -
113 }
│ │ │ -
│ │ │ -
114
│ │ │ -
115 private:
│ │ │ -
116 GeometryCache< dim > &geometryCache_;
│ │ │ -
117 const ALBERTA EL_INFO &elInfo_;
│ │ │ -
118 };
│ │ │ -
│ │ │ -
119
│ │ │ -
120 } // namespace Alberta
│ │ │ -
121
│ │ │ -
122} // namespace Dune
│ │ │ -
123
│ │ │ -
124#endif // #if HAVE_ALBERTA
│ │ │ -
125
│ │ │ -
126#endif // #ifndef DUNE_ALBERTA_GEOMETRYCACHE_HH
│ │ │ - │ │ │ - │ │ │ -
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ +
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
│ │ │ +
ALBERTA AFF_TRAFO AffineTransformation
Definition misc.hh:52
│ │ │
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
│ │ │ +
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,210 +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 │ │ │ │ -geometrycache.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_GEOMETRYCACHE_HH │ │ │ │ -6#define DUNE_ALBERTA_GEOMETRYCACHE_HH │ │ │ │ +5#ifndef DUNE_ALBERTA_TRANSFORMATION_HH │ │ │ │ +6#define DUNE_ALBERTA_TRANSFORMATION_HH │ │ │ │ 7 │ │ │ │ -8#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_i_s_c_._h_h> │ │ │ │ -9#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_a_l_g_e_b_r_a_._h_h> │ │ │ │ -10 │ │ │ │ -11#if HAVE_ALBERTA │ │ │ │ -12 │ │ │ │ -13namespace _D_u_n_e │ │ │ │ -14{ │ │ │ │ -15 │ │ │ │ -16 namespace Alberta │ │ │ │ -17 { │ │ │ │ -18 │ │ │ │ -19 // GeometryCache │ │ │ │ -20 // ------------- │ │ │ │ -21 │ │ │ │ -22 template< int dim > │ │ │ │ -_2_3 class _G_e_o_m_e_t_r_y_C_a_c_h_e │ │ │ │ -24 { │ │ │ │ -25 static const unsigned int flagIntegrationElement = (1 << 0); │ │ │ │ -26 static const unsigned int flagJacobianTransposed = (1 << 1); │ │ │ │ -27 static const unsigned int flagJacobianInverseTransposed = (1 << 2); │ │ │ │ -28 │ │ │ │ -29 public: │ │ │ │ -_3_0 typedef FieldMatrix< Real, dimWorld, dim > _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d; │ │ │ │ -_3_1 typedef FieldMatrix< Real, dim, dimWorld > _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d; │ │ │ │ -32 │ │ │ │ -_3_3 _G_e_o_m_e_t_r_y_C_a_c_h_e () │ │ │ │ -34 : flags_( 0 ) │ │ │ │ -35 {} │ │ │ │ -36 │ │ │ │ -_3_7 const _R_e_a_l &_i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t ( const _A_L_B_E_R_T_A EL_INFO &elInfo ) │ │ │ │ -38 { │ │ │ │ -39 if( (flags_ & flagIntegrationElement) == 0 ) │ │ │ │ -40 { │ │ │ │ -41 integrationElement_ = std::abs( _d_e_t_e_r_m_i_n_a_n_t( _j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d( elInfo ) ) │ │ │ │ -); │ │ │ │ -42 assert( integrationElement_ > 1e-14 ); │ │ │ │ -43 flags_ |= flagIntegrationElement; │ │ │ │ -44 } │ │ │ │ -45 return integrationElement_; │ │ │ │ -46 } │ │ │ │ -47 │ │ │ │ -_4_8 const _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d &_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d ( const _A_L_B_E_R_T_A EL_INFO &elInfo │ │ │ │ -) │ │ │ │ -49 { │ │ │ │ -50 if( (flags_ & flagJacobianTransposed) == 0 ) │ │ │ │ -51 { │ │ │ │ -52 assert( (elInfo.fill_flag & _F_i_l_l_F_l_a_g_s_<_ _d_i_m_ _>_:_:_c_o_o_r_d_s) != 0 ); │ │ │ │ -53 const _G_l_o_b_a_l_V_e_c_t_o_r &x = elInfo.coord[ 0 ]; │ │ │ │ -54 for( int i = 0; i < dim; ++i ) │ │ │ │ -55 { │ │ │ │ -56 const _G_l_o_b_a_l_V_e_c_t_o_r &y = elInfo.coord[ i+1 ]; │ │ │ │ -57 for( int j = 0; j < _d_i_m_W_o_r_l_d; ++j ) │ │ │ │ -58 jacobianTransposed_[ i ][ j ] = y[ j ] - x[ j ]; │ │ │ │ -59 } │ │ │ │ -60 flags_ |= flagJacobianTransposed; │ │ │ │ -61 } │ │ │ │ -62 return jacobianTransposed_; │ │ │ │ +8#include │ │ │ │ +9 │ │ │ │ +10#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_i_s_c_._h_h> │ │ │ │ +11 │ │ │ │ +12#if HAVE_ALBERTA │ │ │ │ +13 │ │ │ │ +14namespace _D_u_n_e │ │ │ │ +15{ │ │ │ │ +16 │ │ │ │ +_1_7 class _A_l_b_e_r_t_a_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ +18 { │ │ │ │ +19 typedef _A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_S_p_a_c_e _G_l_o_b_a_l_S_p_a_c_e; │ │ │ │ +20 │ │ │ │ +21 public: │ │ │ │ +_2_2 typedef _A_l_b_e_r_t_a_:_:_R_e_a_l _c_t_y_p_e; │ │ │ │ +23 │ │ │ │ +_2_4 static const int _d_i_m_e_n_s_i_o_n = _A_l_b_e_r_t_a_:_:_d_i_m_W_o_r_l_d; │ │ │ │ +25 │ │ │ │ +_2_6 typedef FieldVector< ctype, dimension > _W_o_r_l_d_V_e_c_t_o_r; │ │ │ │ +27 │ │ │ │ +28 explicit │ │ │ │ +_2_9 _A_l_b_e_r_t_a_T_r_a_n_s_f_o_r_m_a_t_i_o_n ( const _A_l_b_e_r_t_a_:_:_A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n *trafo = NULL ) │ │ │ │ +30 : matrix_( (trafo != NULL ? trafo->M : _G_l_o_b_a_l_S_p_a_c_e::identityMatrix()) ), │ │ │ │ +31 shift_( (trafo != NULL ? trafo->t : _G_l_o_b_a_l_S_p_a_c_e::nullVector()) ) │ │ │ │ +32 {} │ │ │ │ +33 │ │ │ │ +_3_4 _A_l_b_e_r_t_a_T_r_a_n_s_f_o_r_m_a_t_i_o_n ( const _G_l_o_b_a_l_S_p_a_c_e_:_:_M_a_t_r_i_x &matrix, │ │ │ │ +35 const _G_l_o_b_a_l_S_p_a_c_e_:_:_V_e_c_t_o_r &shift ) │ │ │ │ +36 : matrix_( matrix ), │ │ │ │ +37 shift_( shift ) │ │ │ │ +38 {} │ │ │ │ +39 │ │ │ │ +_4_0 _W_o_r_l_d_V_e_c_t_o_r _e_v_a_l_u_a_t_e ( const _W_o_r_l_d_V_e_c_t_o_r &x ) const │ │ │ │ +41 { │ │ │ │ +42 _W_o_r_l_d_V_e_c_t_o_r y; │ │ │ │ +43 for( int i = 0; i < _d_i_m_e_n_s_i_o_n; ++i ) │ │ │ │ +44 { │ │ │ │ +45 const _G_l_o_b_a_l_S_p_a_c_e_:_:_V_e_c_t_o_r &row = matrix_[ i ]; │ │ │ │ +46 y[ i ] = shift_[ i ]; │ │ │ │ +47 for( int j = 0; j < _d_i_m_e_n_s_i_o_n; ++j ) │ │ │ │ +48 y[ i ] += row[ j ] * x[ j ]; │ │ │ │ +49 } │ │ │ │ +50 return y; │ │ │ │ +51 } │ │ │ │ +52 │ │ │ │ +_5_3 _W_o_r_l_d_V_e_c_t_o_r _e_v_a_l_u_a_t_e_I_n_v_e_r_s_e ( const _W_o_r_l_d_V_e_c_t_o_r &y ) const │ │ │ │ +54 { │ │ │ │ +55 // Note: ALBERTA requires the matrix to be orthogonal │ │ │ │ +56 _W_o_r_l_d_V_e_c_t_o_r x( _c_t_y_p_e( 0 ) ); │ │ │ │ +57 for( int i = 0; i < _d_i_m_e_n_s_i_o_n; ++i ) │ │ │ │ +58 { │ │ │ │ +59 const _G_l_o_b_a_l_S_p_a_c_e_:_:_V_e_c_t_o_r &row = matrix_[ i ]; │ │ │ │ +60 const _c_t_y_p_e v = y[ i ] - shift_[ i ]; │ │ │ │ +61 for( int j = 0; j < _d_i_m_e_n_s_i_o_n; ++j ) │ │ │ │ +62 x[ j ] += row[ j ] * v; │ │ │ │ 63 } │ │ │ │ -64 │ │ │ │ -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; │ │ │ │ -94 │ │ │ │ -_9_5 _G_e_o_m_e_t_r_y_C_a_c_h_e_P_r_o_x_y ( _G_e_o_m_e_t_r_y_C_a_c_h_e_<_ _d_i_m_ _> &geometryCache, const _A_L_B_E_R_T_A │ │ │ │ -EL_INFO &elInfo ) │ │ │ │ -96 : geometryCache_( geometryCache ), │ │ │ │ -97 elInfo_( elInfo ) │ │ │ │ -98 {} │ │ │ │ -99 │ │ │ │ -_1_0_0 const _R_e_a_l &_i_n_t_e_g_r_a_t_i_o_n_E_l_e_m_e_n_t () │ │ │ │ -101 { │ │ │ │ -102 return geometryCache_.integrationElement( elInfo_ ); │ │ │ │ -103 } │ │ │ │ -104 │ │ │ │ -_1_0_5 const _J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d &_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d () │ │ │ │ -106 { │ │ │ │ -107 return geometryCache_.jacobianTransposed( elInfo_ ); │ │ │ │ -108 } │ │ │ │ -109 │ │ │ │ -_1_1_0 const _J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d &_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d () │ │ │ │ -111 { │ │ │ │ -112 return geometryCache_.jacobianInverseTransposed( elInfo_ ); │ │ │ │ -113 } │ │ │ │ -114 │ │ │ │ -115 private: │ │ │ │ -116 _G_e_o_m_e_t_r_y_C_a_c_h_e_<_ _d_i_m_ _> &geometryCache_; │ │ │ │ -117 const _A_L_B_E_R_T_A EL_INFO &elInfo_; │ │ │ │ -118 }; │ │ │ │ -119 │ │ │ │ -120 } // namespace Alberta │ │ │ │ -121 │ │ │ │ -122} // namespace Dune │ │ │ │ -123 │ │ │ │ -124#endif // #if HAVE_ALBERTA │ │ │ │ -125 │ │ │ │ -126#endif // #ifndef DUNE_ALBERTA_GEOMETRYCACHE_HH │ │ │ │ +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 │ │ │ │ -_a_l_g_e_b_r_a_._h_h │ │ │ │ -_A_L_B_E_R_T_A │ │ │ │ -#define ALBERTA │ │ │ │ -DDeeffiinniittiioonn albertaheader.hh:29 │ │ │ │ _D_u_n_e │ │ │ │ Include standard header files. │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_A_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_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_:_:_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/a00680.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: geometry.cc File Reference │ │ │ +dune-grid: undefine-2.0.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -69,60 +69,25 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
│ │ │ -Classes | │ │ │ -Namespaces | │ │ │ -Macros
│ │ │ -
geometry.cc File Reference
│ │ │ +
undefine-2.0.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <dune/grid/albertagrid/algebra.hh>
│ │ │ -#include <dune/grid/albertagrid/geometry.hh>
│ │ │ -#include <dune/grid/albertagrid/refinement.hh>
│ │ │ -
│ │ │ -

Go to the source code of this file.

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

│ │ │ -Classes

struct  Dune::AlbertaGridLocalGeometryProvider< Grid >::GeoInFatherCoordReader< Grid >
 
struct  Dune::AlbertaGridLocalGeometryProvider< Grid >::FaceCoordReader< Grid >
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Namespaces

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

│ │ │ -Macros

#define DUNE_ALBERTA_GEOMETRY_CC
 
│ │ │ -

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ DUNE_ALBERTA_GEOMETRY_CC

│ │ │ │ │ │ -
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
#define DUNE_ALBERTA_GEOMETRY_CC
│ │ │ -
│ │ │ +

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.

│ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,32 +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 | _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> │ │ │ │ +undefine-2.0.hh File Reference │ │ │ │ +Contains #undefs for all preprocessor macros defined by alberta. _M_o_r_e_._._. │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_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_ _> │ │ │ │ -  │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_<_ _G_r_i_d_ _>_:_:_F_a_c_e_C_o_o_r_d_R_e_a_d_e_r_<_ _G_r_i_d │ │ │ │ - _> │ │ │ │ -  │ │ │ │ -NNaammeessppaacceess │ │ │ │ -namespace   _D_u_n_e │ │ │ │ -  Include standard header files. │ │ │ │ -  │ │ │ │ -MMaaccrrooss │ │ │ │ -#define  _D_U_N_E___A_L_B_E_R_T_A___G_E_O_M_E_T_R_Y___C_C │ │ │ │ -  │ │ │ │ -********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ -********** _?◆_? DDUUNNEE__AALLBBEERRTTAA__GGEEOOMMEETTRRYY__CCCC ********** │ │ │ │ -#define DUNE_ALBERTA_GEOMETRY_CC │ │ │ │ +********** 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/a00680_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: geometry.cc Source File │ │ │ +dune-grid: undefine-2.0.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,344 +74,476 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
geometry.cc
│ │ │ +
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_GEOMETRY_CC
│ │ │ -
6#define DUNE_ALBERTA_GEOMETRY_CC
│ │ │ -
7
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
11
│ │ │ -
12namespace Dune
│ │ │ -
13{
│ │ │ -
14
│ │ │ -
15 // AlbertaGridGeometry
│ │ │ -
16 // -------------------
│ │ │ -
17
│ │ │ -
18 // print the GeometryInformation
│ │ │ -
19 template <int mydim, int cdim, class GridImp>
│ │ │ -
│ │ │ -
20 inline void AlbertaGridGeometry<mydim,cdim,GridImp>::print (std::ostream& ss) const
│ │ │ -
21 {
│ │ │ -
22 ss << "AlbertaGridGeometry<" << mydim << "," << cdim << "> = { \n";
│ │ │ -
23 for(int i=0; i<corners(); i++)
│ │ │ -
24 {
│ │ │ -
25 ss << " corner " << i << " = ";
│ │ │ -
26 ss << ((*this)[i]); ss << "\n";
│ │ │ -
27 }
│ │ │ -
28 ss << "} \n";
│ │ │ -
29 }
│ │ │ -
│ │ │ -
30
│ │ │ +
12#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
│ │ │ +
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 template< int mydim, int cdim, class GridImp >
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
35 {
│ │ │ -
36 GlobalCoordinate y = corner( 0 );
│ │ │ -
37 jacobianTransposed().umtv( local, y );
│ │ │ -
38 return y;
│ │ │ -
39 }
│ │ │ -
│ │ │ -
40
│ │ │ -
41
│ │ │ -
42 //local implementation for mydim < cdim
│ │ │ -
43 template< int mydim, int cdim, class GridImp >
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
46 {
│ │ │ - │ │ │ -
48 jacobianInverseTransposed().mtv( global - corner( 0 ), x );
│ │ │ -
49 return x;
│ │ │ -
50 }
│ │ │ -
│ │ │ +
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
│ │ │ -
53 template< int mydim, int cdim, class GridImp >
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
56 {
│ │ │ -
57 if( !builtJT_ )
│ │ │ -
58 {
│ │ │ -
59 const FieldVector< ctype, coorddimension > &origin = coord_[ 0 ];
│ │ │ -
60 for( int i = 0; i < mydimension; ++i )
│ │ │ -
61 {
│ │ │ -
62 jT_[ i ] = coord_[ i+1 ];
│ │ │ -
63 jT_[ i ] -= origin;
│ │ │ -
64 }
│ │ │ -
65 builtJT_ = true;
│ │ │ -
66 }
│ │ │ -
67 return jT_;
│ │ │ -
68 }
│ │ │ -
│ │ │ -
69
│ │ │ -
70
│ │ │ -
71 template< int mydim, int cdim, class GridImp >
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
74 {
│ │ │ -
75 if( !builtJTInv_ )
│ │ │ -
76 {
│ │ │ -
77 elDet_ = std::abs( Alberta::invert( jacobianTransposed(), jTInv_ ) );
│ │ │ -
78 assert( elDet_ > 1.0e-25 );
│ │ │ -
79 calcedDet_ = true;
│ │ │ -
80 builtJTInv_ = true;
│ │ │ -
81 }
│ │ │ -
82 return jTInv_;
│ │ │ -
83 }
│ │ │ -
│ │ │ -
84
│ │ │ -
85
│ │ │ -
86 // built Geometry
│ │ │ -
87 template< int mydim, int cdim, class GridImp >
│ │ │ -
88 template< class CoordReader >
│ │ │ - │ │ │ -
│ │ │ -
90 ::build ( const CoordReader &coordReader )
│ │ │ -
91 {
│ │ │ -
92 builtJT_ = false;
│ │ │ -
93 builtJTInv_ = false;
│ │ │ -
94
│ │ │ -
95 // copy corners
│ │ │ -
96 for( int i = 0; i < numCorners; ++i )
│ │ │ -
97 coordReader.coordinate( i, coord_[ i ] );
│ │ │ -
98
│ │ │ -
99 // calculate centroid
│ │ │ -
100 centroid_ = coord_[ 0 ];
│ │ │ -
101 for( int i = 1; i < numCorners; ++i )
│ │ │ -
102 centroid_ += coord_[ i ];
│ │ │ -
103 centroid_ *= 1.0 / numCorners;
│ │ │ -
104
│ │ │ -
105 elDet_ = (coordReader.hasDeterminant() ? coordReader.determinant() : elDeterminant());
│ │ │ -
106 assert( std::abs( elDet_ ) > 0.0 );
│ │ │ -
107 calcedDet_ = true;
│ │ │ -
108 }
│ │ │ -
│ │ │ -
109
│ │ │ -
110
│ │ │ -
111#if !DUNE_ALBERTA_CACHE_COORDINATES
│ │ │ -
112 template< int dim, int cdim >
│ │ │ - │ │ │ -
114 AlbertaGridGlobalGeometry< dim, cdim, const AlbertaGrid< dim, cdim > >::global ( const LocalCoordinate &local ) const
│ │ │ -
115 {
│ │ │ -
116 GlobalCoordinate y = corner( 0 );
│ │ │ -
117 jacobianTransposed().umtv( local, y );
│ │ │ -
118 return y;
│ │ │ -
119 }
│ │ │ -
120
│ │ │ -
121
│ │ │ -
122 //local implementation for mydim < cdim
│ │ │ -
123 template< int dim, int cdim >
│ │ │ -
124 inline typename AlbertaGridGlobalGeometry< dim, cdim, const AlbertaGrid< dim, cdim > >::LocalCoordinate
│ │ │ -
125 AlbertaGridGlobalGeometry< dim, cdim, const AlbertaGrid< dim, cdim > >::local ( const GlobalCoordinate &global ) const
│ │ │ -
126 {
│ │ │ -
127 LocalCoordinate x;
│ │ │ -
128 jacobianInverseTransposed().mtv( global - corner( 0 ), x );
│ │ │ -
129 return x;
│ │ │ -
130 }
│ │ │ -
131#endif // #if !DUNE_ALBERTA_CACHE_COORDINATES
│ │ │ -
132
│ │ │ -
133
│ │ │ -
134
│ │ │ -
135 // AlbertaGridLocalGeometryProvider
│ │ │ -
136 // --------------------------------
│ │ │ -
137
│ │ │ -
138 template< class Grid >
│ │ │ -
139 void AlbertaGridLocalGeometryProvider< Grid >::buildGeometryInFather ()
│ │ │ -
140 {
│ │ │ -
141 for( int child = 0; child < numChildren; ++child )
│ │ │ -
142 {
│ │ │ -
143 for( int orientation = 0; orientation < 2; ++orientation )
│ │ │ -
144 {
│ │ │ -
145 const GeoInFatherCoordReader coordReader( child, orientation );
│ │ │ -
146 geometryInFather_[ child ][ orientation ] = new LocalElementGeometry( coordReader );
│ │ │ -
147 }
│ │ │ -
148 }
│ │ │ -
149 }
│ │ │ -
150
│ │ │ +
52#ifdef N_VERTICES_0D
│ │ │ +
53 #undef N_VERTICES_0D
│ │ │ +
54#endif // N_VERTICES_0D
│ │ │ +
55
│ │ │ +
56#ifdef N_EDGES_0D
│ │ │ +
57 #undef N_EDGES_0D
│ │ │ +
58#endif // N_EDGES_0D
│ │ │ +
59
│ │ │ +
60#ifdef N_FACES_0D
│ │ │ +
61 #undef N_FACES_0D
│ │ │ +
62#endif // N_FACES_0D
│ │ │ +
63
│ │ │ +
64#ifdef N_NEIGH_0D
│ │ │ +
65 #undef N_NEIGH_0D
│ │ │ +
66#endif // N_NEIGH_0D
│ │ │ +
67
│ │ │ +
68#ifdef N_WALLS_0D
│ │ │ +
69 #undef N_WALLS_0D
│ │ │ +
70#endif // N_WALLS_0D
│ │ │ +
71
│ │ │ +
72#ifdef N_VERTICES_1D
│ │ │ +
73 #undef N_VERTICES_1D
│ │ │ +
74#endif // N_VERTICES_1D
│ │ │ +
75
│ │ │ +
76#ifdef N_EDGES_1D
│ │ │ +
77 #undef N_EDGES_1D
│ │ │ +
78#endif // N_EDGES_1D
│ │ │ +
79
│ │ │ +
80#ifdef N_FACES_1D
│ │ │ +
81 #undef N_FACES_1D
│ │ │ +
82#endif // N_FACES_1D
│ │ │ +
83
│ │ │ +
84#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#ifdef N_NEIGH_2D
│ │ │ +
105 #undef N_NEIGH_2D
│ │ │ +
106#endif // N_NEIGH_2D
│ │ │ +
107
│ │ │ +
108#ifdef N_WALLS_2D
│ │ │ +
109 #undef N_WALLS_2D
│ │ │ +
110#endif // N_WALLS_2D
│ │ │ +
111
│ │ │ +
112#ifdef N_VERTICES_3D
│ │ │ +
113 #undef N_VERTICES_3D
│ │ │ +
114#endif // N_VERTICES_3D
│ │ │ +
115
│ │ │ +
116#ifdef N_EDGES_3D
│ │ │ +
117 #undef N_EDGES_3D
│ │ │ +
118#endif // N_EDGES_3D
│ │ │ +
119
│ │ │ +
120#ifdef N_FACES_3D
│ │ │ +
121 #undef N_FACES_3D
│ │ │ +
122#endif // N_FACES_3D
│ │ │ +
123
│ │ │ +
124#ifdef N_NEIGH_3D
│ │ │ +
125 #undef N_NEIGH_3D
│ │ │ +
126#endif // N_NEIGH_3D
│ │ │ +
127
│ │ │ +
128#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 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:
│ │ │ - │ │ │ +
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 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 }
│ │ │ -
│ │ │ +
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 private:
│ │ │ -
205 const int child_;
│ │ │ -
206 const int orientation_;
│ │ │ -
207 };
│ │ │ -
│ │ │ -
208
│ │ │ -
209
│ │ │ -
210
│ │ │ -
211 // AlbertaGridLocalGeometryProvider::FaceCoordReader
│ │ │ -
212 // -------------------------------------------------
│ │ │ -
213
│ │ │ -
214 template< class Grid >
│ │ │ -
│ │ │ - │ │ │ -
216 {
│ │ │ - │ │ │ -
218
│ │ │ - │ │ │ -
220
│ │ │ -
│ │ │ -
221 FaceCoordReader ( const int face, const int twist = 0 )
│ │ │ -
222 : face_( face ),
│ │ │ -
223 twist_( twist )
│ │ │ -
224 {}
│ │ │ -
│ │ │ -
225
│ │ │ -
│ │ │ -
226 void coordinate ( const int i, Coordinate &x ) const
│ │ │ -
227 {
│ │ │ -
228 const int ti = Alberta::applyInverseTwist< dimension-1 >( twist_, i );
│ │ │ -
229 const int j = mapVertices< 1 >( face_, ti );
│ │ │ -
230 refCorner( j, x );
│ │ │ -
231 }
│ │ │ -
│ │ │ -
232
│ │ │ -
│ │ │ -
233 bool hasDeterminant () const
│ │ │ -
234 {
│ │ │ -
235 return false;
│ │ │ -
236 }
│ │ │ -
│ │ │ -
237
│ │ │ -
│ │ │ - │ │ │ -
239 {
│ │ │ -
240 return ctype( 0 );
│ │ │ -
241 }
│ │ │ -
│ │ │ -
242
│ │ │ -
243 private:
│ │ │ -
244 static void refCorner ( const int i, Coordinate &x )
│ │ │ -
245 {
│ │ │ -
246 x = ctype( 0 );
│ │ │ -
247 if( i > 0 )
│ │ │ -
248 x[ i-1 ] = ctype( 1 );
│ │ │ -
249 }
│ │ │ -
250
│ │ │ -
251 int face_;
│ │ │ -
252 int twist_;
│ │ │ -
253 };
│ │ │ -
│ │ │ -
254
│ │ │ -
255} // namespace Dune
│ │ │ -
256
│ │ │ -
257#endif // #ifndef DUNE_ALBERTA_GEOMETRY_CC
│ │ │ -
provides a wrapper for ALBERTA's refinement patches and the corners for geometryInFather
│ │ │ - │ │ │ -
Include standard header files.
Definition agrid.hh:60
│ │ │ -
int applyInverseTwist(int twist, int i)
Definition misc.hh:637
│ │ │ -
ALBERTA REAL Real
Definition misc.hh:48
│ │ │ -
static K invert(const FieldMatrix< K, 0, m > &matrix, FieldMatrix< K, m, 0 > &inverse)
Definition algebra.hh:81
│ │ │ - │ │ │ -
FieldVector< ctype, dimension > Coordinate
Definition geometry.cc:175
│ │ │ - │ │ │ -
void coordinate(int i, Coordinate &x) const
Definition geometry.cc:186
│ │ │ -
GeoInFatherCoordReader(int child, int orientation)
Definition geometry.cc:181
│ │ │ -
bool hasDeterminant() const
Definition geometry.cc:194
│ │ │ -
ctype determinant() const
Definition geometry.cc:199
│ │ │ - │ │ │ -
FaceCoordReader(const int face, const int twist=0)
Definition geometry.cc:221
│ │ │ -
void coordinate(const int i, Coordinate &x) const
Definition geometry.cc:226
│ │ │ -
ctype determinant() const
Definition geometry.cc:238
│ │ │ -
FieldVector< ctype, dimension > Coordinate
Definition geometry.cc:219
│ │ │ -
bool hasDeterminant() const
Definition geometry.cc:233
│ │ │ -
Alberta::Real ctype
Definition geometry.cc:217
│ │ │ -
geometry implementation for AlbertaGrid
Definition albertagrid/geometry.hh:108
│ │ │ -
const JacobianTransposed & jacobianTransposed() const
transposed of the geometry mapping's Jacobian
Definition geometry.cc:55
│ │ │ -
LocalCoordinate local(const GlobalCoordinate &global) const
map a point from the geometry to the reference element
Definition geometry.cc:45
│ │ │ -
const JacobianInverseTransposed & jacobianInverseTransposed() const
transposed inverse of the geometry mapping's Jacobian
Definition geometry.cc:73
│ │ │ -
FieldVector< ctype, mydimension > LocalCoordinate
Definition albertagrid/geometry.hh:126
│ │ │ -
FieldMatrix< ctype, coorddimension, mydimension > JacobianInverseTransposed
Definition albertagrid/geometry.hh:130
│ │ │ -
void print(std::ostream &out) const
Definition geometry.cc:20
│ │ │ -
GlobalCoordinate global(const LocalCoordinate &local) const
map a point from the reference element to the geometry
Definition geometry.cc:34
│ │ │ -
FieldVector< ctype, coorddimension > GlobalCoordinate
Definition albertagrid/geometry.hh:127
│ │ │ -
FieldMatrix< ctype, mydimension, coorddimension > JacobianTransposed
Definition albertagrid/geometry.hh:129
│ │ │ -
Definition albertagrid/geometry.hh:303
│ │ │ -
Definition albertagrid/geometry.hh:504
│ │ │ -
static constexpr int dimension
Definition albertagrid/geometry.hh:510
│ │ │ -
Grid::ctype ctype
Definition albertagrid/geometry.hh:508
│ │ │ -
Definition albertagrid/geometry.hh:514
│ │ │ -
Definition refinement.hh:292
│ │ │ -
Grid abstract base class.
Definition common/grid.hh:375
│ │ │ - │ │ │ +
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,393 +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 │ │ │ │ -geometry.cc │ │ │ │ +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_GEOMETRY_CC │ │ │ │ -_6#define DUNE_ALBERTA_GEOMETRY_CC │ │ │ │ -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 } │ │ │ │ -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 } │ │ │ │ +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 │ │ │ │ -53 template< int mydim, int cdim, class GridImp > │ │ │ │ -54 inline const typename _A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_<_ _m_y_d_i_m_,_ _c_d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_: │ │ │ │ -_J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d & │ │ │ │ -_5_5 _A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_<_ _m_y_d_i_m_,_ _c_d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d () const │ │ │ │ -56 { │ │ │ │ -57 if( !builtJT_ ) │ │ │ │ -58 { │ │ │ │ -59 const FieldVector< ctype, coorddimension > &origin = coord_[ 0 ]; │ │ │ │ -60 for( int i = 0; i < mydimension; ++i ) │ │ │ │ -61 { │ │ │ │ -62 jT_[ i ] = coord_[ i+1 ]; │ │ │ │ -63 jT_[ i ] -= origin; │ │ │ │ -64 } │ │ │ │ -65 builtJT_ = true; │ │ │ │ -66 } │ │ │ │ -67 return jT_; │ │ │ │ -68 } │ │ │ │ -69 │ │ │ │ -70 │ │ │ │ -71 template< int mydim, int cdim, class GridImp > │ │ │ │ -72 inline const typename _A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_<_ _m_y_d_i_m_,_ _c_d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_: │ │ │ │ -_J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d & │ │ │ │ -_7_3 _A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_<_ _m_y_d_i_m_,_ _c_d_i_m_,_ _G_r_i_d_I_m_p_ _>_:_:_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d () │ │ │ │ -const │ │ │ │ -74 { │ │ │ │ -75 if( !builtJTInv_ ) │ │ │ │ -76 { │ │ │ │ -77 elDet_ = std::abs( _A_l_b_e_r_t_a_:_:_i_n_v_e_r_t( jacobianTransposed(), jTInv_ ) ); │ │ │ │ -78 assert( elDet_ > 1.0e-25 ); │ │ │ │ -79 calcedDet_ = true; │ │ │ │ -80 builtJTInv_ = true; │ │ │ │ -81 } │ │ │ │ -82 return jTInv_; │ │ │ │ -83 } │ │ │ │ -84 │ │ │ │ -85 │ │ │ │ -86 // built Geometry │ │ │ │ -87 template< int mydim, int cdim, class GridImp > │ │ │ │ -88 template< class CoordReader > │ │ │ │ -89 inline void _A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_<_ _m_y_d_i_m_,_ _c_d_i_m_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ -_9_0_ _:_:_b_u_i_l_d ( const CoordReader &coordReader ) │ │ │ │ -91 { │ │ │ │ -92 builtJT_ = false; │ │ │ │ -93 builtJTInv_ = false; │ │ │ │ -94 │ │ │ │ -95 // copy corners │ │ │ │ -96 for( int i = 0; i < numCorners; ++i ) │ │ │ │ -97 coordReader.coordinate( i, coord_[ i ] ); │ │ │ │ -98 │ │ │ │ -99 // calculate centroid │ │ │ │ -100 centroid_ = coord_[ 0 ]; │ │ │ │ -101 for( int i = 1; i < numCorners; ++i ) │ │ │ │ -102 centroid_ += coord_[ i ]; │ │ │ │ -103 centroid_ *= 1.0 / numCorners; │ │ │ │ -104 │ │ │ │ -105 elDet_ = (coordReader.hasDeterminant() ? coordReader.determinant() : │ │ │ │ -elDeterminant()); │ │ │ │ -106 assert( std::abs( elDet_ ) > 0.0 ); │ │ │ │ -107 calcedDet_ = true; │ │ │ │ -108 } │ │ │ │ -109 │ │ │ │ -110 │ │ │ │ -111#if !DUNE_ALBERTA_CACHE_COORDINATES │ │ │ │ -112 template< int dim, int cdim > │ │ │ │ -113 inline typename _A_l_b_e_r_t_a_G_r_i_d_G_l_o_b_a_l_G_e_o_m_e_t_r_y_<_ _d_i_m_,_ _c_d_i_m_,_ _c_o_n_s_t_ _A_l_b_e_r_t_a_G_r_i_d_< │ │ │ │ -_d_i_m_,_ _c_d_i_m_ _> >::GlobalCoordinate │ │ │ │ -114 _A_l_b_e_r_t_a_G_r_i_d_G_l_o_b_a_l_G_e_o_m_e_t_r_y_<_ _d_i_m_,_ _c_d_i_m_,_ _c_o_n_s_t_ _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _c_d_i_m_ _> >:: │ │ │ │ -global ( const LocalCoordinate &local ) const │ │ │ │ -115 { │ │ │ │ -116 GlobalCoordinate y = corner( 0 ); │ │ │ │ -117 jacobianTransposed().umtv( local, y ); │ │ │ │ -118 return y; │ │ │ │ -119 } │ │ │ │ -120 │ │ │ │ -121 │ │ │ │ -122 //local implementation for mydim < cdim │ │ │ │ -123 template< int dim, int cdim > │ │ │ │ -124 inline typename AlbertaGridGlobalGeometry< dim, cdim, const AlbertaGrid< │ │ │ │ -dim, cdim > >::LocalCoordinate │ │ │ │ -125 AlbertaGridGlobalGeometry< dim, cdim, const AlbertaGrid< dim, cdim > >:: │ │ │ │ -local ( const GlobalCoordinate &global ) const │ │ │ │ -126 { │ │ │ │ -127 LocalCoordinate x; │ │ │ │ -128 jacobianInverseTransposed().mtv( global - corner( 0 ), x ); │ │ │ │ -129 return x; │ │ │ │ -130 } │ │ │ │ -131#endif // #if !DUNE_ALBERTA_CACHE_COORDINATES │ │ │ │ -132 │ │ │ │ -133 │ │ │ │ -134 │ │ │ │ -135 // AlbertaGridLocalGeometryProvider │ │ │ │ -136 // -------------------------------- │ │ │ │ -137 │ │ │ │ -138 template< class Grid > │ │ │ │ -139 void AlbertaGridLocalGeometryProvider< Grid >::buildGeometryInFather () │ │ │ │ -140 { │ │ │ │ -141 for( int child = 0; child < numChildren; ++child ) │ │ │ │ -142 { │ │ │ │ -143 for( int orientation = 0; orientation < 2; ++orientation ) │ │ │ │ -144 { │ │ │ │ -145 const GeoInFatherCoordReader coordReader( child, orientation ); │ │ │ │ -146 geometryInFather_[ child ][ orientation ] = new LocalElementGeometry │ │ │ │ -( coordReader ); │ │ │ │ -147 } │ │ │ │ -148 } │ │ │ │ -149 } │ │ │ │ -150 │ │ │ │ +52#ifdef N_VERTICES_0D │ │ │ │ +53 #undef N_VERTICES_0D │ │ │ │ +54#endif // N_VERTICES_0D │ │ │ │ +55 │ │ │ │ +56#ifdef N_EDGES_0D │ │ │ │ +57 #undef N_EDGES_0D │ │ │ │ +58#endif // N_EDGES_0D │ │ │ │ +59 │ │ │ │ +60#ifdef N_FACES_0D │ │ │ │ +61 #undef N_FACES_0D │ │ │ │ +62#endif // N_FACES_0D │ │ │ │ +63 │ │ │ │ +64#ifdef N_NEIGH_0D │ │ │ │ +65 #undef N_NEIGH_0D │ │ │ │ +66#endif // N_NEIGH_0D │ │ │ │ +67 │ │ │ │ +68#ifdef N_WALLS_0D │ │ │ │ +69 #undef N_WALLS_0D │ │ │ │ +70#endif // N_WALLS_0D │ │ │ │ +71 │ │ │ │ +72#ifdef N_VERTICES_1D │ │ │ │ +73 #undef N_VERTICES_1D │ │ │ │ +74#endif // N_VERTICES_1D │ │ │ │ +75 │ │ │ │ +76#ifdef N_EDGES_1D │ │ │ │ +77 #undef N_EDGES_1D │ │ │ │ +78#endif // N_EDGES_1D │ │ │ │ +79 │ │ │ │ +80#ifdef N_FACES_1D │ │ │ │ +81 #undef N_FACES_1D │ │ │ │ +82#endif // N_FACES_1D │ │ │ │ +83 │ │ │ │ +84#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#ifdef N_NEIGH_2D │ │ │ │ +105 #undef N_NEIGH_2D │ │ │ │ +106#endif // N_NEIGH_2D │ │ │ │ +107 │ │ │ │ +108#ifdef N_WALLS_2D │ │ │ │ +109 #undef N_WALLS_2D │ │ │ │ +110#endif // N_WALLS_2D │ │ │ │ +111 │ │ │ │ +112#ifdef N_VERTICES_3D │ │ │ │ +113 #undef N_VERTICES_3D │ │ │ │ +114#endif // N_VERTICES_3D │ │ │ │ +115 │ │ │ │ +116#ifdef N_EDGES_3D │ │ │ │ +117 #undef N_EDGES_3D │ │ │ │ +118#endif // N_EDGES_3D │ │ │ │ +119 │ │ │ │ +120#ifdef N_FACES_3D │ │ │ │ +121 #undef N_FACES_3D │ │ │ │ +122#endif // N_FACES_3D │ │ │ │ +123 │ │ │ │ +124#ifdef N_NEIGH_3D │ │ │ │ +125 #undef N_NEIGH_3D │ │ │ │ +126#endif // N_NEIGH_3D │ │ │ │ +127 │ │ │ │ +128#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 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; │ │ │ │ +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 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 } │ │ │ │ +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 private: │ │ │ │ -205 const int child_; │ │ │ │ -206 const int orientation_; │ │ │ │ -207 }; │ │ │ │ -208 │ │ │ │ -209 │ │ │ │ -210 │ │ │ │ -211 // AlbertaGridLocalGeometryProvider::FaceCoordReader │ │ │ │ -212 // ------------------------------------------------- │ │ │ │ -213 │ │ │ │ -214 template< class Grid > │ │ │ │ -_2_1_5 struct _A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r< _G_r_i_d >::_F_a_c_e_C_o_o_r_d_R_e_a_d_e_r │ │ │ │ -216 { │ │ │ │ -_2_1_7 typedef _A_l_b_e_r_t_a_:_:_R_e_a_l _c_t_y_p_e; │ │ │ │ -218 │ │ │ │ -_2_1_9 typedef _F_i_e_l_d_V_e_c_t_o_r_<_ _c_t_y_p_e_,_ _d_i_m_e_n_s_i_o_n_ _> _C_o_o_r_d_i_n_a_t_e; │ │ │ │ -220 │ │ │ │ -_2_2_1 _F_a_c_e_C_o_o_r_d_R_e_a_d_e_r ( const int _f_a_c_e, const int twist = 0 ) │ │ │ │ -222 : face_( _f_a_c_e ), │ │ │ │ -223 twist_( twist ) │ │ │ │ -224 {} │ │ │ │ -225 │ │ │ │ -_2_2_6 void _c_o_o_r_d_i_n_a_t_e ( const int i, _C_o_o_r_d_i_n_a_t_e &_x ) const │ │ │ │ -227 { │ │ │ │ -228 const int _t_i = _A_l_b_e_r_t_a_:_:_a_p_p_l_y_I_n_v_e_r_s_e_T_w_i_s_t< _d_i_m_e_n_s_i_o_n-1 >( twist_, i ); │ │ │ │ -229 const int j = _m_a_p_V_e_r_t_i_c_e_s_<_ _1_ _>( face_, _t_i ); │ │ │ │ -230 refCorner( j, _x ); │ │ │ │ -231 } │ │ │ │ -232 │ │ │ │ -_2_3_3 bool _h_a_s_D_e_t_e_r_m_i_n_a_n_t () const │ │ │ │ -234 { │ │ │ │ -235 return false; │ │ │ │ -236 } │ │ │ │ -237 │ │ │ │ -_2_3_8 _c_t_y_p_e _d_e_t_e_r_m_i_n_a_n_t () const │ │ │ │ -239 { │ │ │ │ -240 return _c_t_y_p_e( 0 ); │ │ │ │ -241 } │ │ │ │ -242 │ │ │ │ -243 private: │ │ │ │ -244 static void refCorner ( const int i, Coordinate &_x ) │ │ │ │ -245 { │ │ │ │ -246 _x = _c_t_y_p_e( 0 ); │ │ │ │ -247 if( i > 0 ) │ │ │ │ -248 _x[ i-1 ] = _c_t_y_p_e( 1 ); │ │ │ │ -249 } │ │ │ │ -250 │ │ │ │ -251 int face_; │ │ │ │ -252 int twist_; │ │ │ │ -253 }; │ │ │ │ -254 │ │ │ │ -255} // namespace Dune │ │ │ │ -256 │ │ │ │ -257#endif // #ifndef DUNE_ALBERTA_GEOMETRY_CC │ │ │ │ -_r_e_f_i_n_e_m_e_n_t_._h_h │ │ │ │ -provides a wrapper for ALBERTA's refinement patches and the corners for │ │ │ │ -geometryInFather │ │ │ │ -_a_l_g_e_b_r_a_._h_h │ │ │ │ -_D_u_n_e │ │ │ │ -Include standard header files. │ │ │ │ -DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_a_p_p_l_y_I_n_v_e_r_s_e_T_w_i_s_t │ │ │ │ -int applyInverseTwist(int twist, int i) │ │ │ │ -DDeeffiinniittiioonn misc.hh:637 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_R_e_a_l │ │ │ │ -ALBERTA REAL Real │ │ │ │ -DDeeffiinniittiioonn misc.hh:48 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_i_n_v_e_r_t │ │ │ │ -static K invert(const FieldMatrix< K, 0, m > &matrix, FieldMatrix< K, m, 0 > │ │ │ │ -&inverse) │ │ │ │ -DDeeffiinniittiioonn algebra.hh:81 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_G_e_o_I_n_F_a_t_h_e_r_C_o_o_r_d_R_e_a_d_e_r │ │ │ │ -DDeeffiinniittiioonn geometry.cc:172 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_G_e_o_I_n_F_a_t_h_e_r_C_o_o_r_d_R_e_a_d_e_r_:_:_C_o_o_r_d_i_n_a_t_e │ │ │ │ -FieldVector< ctype, dimension > Coordinate │ │ │ │ -DDeeffiinniittiioonn geometry.cc:175 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_G_e_o_I_n_F_a_t_h_e_r_C_o_o_r_d_R_e_a_d_e_r_:_:_c_t_y_p_e │ │ │ │ -Alberta::Real ctype │ │ │ │ -DDeeffiinniittiioonn geometry.cc:173 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_G_e_o_I_n_F_a_t_h_e_r_C_o_o_r_d_R_e_a_d_e_r_:_:_c_o_o_r_d_i_n_a_t_e │ │ │ │ -void coordinate(int i, Coordinate &x) const │ │ │ │ -DDeeffiinniittiioonn geometry.cc:186 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_G_e_o_I_n_F_a_t_h_e_r_C_o_o_r_d_R_e_a_d_e_r_:_: │ │ │ │ -_G_e_o_I_n_F_a_t_h_e_r_C_o_o_r_d_R_e_a_d_e_r │ │ │ │ -GeoInFatherCoordReader(int child, int orientation) │ │ │ │ -DDeeffiinniittiioonn geometry.cc:181 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_G_e_o_I_n_F_a_t_h_e_r_C_o_o_r_d_R_e_a_d_e_r_:_:_h_a_s_D_e_t_e_r_m_i_n_a_n_t │ │ │ │ -bool hasDeterminant() const │ │ │ │ -DDeeffiinniittiioonn geometry.cc:194 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_G_e_o_I_n_F_a_t_h_e_r_C_o_o_r_d_R_e_a_d_e_r_:_:_d_e_t_e_r_m_i_n_a_n_t │ │ │ │ -ctype determinant() const │ │ │ │ -DDeeffiinniittiioonn geometry.cc:199 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_F_a_c_e_C_o_o_r_d_R_e_a_d_e_r │ │ │ │ -DDeeffiinniittiioonn geometry.cc:216 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_F_a_c_e_C_o_o_r_d_R_e_a_d_e_r_:_:_F_a_c_e_C_o_o_r_d_R_e_a_d_e_r │ │ │ │ -FaceCoordReader(const int face, const int twist=0) │ │ │ │ -DDeeffiinniittiioonn geometry.cc:221 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_F_a_c_e_C_o_o_r_d_R_e_a_d_e_r_:_:_c_o_o_r_d_i_n_a_t_e │ │ │ │ -void coordinate(const int i, Coordinate &x) const │ │ │ │ -DDeeffiinniittiioonn geometry.cc:226 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_F_a_c_e_C_o_o_r_d_R_e_a_d_e_r_:_:_d_e_t_e_r_m_i_n_a_n_t │ │ │ │ -ctype determinant() const │ │ │ │ -DDeeffiinniittiioonn geometry.cc:238 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_F_a_c_e_C_o_o_r_d_R_e_a_d_e_r_:_:_C_o_o_r_d_i_n_a_t_e │ │ │ │ -FieldVector< ctype, dimension > Coordinate │ │ │ │ -DDeeffiinniittiioonn geometry.cc:219 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_F_a_c_e_C_o_o_r_d_R_e_a_d_e_r_:_:_h_a_s_D_e_t_e_r_m_i_n_a_n_t │ │ │ │ -bool hasDeterminant() const │ │ │ │ -DDeeffiinniittiioonn geometry.cc:233 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_F_a_c_e_C_o_o_r_d_R_e_a_d_e_r_:_:_c_t_y_p_e │ │ │ │ -Alberta::Real ctype │ │ │ │ -DDeeffiinniittiioonn geometry.cc:217 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y │ │ │ │ -geometry implementation for AlbertaGrid │ │ │ │ -DDeeffiinniittiioonn albertagrid/geometry.hh:108 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ -const JacobianTransposed & jacobianTransposed() const │ │ │ │ -transposed of the geometry mapping's Jacobian │ │ │ │ -DDeeffiinniittiioonn geometry.cc:55 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_:_:_l_o_c_a_l │ │ │ │ -LocalCoordinate local(const GlobalCoordinate &global) const │ │ │ │ -map a point from the geometry to the reference element │ │ │ │ -DDeeffiinniittiioonn geometry.cc:45 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_:_:_j_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d │ │ │ │ -const JacobianInverseTransposed & jacobianInverseTransposed() const │ │ │ │ -transposed inverse of the geometry mapping's Jacobian │ │ │ │ -DDeeffiinniittiioonn geometry.cc:73 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_:_:_L_o_c_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ -FieldVector< ctype, mydimension > LocalCoordinate │ │ │ │ -DDeeffiinniittiioonn albertagrid/geometry.hh:126 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_:_:_J_a_c_o_b_i_a_n_I_n_v_e_r_s_e_T_r_a_n_s_p_o_s_e_d │ │ │ │ -FieldMatrix< ctype, coorddimension, mydimension > JacobianInverseTransposed │ │ │ │ -DDeeffiinniittiioonn albertagrid/geometry.hh:130 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_:_:_p_r_i_n_t │ │ │ │ -void print(std::ostream &out) const │ │ │ │ -DDeeffiinniittiioonn geometry.cc:20 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_:_:_g_l_o_b_a_l │ │ │ │ -GlobalCoordinate global(const LocalCoordinate &local) const │ │ │ │ -map a point from the reference element to the geometry │ │ │ │ -DDeeffiinniittiioonn geometry.cc:34 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_:_:_G_l_o_b_a_l_C_o_o_r_d_i_n_a_t_e │ │ │ │ -FieldVector< ctype, coorddimension > GlobalCoordinate │ │ │ │ -DDeeffiinniittiioonn albertagrid/geometry.hh:127 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_G_e_o_m_e_t_r_y_:_:_J_a_c_o_b_i_a_n_T_r_a_n_s_p_o_s_e_d │ │ │ │ -FieldMatrix< ctype, mydimension, coorddimension > JacobianTransposed │ │ │ │ -DDeeffiinniittiioonn albertagrid/geometry.hh:129 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_G_l_o_b_a_l_G_e_o_m_e_t_r_y │ │ │ │ -DDeeffiinniittiioonn albertagrid/geometry.hh:303 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r │ │ │ │ -DDeeffiinniittiioonn albertagrid/geometry.hh:504 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ -static constexpr int dimension │ │ │ │ -DDeeffiinniittiioonn albertagrid/geometry.hh:510 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_c_t_y_p_e │ │ │ │ -Grid::ctype ctype │ │ │ │ -DDeeffiinniittiioonn albertagrid/geometry.hh:508 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r_:_:_C_o_d_i_m │ │ │ │ -DDeeffiinniittiioonn albertagrid/geometry.hh:514 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_I_n_F_a_t_h_e_r │ │ │ │ -DDeeffiinniittiioonn refinement.hh:292 │ │ │ │ -_D_u_n_e_:_:_G_r_i_d │ │ │ │ -Grid abstract base class. │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:375 │ │ │ │ -_g_e_o_m_e_t_r_y_._h_h │ │ │ │ +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/a00683.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: entity.cc File Reference │ │ │ +dune-grid: refinement.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,48 +70,60 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Namespaces | │ │ │ -Macros
│ │ │ -
entity.cc File Reference
│ │ │ +Classes | │ │ │ +Namespaces
│ │ │ +
refinement.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>
│ │ │ +
│ │ │

Go to the source code of this file.

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

│ │ │ +Classes

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

│ │ │ Namespaces

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

│ │ │ -Macros

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

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ DUNE_ALBERTA_ENTITY_CC

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

Detailed Description

│ │ │ +

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

│ │ │ +
Author
Martin Nolte
│ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,22 +1,47 @@ │ │ │ │ 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 | _M_a_c_r_o_s │ │ │ │ -entity.cc File Reference │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +refinement.hh File Reference │ │ │ │ +provides a wrapper for ALBERTA's refinement patches and the corners for │ │ │ │ +geometryInFather _M_o_r_e_._._. │ │ │ │ +#include │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_i_s_c_._h_h> │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_e_l_e_m_e_n_t_i_n_f_o_._h_h> │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +CCllaasssseess │ │ │ │ + class   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_a_t_c_h_<_ _d_i_m_ _> │ │ │ │ +  │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d_<_ _d_i_m_,_ _0_ _> │ │ │ │ +  │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d_<_ _d_i_m_,_ _d_i_m_ _> │ │ │ │ +  │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d_<_ _2_,_ _1_ _> │ │ │ │ +  │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d_<_ _3_,_ _1_ _> │ │ │ │ +  │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_F_o_r_E_a_c_h_I_n_t_e_r_i_o_r_S_u_b_C_h_i_l_d_<_ _3_,_ _2_ _> │ │ │ │ +  │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_I_n_F_a_t_h_e_r_<_ _1_ _> │ │ │ │ +  │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_I_n_F_a_t_h_e_r_<_ _2_ _> │ │ │ │ +  │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_e_o_m_e_t_r_y_I_n_F_a_t_h_e_r_<_ _3_ _> │ │ │ │ +  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │   Include standard header files. │ │ │ │   │ │ │ │ -MMaaccrrooss │ │ │ │ -#define  _D_U_N_E___A_L_B_E_R_T_A___E_N_T_I_T_Y___C_C │ │ │ │ +namespace   _D_u_n_e_:_:_A_l_b_e_r_t_a │ │ │ │   │ │ │ │ -********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ -********** _?◆_? DDUUNNEE__AALLBBEERRTTAA__EENNTTIITTYY__CCCC ********** │ │ │ │ -#define DUNE_ALBERTA_ENTITY_CC │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ +provides a wrapper for ALBERTA's 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/a00683_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: entity.cc Source File │ │ │ +dune-grid: refinement.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,493 +74,454 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
entity.cc
│ │ │ +
refinement.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_ENTITY_CC
│ │ │ -
6#define DUNE_ALBERTA_ENTITY_CC
│ │ │ +
5#ifndef DUNE_ALBERTA_REFINEMENT_HH
│ │ │ +
6#define DUNE_ALBERTA_REFINEMENT_HH
│ │ │
7
│ │ │ -
8namespace Dune
│ │ │ -
9{
│ │ │ -
10
│ │ │ -
11 // AlbertaGridEntity (for codim > 0)
│ │ │ -
12 // ---------------------------------
│ │ │ -
13
│ │ │ -
14 template<int codim, int dim, class Grid>
│ │ │ -
15 inline AlbertaGridEntity< codim, dim, Grid >
│ │ │ -
│ │ │ -
16 ::AlbertaGridEntity ( const Grid &grid, const ElementInfo &elementInfo, int subEntity )
│ │ │ -
17 : grid_( &grid ),
│ │ │ -
18 elementInfo_( elementInfo ),
│ │ │ -
19 subEntity_( subEntity )
│ │ │ -
20 {}
│ │ │ -
│ │ │ -
21
│ │ │ -
22 template<int codim, int dim, class Grid>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
25 : grid_( &grid ),
│ │ │ -
26 elementInfo_(),
│ │ │ -
27 subEntity_( -1 )
│ │ │ -
28 {}
│ │ │ -
│ │ │ +
14#include <cassert>
│ │ │ +
15
│ │ │ + │ │ │ + │ │ │ +
18
│ │ │ +
19#if HAVE_ALBERTA
│ │ │ +
20
│ │ │ +
21namespace Dune
│ │ │ +
22{
│ │ │ +
23
│ │ │ +
24 namespace Alberta
│ │ │ +
25 {
│ │ │ +
26
│ │ │ +
27 // Internal Forward Declarations
│ │ │ +
28 // -----------------------------
│ │ │
29
│ │ │ -
30 template<int codim, int dim, class Grid>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
33 : grid_( NULL ),
│ │ │ -
34 elementInfo_(),
│ │ │ -
35 subEntity_( -1 )
│ │ │ -
36 {}
│ │ │ -
│ │ │ +
30 template< int dim, int codim >
│ │ │ + │ │ │ +
32
│ │ │ +
33
│ │ │ +
34
│ │ │ +
35 // Patch
│ │ │ +
36 // -----
│ │ │
37
│ │ │ -
38 template< int codim, int dim, class Grid >
│ │ │ -
39 inline PartitionType
│ │ │ -
│ │ │ - │ │ │ -
41 {
│ │ │ -
42 return InteriorEntity;
│ │ │ -
43 }
│ │ │ -
│ │ │ -
44
│ │ │ +
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 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();
│ │ │ +
46 public:
│ │ │ +
47 static const int dimension = dim;
│ │ │ +
48
│ │ │ + │ │ │ +
50
│ │ │ +
51 typedef ALBERTA RC_LIST_EL ElementList;
│ │ │
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 }
│ │ │ +
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
│ │ │ -
68 template< int codim, int dim, class Grid >
│ │ │ -
69 inline void
│ │ │ -
│ │ │ - │ │ │ -
71 {
│ │ │ -
72 elementInfo_ = ElementInfo();
│ │ │ -
73 }
│ │ │ -
│ │ │ +
│ │ │ +
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
│ │ │ -
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
│ │ │ +
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 >
│ │ │
│ │ │ - │ │ │ -
88 {
│ │ │ -
89 setElement( other.elementInfo_, other.subEntity_ );
│ │ │ -
90 }
│ │ │ +
87 void forEachInteriorSubChild ( Functor &functor ) const
│ │ │ +
88 {
│ │ │ + │ │ │ +
90 }
│ │ │ +
│ │ │ +
91 };
│ │ │
│ │ │ -
91
│ │ │
92
│ │ │ -
93 template< int codim, int dim, class Grid >
│ │ │ -
│ │ │ - │ │ │ -
95 {
│ │ │ -
96 assert( elementInfo_.level() == grid().levelProvider() ( elementInfo_ ) );
│ │ │ -
97 return elementInfo_.level();
│ │ │ -
98 }
│ │ │ +
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 }
│ │ │
│ │ │ -
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 >
│ │ │ +
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
│ │ │
│ │ │ - │ │ │ -
115 {
│ │ │ -
116 return GeometryTypes::simplex( mydimension );
│ │ │ -
117 }
│ │ │ -
│ │ │ -
118
│ │ │ -
119
│ │ │ -
120
│ │ │ -
121 // AlbertaGridEntity (for codim = 0)
│ │ │ -
122 // ---------------------------------
│ │ │ +
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, 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 {}
│ │ │ +
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
│ │ │ -
148 template< int dim, class Grid >
│ │ │ -
│ │ │ - │ │ │ -
150 {
│ │ │ -
151 // elements are always inside of our Domain
│ │ │ -
152 return 0;
│ │ │ -
153 }
│ │ │ -
│ │ │ -
154
│ │ │ -
155
│ │ │ -
156 template< int dim, class Grid >
│ │ │ -
│ │ │ - │ │ │ -
158 {
│ │ │ -
159 return grid().levelProvider().isNew( elementInfo_ );
│ │ │ -
160 }
│ │ │ -
│ │ │ -
161
│ │ │ -
162
│ │ │ -
163 template< int dim, class Grid >
│ │ │ -
│ │ │ - │ │ │ -
165 {
│ │ │ -
166 return elementInfo_.mightVanish();
│ │ │ -
167 }
│ │ │ -
│ │ │ -
168
│ │ │ -
169
│ │ │ -
170 template< int dim, class Grid >
│ │ │ -
171 inline bool
│ │ │ -
│ │ │ - │ │ │ -
173 {
│ │ │ -
174 assert( elementInfo_ );
│ │ │ -
175 bool isBoundary = false;
│ │ │ -
176 for( int i = 0; i < dim+1; ++i )
│ │ │ -
177 isBoundary |= elementInfo_.isBoundary( i );
│ │ │ -
178 return isBoundary;
│ │ │ -
179 }
│ │ │ -
│ │ │ -
180
│ │ │ -
181
│ │ │ -
182 template< int dim, class Grid >
│ │ │ -
183 inline PartitionType
│ │ │ -
│ │ │ - │ │ │ -
185 {
│ │ │ -
186 return InteriorEntity;
│ │ │ -
187 }
│ │ │ -
│ │ │ -
188
│ │ │ +
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 template< int dim, class Grid >
│ │ │ -
│ │ │ - │ │ │ -
192 {
│ │ │ -
193 return elementInfo_.isLeaf();
│ │ │ -
194 }
│ │ │ -
│ │ │ -
195
│ │ │ -
196
│ │ │ -
197 template< int dim, class Grid >
│ │ │ -
198 inline bool
│ │ │ -
│ │ │ - │ │ │ -
200 {
│ │ │ -
201 // element pointers are unique
│ │ │ -
202 return (elementInfo().el() == other.elementInfo().el());
│ │ │ -
203 }
│ │ │ -
│ │ │ -
204
│ │ │ -
205
│ │ │ -
206 template< int dim, class Grid >
│ │ │ -
207 template< int codim >
│ │ │ -
208 inline typename Grid::template Codim< codim >::Entity
│ │ │ -
│ │ │ - │ │ │ -
210 {
│ │ │ -
211 typedef AlbertaGridEntity< codim, dim, Grid > EntityImpl;
│ │ │ -
212 return EntityImpl( grid(), elementInfo_, grid().generic2alberta( codim, i ) );
│ │ │ -
213 }
│ │ │ -
│ │ │ -
214
│ │ │ +
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 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 }
│ │ │ +
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 template< int dim, class Grid >
│ │ │ - │ │ │ -
290 {
│ │ │ -
291 return elementInfo_.indexInFather();
│ │ │ -
292 }
│ │ │ +
288 // GeometryInFather
│ │ │ +
289 // ----------------
│ │ │ +
290
│ │ │ +
291 template< int dim >
│ │ │ + │ │ │
293
│ │ │ -
294
│ │ │ -
295 template< int dim, class Grid >
│ │ │ -
296 inline typename AlbertaGridEntity< 0, dim, Grid >::LocalGeometry
│ │ │ -
│ │ │ - │ │ │ -
298 {
│ │ │ -
299 typedef AlbertaGridLocalGeometryProvider< Grid > LocalGeoProvider;
│ │ │ -
300 const int indexInFather = elementInfo_.indexInFather();
│ │ │ -
301 const int orientation = (elementInfo_.type() == 1 ? -1 : 1);
│ │ │ -
302 return LocalGeometry( LocalGeoProvider::instance().geometryInFather( indexInFather, orientation ) );
│ │ │ -
303 }
│ │ │ -
│ │ │ -
304
│ │ │ -
305
│ │ │ -
306 template< int dim, class Grid >
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
309 {
│ │ │ -
310 assert( elementInfo_ );
│ │ │ -
311 typedef AlbertaGridHierarchicIterator< Grid > IteratorImp;
│ │ │ -
312 return IteratorImp( grid(), elementInfo_, maxlevel );
│ │ │ -
313 }
│ │ │ -
│ │ │ -
314
│ │ │ +
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 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 )
│ │ │ +
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 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 }
│ │ │ +
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 template< int dim, class Grid >
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
354 {
│ │ │ -
355 assert( elementInfo_ );
│ │ │ - │ │ │ -
357 return AlbertaGridLeafIntersectionIterator( *this, end );
│ │ │ -
358 }
│ │ │ -
│ │ │ -
359
│ │ │ -
360} // namespace Dune
│ │ │ -
361
│ │ │ -
362#endif // #ifndef DUNE_ALBERTA_ENTITY_CC
│ │ │ -
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ -
PartitionType
Attributes used in the generic overlap model.
Definition gridenums.hh:30
│ │ │ -
@ InteriorEntity
all interior entities
Definition gridenums.hh:31
│ │ │ +
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
│ │ │ +
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
│ │ │ │ │ │ -
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
│ │ │ +
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,505 +1,454 @@ │ │ │ │ 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 │ │ │ │ +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_ALBERTA_ENTITY_CC │ │ │ │ -_6#define DUNE_ALBERTA_ENTITY_CC │ │ │ │ +5#ifndef DUNE_ALBERTA_REFINEMENT_HH │ │ │ │ +6#define DUNE_ALBERTA_REFINEMENT_HH │ │ │ │ 7 │ │ │ │ -8namespace _D_u_n_e │ │ │ │ -9{ │ │ │ │ -10 │ │ │ │ -11 // AlbertaGridEntity (for codim > 0) │ │ │ │ -12 // --------------------------------- │ │ │ │ -13 │ │ │ │ -14 template │ │ │ │ -15 inline AlbertaGridEntity< codim, dim, Grid > │ │ │ │ -_1_6 ::AlbertaGridEntity ( const _G_r_i_d &grid, const _E_l_e_m_e_n_t_I_n_f_o &elementInfo, int │ │ │ │ -subEntity ) │ │ │ │ -17 : grid_( &grid ), │ │ │ │ -18 elementInfo_( elementInfo ), │ │ │ │ -19 subEntity_( subEntity ) │ │ │ │ -20 {} │ │ │ │ -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 {} │ │ │ │ +14#include │ │ │ │ +15 │ │ │ │ +16#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_i_s_c_._h_h> │ │ │ │ +17#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_e_l_e_m_e_n_t_i_n_f_o_._h_h> │ │ │ │ +18 │ │ │ │ +19#if HAVE_ALBERTA │ │ │ │ +20 │ │ │ │ +21namespace _D_u_n_e │ │ │ │ +22{ │ │ │ │ +23 │ │ │ │ +24 namespace Alberta │ │ │ │ +25 { │ │ │ │ +26 │ │ │ │ +27 // Internal Forward Declarations │ │ │ │ +28 // ----------------------------- │ │ │ │ 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 {} │ │ │ │ +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 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 │ │ │ │ +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 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(); │ │ │ │ +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 // if both element null then they are equal │ │ │ │ -54 if( (_e_1 == _N_U_L_L) && (_e_2 == _N_U_L_L) ) │ │ │ │ -55 return true; │ │ │ │ -56 return ((_e_1 == _e_2) && (subEntity_ == _o_t_h_e_r.subEntity_)); │ │ │ │ -57 } │ │ │ │ -58 │ │ │ │ -59 │ │ │ │ -60 template< int codim, int dim, class Grid > │ │ │ │ -61 inline _A_L_B_E_R_T_A EL_INFO * │ │ │ │ -_6_2 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _c_o_d_i_m_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_g_e_t_E_l_I_n_f_o () const │ │ │ │ -63 { │ │ │ │ -64 return &(elementInfo_.elInfo()); │ │ │ │ -65 } │ │ │ │ +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 │ │ │ │ -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 } │ │ │ │ +_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 │ │ │ │ -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 ) │ │ │ │ +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 setElement( _o_t_h_e_r.elementInfo_, _o_t_h_e_r.subEntity_ ); │ │ │ │ +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 │ │ │ │ +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 │ │ │ │ +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 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 │ │ │ │ +101 │ │ │ │ +102 template< int dim > │ │ │ │ +103 template< class LevelProvider > │ │ │ │ +104 inline typename _P_a_t_c_h_<_ _d_i_m_ _>_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ +_1_0_5 _P_a_t_c_h_<_ _d_i_m_ _>_:_:_e_l_e_m_e_n_t_I_n_f_o ( int i, const LevelProvider &levelProvider ) │ │ │ │ +const │ │ │ │ +106 { │ │ │ │ +107 assert( (i >= 0) && (i < count()) ); │ │ │ │ +108 return _E_l_e_m_e_n_t_I_n_f_o_:_:_c_r_e_a_t_e_F_a_k_e( list_[ i ].el_info ); │ │ │ │ +109 } │ │ │ │ +110 │ │ │ │ +111 template<> │ │ │ │ +112 template< class LevelProvider > │ │ │ │ +113 inline typename _P_a_t_c_h_<_ _2_ _>_:_:_E_l_e_m_e_n_t_I_n_f_o │ │ │ │ +_1_1_4 _P_a_t_c_h_<_ _2_ _>_:_:_e_l_e_m_e_n_t_I_n_f_o ( int i, const LevelProvider &levelProvider ) const │ │ │ │ 115 { │ │ │ │ -116 return GeometryTypes::simplex( mydimension ); │ │ │ │ -117 } │ │ │ │ -118 │ │ │ │ -119 │ │ │ │ -120 │ │ │ │ -121 // AlbertaGridEntity (for codim = 0) │ │ │ │ -122 // --------------------------------- │ │ │ │ +116 assert( (i >= 0) && (i < count()) ); │ │ │ │ +117 const _M_e_s_h_P_o_i_n_t_e_r_<_ _2_ _> &mesh = levelProvider.mesh(); │ │ │ │ +118 const _E_l_e_m_e_n_t *element = (*this)[ i ]; │ │ │ │ +119 const int level = levelProvider( element ); │ │ │ │ +120 return _E_l_e_m_e_n_t_I_n_f_o_:_:_c_r_e_a_t_e_F_a_k_e( mesh, element, level ); │ │ │ │ +121 } │ │ │ │ +122 │ │ │ │ 123 │ │ │ │ -124 template< int dim, 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 {} │ │ │ │ +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 │ │ │ │ -148 template< int dim, class Grid > │ │ │ │ -_1_4_9 inline int _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_b_o_u_n_d_a_r_y_I_d() const │ │ │ │ -150 { │ │ │ │ -151 // elements are always inside of our Domain │ │ │ │ -152 return 0; │ │ │ │ -153 } │ │ │ │ -154 │ │ │ │ -155 │ │ │ │ -156 template< int dim, class Grid > │ │ │ │ -_1_5_7 inline bool _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_i_s_N_e_w () const │ │ │ │ -158 { │ │ │ │ -159 return _g_r_i_d().levelProvider().isNew( elementInfo_ ); │ │ │ │ -160 } │ │ │ │ -161 │ │ │ │ -162 │ │ │ │ -163 template< int dim, class Grid > │ │ │ │ -_1_6_4 inline bool _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_m_i_g_h_t_V_a_n_i_s_h () const │ │ │ │ -165 { │ │ │ │ -166 return elementInfo_._m_i_g_h_t_V_a_n_i_s_h(); │ │ │ │ -167 } │ │ │ │ -168 │ │ │ │ -169 │ │ │ │ -170 template< int dim, class Grid > │ │ │ │ -171 inline bool │ │ │ │ -_1_7_2 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_h_a_s_B_o_u_n_d_a_r_y_I_n_t_e_r_s_e_c_t_i_o_n_s () const │ │ │ │ -173 { │ │ │ │ -174 assert( elementInfo_ ); │ │ │ │ -175 bool isBoundary = false; │ │ │ │ -176 for( int i = 0; i < dim+1; ++i ) │ │ │ │ -177 isBoundary |= elementInfo_._i_s_B_o_u_n_d_a_r_y( i ); │ │ │ │ -178 return isBoundary; │ │ │ │ -179 } │ │ │ │ -180 │ │ │ │ -181 │ │ │ │ -182 template< int dim, class Grid > │ │ │ │ -183 inline _P_a_r_t_i_t_i_o_n_T_y_p_e │ │ │ │ -_1_8_4 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_p_a_r_t_i_t_i_o_n_T_y_p_e () const │ │ │ │ -185 { │ │ │ │ -186 return _I_n_t_e_r_i_o_r_E_n_t_i_t_y; │ │ │ │ -187 } │ │ │ │ -188 │ │ │ │ +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 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(); │ │ │ │ +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 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 │ │ │ │ +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 // element pointers are unique │ │ │ │ -202 return (_e_l_e_m_e_n_t_I_n_f_o().el() == other._e_l_e_m_e_n_t_I_n_f_o().el()); │ │ │ │ -203 } │ │ │ │ -204 │ │ │ │ -205 │ │ │ │ -206 template< int dim, class Grid > │ │ │ │ -207 template< int codim > │ │ │ │ -208 inline typename _G_r_i_d_:_:_t_e_m_p_l_a_t_e Codim< codim >::Entity │ │ │ │ -_2_0_9 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_s_u_b_E_n_t_i_t_y ( int i ) const │ │ │ │ -210 { │ │ │ │ -211 typedef _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _c_o_d_i_m_,_ _d_i_m_,_ _G_r_i_d_ _> EntityImpl; │ │ │ │ -212 return EntityImpl( _g_r_i_d(), elementInfo_, _g_r_i_d().generic2alberta( codim, i ) │ │ │ │ -); │ │ │ │ -213 } │ │ │ │ -214 │ │ │ │ +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 template< int dim, class Grid > │ │ │ │ -217 inline _A_L_B_E_R_T_A EL_INFO * │ │ │ │ -_2_1_8 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_g_e_t_E_l_I_n_f_o () const │ │ │ │ -219 { │ │ │ │ -220 return &(elementInfo_._e_l_I_n_f_o()); │ │ │ │ -221 } │ │ │ │ -222 │ │ │ │ -223 │ │ │ │ -224 template< int dim, class Grid > │ │ │ │ -_2_2_5 inline int _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_l_e_v_e_l () const │ │ │ │ -226 { │ │ │ │ -227 assert( elementInfo_._l_e_v_e_l() == _g_r_i_d().levelProvider() ( elementInfo_ ) ); │ │ │ │ -228 return elementInfo_._l_e_v_e_l(); │ │ │ │ -229 } │ │ │ │ -230 │ │ │ │ -231 │ │ │ │ -232 template< int dim, class Grid > │ │ │ │ -233 inline void │ │ │ │ -_2_3_4 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_c_l_e_a_r_E_l_e_m_e_n_t () │ │ │ │ -235 { │ │ │ │ -236 elementInfo_ = _E_l_e_m_e_n_t_I_n_f_o(); │ │ │ │ -237 } │ │ │ │ -238 │ │ │ │ -239 │ │ │ │ -240 template< int dim, class Grid > │ │ │ │ -241 inline void _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _> │ │ │ │ -_2_4_2_ _:_:_s_e_t_E_l_e_m_e_n_t ( const _E_l_e_m_e_n_t_I_n_f_o &elementInfo, int /* subEntity */ ) │ │ │ │ -243 { │ │ │ │ -244 elementInfo_ = elementInfo; │ │ │ │ -245 } │ │ │ │ -246 │ │ │ │ -247 │ │ │ │ -248 template< int dim, class Grid > │ │ │ │ -249 inline void │ │ │ │ -_2_5_0 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_s_e_t_E_n_t_i_t_y( const _T_h_i_s &other ) │ │ │ │ -251 { │ │ │ │ -252 _s_e_t_E_l_e_m_e_n_t( other.elementInfo_, 0 ); │ │ │ │ -253 } │ │ │ │ -254 │ │ │ │ -255 │ │ │ │ -256 template< int dim, class Grid > │ │ │ │ -257 inline typename _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_G_e_o_m_e_t_r_y │ │ │ │ -_2_5_8 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_g_e_o_m_e_t_r_y () const │ │ │ │ -259 { │ │ │ │ -260 typedef _A_l_b_e_r_t_a_G_r_i_d_C_o_o_r_d_i_n_a_t_e_R_e_a_d_e_r_<_ _0_,_ _G_r_i_d_ _> CoordReader; │ │ │ │ -261 │ │ │ │ -262 assert( elementInfo_ ); │ │ │ │ -263 const CoordReader coordReader( _g_r_i_d(), elementInfo_, 0 ); │ │ │ │ -264 return _G_e_o_m_e_t_r_y( _G_e_o_m_e_t_r_y_I_m_p_l( coordReader ) ); │ │ │ │ -265 } │ │ │ │ -266 │ │ │ │ -267 │ │ │ │ -268 template< int dim, class Grid > │ │ │ │ -_2_6_9 inline GeometryType _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_>_:_:_t_y_p_e () const │ │ │ │ -270 { │ │ │ │ -271 return GeometryTypes::simplex( mydimension ); │ │ │ │ -272 } │ │ │ │ -273 │ │ │ │ -274 │ │ │ │ -275 template< int dim, class Grid > │ │ │ │ -276 inline typename _G_r_i_d_:_:_t_e_m_p_l_a_t_e Codim< 0 >::Entity │ │ │ │ -_2_7_7 _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_f_a_t_h_e_r () const │ │ │ │ -278 { │ │ │ │ -279 typedef _A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _> EntityImpl; │ │ │ │ -280 │ │ │ │ -281 assert( elementInfo_ ); │ │ │ │ -282 const _E_l_e_m_e_n_t_I_n_f_o fatherInfo = elementInfo_._f_a_t_h_e_r(); │ │ │ │ -283 │ │ │ │ -284 return EntityImpl( _g_r_i_d(), fatherInfo, 0 ); │ │ │ │ -285 } │ │ │ │ +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 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 } │ │ │ │ +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 │ │ │ │ -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 │ │ │ │ +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 │ │ │ │ -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 ) │ │ │ │ +_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 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 } │ │ │ │ +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 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 │ │ │ │ +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 │ │ │ │ -_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 │ │ │ │ +_e_l_e_m_e_n_t_i_n_f_o_._h_h │ │ │ │ +provides a wrapper for ALBERTA's el_info structure │ │ │ │ +_m_i_s_c_._h_h │ │ │ │ _D_u_n_e │ │ │ │ Include standard header files. │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_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_:_:_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 │ │ │ │ +_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 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 │ │ │ │ +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 albertagrid/entity.hh:71 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_:_:_t_y_p_e │ │ │ │ -GeometryType type() const │ │ │ │ -type of geometry of this entity │ │ │ │ -DDeeffiinniittiioonn entity.cc:114 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_:_:_e_q_u_a_l_s │ │ │ │ -bool equals(const This &other) const │ │ │ │ -equality of entities │ │ │ │ -DDeeffiinniittiioonn entity.cc:48 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_:_:_C_o_d_i_m │ │ │ │ -DDeeffiinniittiioonn albertagrid/entity.hh:63 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _> │ │ │ │ -DDeeffiinniittiioonn albertagrid/entity.hh:185 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_G_e_o_m_e_t_r_y_I_m_p_l │ │ │ │ -Grid::Traits::template Codim< 0 >::GeometryImpl GeometryImpl │ │ │ │ -DDeeffiinniittiioonn albertagrid/entity.hh:211 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_e_l_e_m_e_n_t_I_n_f_o │ │ │ │ -const ElementInfo & elementInfo() const │ │ │ │ -DDeeffiinniittiioonn albertagrid/entity.hh:355 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_E_n_t_i_t_y_<_ _0_,_ _d_i_m_,_ _G_r_i_d_ _>_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y │ │ │ │ -Grid::template Codim< 0 >::LocalGeometry LocalGeometry │ │ │ │ -DDeeffiinniittiioonn albertagrid/entity.hh:210 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_C_o_o_r_d_i_n_a_t_e_R_e_a_d_e_r │ │ │ │ -DDeeffiinniittiioonn albertagrid/geometry.hh:30 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_o_c_a_l_G_e_o_m_e_t_r_y_P_r_o_v_i_d_e_r │ │ │ │ -DDeeffiinniittiioonn albertagrid/geometry.hh:504 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_:_B_e_g_i_n │ │ │ │ -DDeeffiinniittiioonn albertagrid/intersectioniterator.hh:35 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_:_E_n_d │ │ │ │ -DDeeffiinniittiioonn albertagrid/intersectioniterator.hh:36 │ │ │ │ -_D_u_n_e_:_:_G_r_i_d │ │ │ │ -Grid abstract base class. │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:375 │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_:_:_C_o_d_i_m │ │ │ │ -A Traits struct that collects all associated types of one implementation. │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:411 │ │ │ │ +DDeeffiinniittiioonn 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/a00686.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: elementinfo.hh File Reference │ │ │ +dune-grid: elementinfo.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,41 +70,24 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -Classes | │ │ │ Namespaces
│ │ │ -
elementinfo.hh File Reference
│ │ │ +
elementinfo.cc File Reference
│ │ │
│ │ │
│ │ │ │ │ │

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

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

Go to the source code of this file.

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

│ │ │ -Classes

class  Dune::Alberta::ElementInfo< dim >
 
struct  Dune::Alberta::ElementInfo< dim >::Instance
 
class  Dune::Alberta::ElementInfo< dim >::Stack
 
struct  Dune::Alberta::ElementInfo< dim >::Seed
 
│ │ │ +
#include <dune/grid/albertagrid/elementinfo.hh>
│ │ │ +#include <dune/grid/albertagrid/meshpointer.hh>
│ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,32 +1,19 @@ │ │ │ │ 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 │ │ │ │ -elementinfo.hh File Reference │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ +elementinfo.cc File Reference │ │ │ │ provides a wrapper for ALBERTA's el_info structure _M_o_r_e_._._. │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_g_e_o_m_e_t_r_y_c_a_c_h_e_._h_h> │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_a_c_r_o_e_l_e_m_e_n_t_._h_h> │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ - class   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _> │ │ │ │ -  │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_I_n_s_t_a_n_c_e │ │ │ │ -  │ │ │ │ - class   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_S_t_a_c_k │ │ │ │ -  │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_I_n_f_o_<_ _d_i_m_ _>_:_:_S_e_e_d │ │ │ │ -  │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_e_l_e_m_e_n_t_i_n_f_o_._h_h> │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_e_s_h_p_o_i_n_t_e_r_._h_h> │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │   Include standard header files. │ │ │ │   │ │ │ │ namespace   _D_u_n_e_:_:_A_l_b_e_r_t_a │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00689.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: elementinfo.cc File Reference │ │ │ +dune-grid: dofadmin.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,35 +70,41 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ +Classes | │ │ │ Namespaces
│ │ │ -
elementinfo.cc File Reference
│ │ │ +
dofadmin.hh File Reference
│ │ │
│ │ │
│ │ │ - │ │ │ -

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

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

│ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::Alberta
 
│ │ │ +
#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::Alberta::DofAccess< dim, codim >
 
class  Dune::Alberta::HierarchyDofNumbering< dim >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

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

Detailed Description

│ │ │ -

provides a wrapper for ALBERTA's el_info structure

│ │ │ -
Author
Martin Nolte
│ │ │ -
│ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,24 +1,27 @@ │ │ │ │ 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 │ │ │ │ -elementinfo.cc File Reference │ │ │ │ -provides a wrapper for ALBERTA's el_info structure _M_o_r_e_._._. │ │ │ │ +_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> │ │ │ │ #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_:_:_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 │ │ │ │   │ │ │ │ -********** 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/a00692.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dofvector.hh File Reference │ │ │ +dune-grid: misc.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,58 +72,186 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces | │ │ │ -Functions
│ │ │ -
dofvector.hh File Reference
│ │ │ +Macros | │ │ │ +Typedefs | │ │ │ +Functions | │ │ │ +Variables
│ │ │ +
misc.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 <cassert>
│ │ │ +#include <utility>
│ │ │ +#include <dune/common/exceptions.hh>
│ │ │ +#include <dune/common/hybridutilities.hh>
│ │ │ +#include <dune/common/typetraits.hh>
│ │ │ +#include <dune/grid/albertagrid/albertaheader.hh>
│ │ │
│ │ │

Go to the source code of this file.

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

│ │ │ Classes

struct  Dune::Alberta::DofVectorProvider< int >
class  Dune::AlbertaError
 
struct  Dune::Alberta::DofVectorProvider< signed char >
class  Dune::AlbertaIOError
 
struct  Dune::Alberta::DofVectorProvider< unsigned char >
class  Dune::Alberta::GlobalSpace
 
struct  Dune::Alberta::DofVectorProvider< Real >
struct  Dune::Alberta::NumSubEntities< dim, 0 >
 
struct  Dune::Alberta::DofVectorProvider< GlobalVector >
struct  Dune::Alberta::NumSubEntities< dim, dim >
 
class  Dune::Alberta::DofVectorPointer< Dof >
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

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

│ │ │ +Variables

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

Macro Definition Documentation

│ │ │ + │ │ │ +

◆ DUNE_ALBERTA_CACHE_COORDINATES

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define DUNE_ALBERTA_CACHE_COORDINATES   1
│ │ │ +
│ │ │ + │ │ │ +
│ │ │ +
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,43 +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 │ │ │ │ -_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> │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s | _V_a_r_i_a_b_l_e_s │ │ │ │ +misc.hh File Reference │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_a_l_b_e_r_t_a_h_e_a_d_e_r_._h_h> │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r_<_ _i_n_t_ _> │ │ │ │ + class   _D_u_n_e_:_:_A_l_b_e_r_t_a_E_r_r_o_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_<_ _s_i_g_n_e_d_ _c_h_a_r_ _> │ │ │ │ + class   _D_u_n_e_:_:_A_l_b_e_r_t_a_I_O_E_r_r_o_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_ _> │ │ │ │ + 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_:_:_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_:_:_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_:_:_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_ _> │ │ │ │ +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_ _> │ │ │ │   │ │ │ │ - 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_ _> │ │ │ │ +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 │ │ │ │ -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) │ │ │ │ +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 │ │ │ │   │ │ │ │ - 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) │ │ │ │ +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 │ │ │ │   │ │ │ │ - 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) │ │ │ │ +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/a00692_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dofvector.hh Source File │ │ │ +dune-grid: misc.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,532 +74,870 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
dofvector.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:
│ │ │ -
5#ifndef DUNE_ALBERTA_DOFVECTOR_HH
│ │ │ -
6#define DUNE_ALBERTA_DOFVECTOR_HH
│ │ │ +
5#ifndef DUNE_ALBERTA_MISC_HH
│ │ │ +
6#define DUNE_ALBERTA_MISC_HH
│ │ │
7
│ │ │ -
8#include <cstdlib>
│ │ │ -
9#include <limits>
│ │ │ +
8#include <cassert>
│ │ │ +
9#include <utility>
│ │ │
10
│ │ │ - │ │ │ - │ │ │ - │ │ │ +
11#include <dune/common/exceptions.hh>
│ │ │ +
12#include <dune/common/hybridutilities.hh>
│ │ │ +
13#include <dune/common/typetraits.hh>
│ │ │
14
│ │ │ -
15#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
│ │ │ +
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 // ----------
│ │ │
29
│ │ │ -
30
│ │ │ -
31 // DofVectorProvider
│ │ │ -
32 // -----------------
│ │ │ +
│ │ │ + │ │ │ +
31 : public Exception
│ │ │ +
32 {};
│ │ │ +
│ │ │
33
│ │ │ -
34 template< class Dof >
│ │ │ - │ │ │ -
36
│ │ │ -
37 template<>
│ │ │ -
│ │ │ -
38 struct DofVectorProvider< int >
│ │ │ -
39 {
│ │ │ -
40 typedef ALBERTA DOF_INT_VEC DofVector;
│ │ │ -
41
│ │ │ -
│ │ │ -
42 static DofVector *get ( const DofSpace *dofSpace, const std::string &name )
│ │ │ -
43 {
│ │ │ -
44 return ALBERTA get_dof_int_vec( name.c_str(), dofSpace );
│ │ │ -
45 }
│ │ │ -
│ │ │ -
46
│ │ │ -
│ │ │ -
47 static void free ( DofVector *dofVector )
│ │ │ -
48 {
│ │ │ -
49 ALBERTA free_dof_int_vec( dofVector );
│ │ │ -
50 }
│ │ │ -
│ │ │ -
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;
│ │ │ +
│ │ │ + │ │ │ +
35 : public IOError
│ │ │ +
36 {};
│ │ │ +
│ │ │ +
37
│ │ │ +
38
│ │ │ +
39
│ │ │ +
40 namespace Alberta
│ │ │ +
41 {
│ │ │ +
42
│ │ │ +
43 // Import Types
│ │ │ +
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;
│ │ │ +
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
│ │ │ -
│ │ │ -
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 }
│ │ │ +
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 }
│ │ │
│ │ │ -
78
│ │ │ +
77
│ │ │ +
78 template< class Data >
│ │ │
│ │ │ -
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 }
│ │ │ +
79 inline Data *memCAlloc ( size_t size )
│ │ │ +
80 {
│ │ │ +
81 return MEM_CALLOC( size, Data );
│ │ │ +
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 }
│ │ │ +
84 template< class Data >
│ │ │ +
│ │ │ +
85 inline Data *memReAlloc ( Data *ptr, size_t oldSize, size_t newSize )
│ │ │ +
86 {
│ │ │ +
87 return MEM_REALLOC( ptr, oldSize, newSize, Data );
│ │ │ +
88 }
│ │ │ +
│ │ │ +
89
│ │ │ +
90 template< class Data >
│ │ │ +
│ │ │ +
91 inline void memFree ( Data *ptr, size_t size )
│ │ │ +
92 {
│ │ │ +
93 return MEM_FREE( ptr, size, Data );
│ │ │ +
94 }
│ │ │
│ │ │ +
95
│ │ │ +
96
│ │ │ +
97
│ │ │ +
98 // GlobalSpace
│ │ │ +
99 // -----------
│ │ │
100
│ │ │ -
│ │ │ -
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;
│ │ │ +
│ │ │ + │ │ │ +
102 {
│ │ │ +
103 typedef GlobalSpace This;
│ │ │ +
104
│ │ │ +
105 public:
│ │ │ + │ │ │ + │ │ │ +
108
│ │ │ +
109 private:
│ │ │ +
110 Matrix identityMatrix_;
│ │ │ +
111 Vector nullVector_;
│ │ │ +
112
│ │ │ +
113 GlobalSpace ()
│ │ │ +
114 {
│ │ │ +
115 for( int i = 0; i < dimWorld; ++i )
│ │ │ +
116 {
│ │ │ +
117 for( int j = 0; j < dimWorld; ++j )
│ │ │ +
118 identityMatrix_[ i ][ j ] = Real( 0 );
│ │ │ +
119 identityMatrix_[ i ][ i ] = Real( 1 );
│ │ │ +
120 nullVector_[ i ] = Real( 0 );
│ │ │ +
121 }
│ │ │ +
122 }
│ │ │ +
123
│ │ │ +
124 static This &instance ()
│ │ │ +
125 {
│ │ │ +
126 static This theInstance;
│ │ │ +
127 return theInstance;
│ │ │ +
128 }
│ │ │ +
129
│ │ │ +
130 public:
│ │ │ +
│ │ │ +
131 static const Matrix &identityMatrix ()
│ │ │ +
132 {
│ │ │ +
133 return instance().identityMatrix_;
│ │ │ +
134 }
│ │ │ +
│ │ │ +
135
│ │ │ +
│ │ │ +
136 static const Vector &nullVector ()
│ │ │ +
137 {
│ │ │ +
138 return instance().nullVector_;
│ │ │ +
139 }
│ │ │ +
│ │ │ +
140 };
│ │ │ +
│ │ │ +
141
│ │ │ +
142
│ │ │ +
143
│ │ │ +
144 // NumSubEntities
│ │ │ +
145 // --------------
│ │ │ +
146
│ │ │ +
147 template< int dim, int codim >
│ │ │ + │ │ │
149
│ │ │ -
│ │ │ -
150 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 }
│ │ │ +
150 template< int dim >
│ │ │ +
│ │ │ +
151 struct NumSubEntities< dim, 0 >
│ │ │ +
152 {
│ │ │ +
153 static const int value = 1;
│ │ │ +
154 };
│ │ │ +
│ │ │ +
155
│ │ │ +
156 template< int dim >
│ │ │ +
│ │ │ +
157 struct NumSubEntities< dim, dim >
│ │ │ +
158 {
│ │ │ +
159 static const int value = dim+1;
│ │ │ +
160 };
│ │ │ +
│ │ │ +
161
│ │ │ +
162 template<>
│ │ │ +
│ │ │ +
163 struct NumSubEntities< 0, 0 >
│ │ │ +
164 {
│ │ │ +
165 static const int value = 1;
│ │ │ +
166 };
│ │ │ +
│ │ │ +
167
│ │ │ +
168 template<>
│ │ │ +
│ │ │ +
169 struct NumSubEntities< 2, 1 >
│ │ │ +
170 {
│ │ │ +
171 static const int value = 3;
│ │ │ +
172 };
│ │ │
│ │ │ -
170 };
│ │ │ -
│ │ │ -
171
│ │ │ -
172
│ │ │
173
│ │ │ -
174 // DofVectorPointer
│ │ │ -
175 // ----------------
│ │ │ -
176
│ │ │ -
177 template< class Dof >
│ │ │ -
│ │ │ - │ │ │ -
179 {
│ │ │ - │ │ │ -
181
│ │ │ - │ │ │ -
183
│ │ │ -
184 public:
│ │ │ -
185 typedef typename DofVectorProvider::DofVector DofVector;
│ │ │ +
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 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 {}
│ │ │ +
187
│ │ │ +
188 // CodimType
│ │ │ +
189 // ---------
│ │ │ +
190
│ │ │ +
191 template< int dim, int codim >
│ │ │ +
192 struct CodimType;
│ │ │ +
193
│ │ │ +
194 template< int dim >
│ │ │ +
│ │ │ +
195 struct CodimType< dim, 0 >
│ │ │ +
196 {
│ │ │ +
197 static const int value = CENTER;
│ │ │ +
198 };
│ │ │ +
│ │ │ +
199
│ │ │ +
200 template< int dim >
│ │ │ +
│ │ │ +
201 struct CodimType< dim, dim >
│ │ │ +
202 {
│ │ │ +
203 static const int value = VERTEX;
│ │ │ +
204 };
│ │ │
│ │ │
205
│ │ │ -
│ │ │ -
206 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 }
│ │ │ -
│ │ │ +
206 template<>
│ │ │ +
│ │ │ +
207 struct CodimType< 2, 1 >
│ │ │ +
208 {
│ │ │ +
209 static const int value = EDGE;
│ │ │ +
210 };
│ │ │ +
│ │ │ +
211
│ │ │ +
212 template<>
│ │ │ +
│ │ │ +
213 struct CodimType< 3, 1 >
│ │ │ +
214 {
│ │ │ +
215 static const int value = FACE;
│ │ │ +
216 };
│ │ │ +
│ │ │ +
217
│ │ │ +
218 template<>
│ │ │ +
│ │ │ +
219 struct CodimType< 3, 2 >
│ │ │ +
220 {
│ │ │ +
221 static const int value = EDGE;
│ │ │ +
222 };
│ │ │ +
│ │ │ +
223
│ │ │ +
224
│ │ │ +
225
│ │ │ +
226 // FillFlags
│ │ │ +
227 // ---------
│ │ │ +
228
│ │ │ +
229 template< int dim >
│ │ │ +
│ │ │ + │ │ │ +
231 {
│ │ │ +
232 typedef ALBERTA FLAGS Flags;
│ │ │ +
233
│ │ │ +
234 static const Flags nothing = FILL_NOTHING;
│ │ │
235
│ │ │ -
│ │ │ -
236 void create ( const DofSpace *dofSpace, const std::string &name = "" )
│ │ │ -
237 {
│ │ │ -
238 release();
│ │ │ -
239 dofVector_ = DofVectorProvider::get( dofSpace, name );
│ │ │ -
240 }
│ │ │ -
│ │ │ +
236 static const Flags coords = FILL_COORDS;
│ │ │ +
237
│ │ │ +
238 static const Flags neighbor = FILL_NEIGH;
│ │ │ +
239
│ │ │ +
240 static const Flags orientation = (dim == 3 ? FILL_ORIENTATION : FILL_NOTHING);
│ │ │
241
│ │ │ -
242 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 }
│ │ │ +
242 static const Flags projection = FILL_PROJECTION;
│ │ │ +
243
│ │ │ +
244 static const Flags elementType = FILL_NOTHING;
│ │ │ +
245
│ │ │ +
246 static const Flags boundaryId = FILL_MACRO_WALLS;
│ │ │ +
247
│ │ │ +
248 static const Flags nonPeriodic = FILL_NON_PERIODIC;
│ │ │ +
249
│ │ │ + │ │ │ + │ │ │ +
252
│ │ │ +
253 static const Flags standardWithCoords = all & ~nonPeriodic & ~projection;
│ │ │ +
254
│ │ │ +
255#if DUNE_ALBERTA_CACHE_COORDINATES
│ │ │ +
256 static const Flags standard = standardWithCoords & ~coords;
│ │ │ +
257#else
│ │ │ + │ │ │ +
259#endif
│ │ │ +
260 };
│ │ │
│ │ │ +
261
│ │ │
262
│ │ │ -
263 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 }
│ │ │ -
│ │ │ +
263
│ │ │ +
264 // RefinementEdge
│ │ │ +
265 // --------------
│ │ │ +
266
│ │ │ +
267 template< int dim >
│ │ │ +
│ │ │ + │ │ │ +
269 {
│ │ │ +
270 static const int value = 0;
│ │ │ +
271 };
│ │ │ +
│ │ │ +
272
│ │ │ +
273 template<>
│ │ │ +
│ │ │ +
274 struct RefinementEdge< 2 >
│ │ │ +
275 {
│ │ │ +
276 static const int value = 2;
│ │ │ +
277 };
│ │ │ +
│ │ │ +
278
│ │ │ +
279
│ │ │ +
280
│ │ │ +
281 // Dune2AlbertaNumbering
│ │ │ +
282 // ---------------------
│ │ │
283
│ │ │ -
284 template< 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 >
│ │ │ +
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( 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 )
│ │ │ +
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 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 }
│ │ │ -
│ │ │ +
317 assert( (i >= 0) && (i < NumSubEntities< dim, codim >::value) );
│ │ │ +
318 return i;
│ │ │ +
319 }
│ │ │ +
│ │ │ +
320 };
│ │ │ +
│ │ │ +
321
│ │ │ +
322 template< int dim >
│ │ │ +
│ │ │ + │ │ │ +
324 {
│ │ │ +
│ │ │ +
325 static int apply ( const int i )
│ │ │ +
326 {
│ │ │ +
327 assert( (i >= 0) && (i < NumSubEntities< dim, 1 >::value) );
│ │ │ +
328 return dim - i;
│ │ │ +
329 }
│ │ │ +
│ │ │ +
330 };
│ │ │ +
│ │ │ +
331
│ │ │ +
332 template<>
│ │ │ +
│ │ │ + │ │ │ +
334 {
│ │ │ +
│ │ │ +
335 static int apply ( const int i )
│ │ │ +
336 {
│ │ │ +
337 assert( (i >= 0) && (i < NumSubEntities< 1, 1 >::value) );
│ │ │ +
338 return i;
│ │ │ +
339 }
│ │ │ +
│ │ │ +
340 };
│ │ │ +
│ │ │ +
341
│ │ │ +
342 template<>
│ │ │ +
│ │ │ + │ │ │ +
344 {
│ │ │ +
345 static const int numSubEntities = NumSubEntities< 3, 2 >::value;
│ │ │
346
│ │ │ -
347
│ │ │ -
│ │ │ -
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
│ │ │ +
│ │ │ +
347 static int apply ( const int i )
│ │ │ +
348 {
│ │ │ +
349 assert( (i >= 0) && (i < numSubEntities) );
│ │ │ +
350 static int generic2alberta[ numSubEntities ] = { 0, 1, 3, 2, 4, 5 };
│ │ │ +
351 return generic2alberta[ i ];
│ │ │ +
352 }
│ │ │ +
│ │ │ +
353 };
│ │ │ +
│ │ │ +
354
│ │ │ +
355
│ │ │ +
356
│ │ │ +
357 // NumberingMap
│ │ │ +
358 // ------------
│ │ │
359
│ │ │ -
360} // 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
│ │ │ +
360 template< int dim, template< int, int > class Numbering = Generic2AlbertaNumbering >
│ │ │ +
│ │ │ + │ │ │ +
362 {
│ │ │ + │ │ │ +
364
│ │ │ +
365 template< int codim >
│ │ │ +
366 struct Initialize;
│ │ │ +
367
│ │ │ +
368 int *dune2alberta_[ dim+1 ];
│ │ │ +
369 int *alberta2dune_[ dim+1 ];
│ │ │ +
370 int numSubEntities_[ dim+1 ];
│ │ │ +
371
│ │ │ +
372 NumberingMap ( const This & );
│ │ │ +
373 This &operator= ( const This & );
│ │ │ +
374
│ │ │ +
375 public:
│ │ │ +
│ │ │ + │ │ │ +
377 {
│ │ │ +
378 Hybrid::forEach( std::make_index_sequence< dim+1 >{}, [ & ]( auto i ){ Initialize< i >::apply( *this ); } );
│ │ │ +
379 }
│ │ │ +
│ │ │ +
380
│ │ │ +
│ │ │ + │ │ │ +
382 {
│ │ │ +
383 for( int codim = 0; codim <= dim; ++codim )
│ │ │ +
384 {
│ │ │ +
385 delete[]( dune2alberta_[ codim ] );
│ │ │ +
386 delete[]( alberta2dune_[ codim ] );
│ │ │ +
387 }
│ │ │ +
388 }
│ │ │ +
│ │ │ +
389
│ │ │ +
│ │ │ +
390 int dune2alberta ( int codim, int i ) const
│ │ │ +
391 {
│ │ │ +
392 assert( (codim >= 0) && (codim <= dim) );
│ │ │ +
393 assert( (i >= 0) && (i < numSubEntities( codim )) );
│ │ │ +
394 return dune2alberta_[ codim ][ i ];
│ │ │ +
395 }
│ │ │ +
│ │ │ +
396
│ │ │ +
│ │ │ +
397 int alberta2dune ( int codim, int i ) const
│ │ │ +
398 {
│ │ │ +
399 assert( (codim >= 0) && (codim <= dim) );
│ │ │ +
400 assert( (i >= 0) && (i < numSubEntities( codim )) );
│ │ │ +
401 return alberta2dune_[ codim ][ i ];
│ │ │ +
402 }
│ │ │ +
│ │ │ +
403
│ │ │ +
│ │ │ +
404 int numSubEntities ( int codim ) const
│ │ │ +
405 {
│ │ │ +
406 assert( (codim >= 0) && (codim <= dim) );
│ │ │ +
407 return numSubEntities_[ codim ];
│ │ │ +
408 }
│ │ │ +
│ │ │ +
409 };
│ │ │ +
│ │ │ +
410
│ │ │ +
411
│ │ │ +
412
│ │ │ +
413 // NumberingMap::Initialize
│ │ │ +
414 // ------------------------
│ │ │ +
415
│ │ │ +
416 template< int dim, template< int, int > class Numbering >
│ │ │ +
417 template< int codim >
│ │ │ +
418 struct NumberingMap< dim, Numbering >::Initialize
│ │ │ +
419 {
│ │ │ +
420 static const int numSubEntities = NumSubEntities< dim, codim >::value;
│ │ │ +
421
│ │ │ +
422 static void apply ( NumberingMap< dim, Numbering > &map )
│ │ │ +
423 {
│ │ │ +
424 map.numSubEntities_[ codim ] = numSubEntities;
│ │ │ +
425 map.dune2alberta_[ codim ] = new int[ numSubEntities ];
│ │ │ +
426 map.alberta2dune_[ codim ] = new int[ numSubEntities ];
│ │ │ +
427
│ │ │ +
428 for( int i = 0; i < numSubEntities; ++i )
│ │ │ +
429 {
│ │ │ +
430 const int j = Numbering< dim, codim >::apply( i );
│ │ │ +
431 map.dune2alberta_[ codim ][ i ] = j;
│ │ │ +
432 map.alberta2dune_[ codim ][ j ] = i;
│ │ │ +
433 }
│ │ │ +
434 }
│ │ │ +
435 };
│ │ │ +
436
│ │ │ +
437
│ │ │ +
438
│ │ │ +
439 // MapVertices
│ │ │ +
440 // -----------
│ │ │ +
441
│ │ │ +
442 template< int dim, int codim >
│ │ │ + │ │ │ +
444
│ │ │ +
445 template< int dim >
│ │ │ +
│ │ │ +
446 struct MapVertices< dim, 0 >
│ │ │ +
447 {
│ │ │ +
│ │ │ +
448 static int apply ( int subEntity, int vertex )
│ │ │ +
449 {
│ │ │ +
450 assert( subEntity == 0 );
│ │ │ +
451 assert( (vertex >= 0) && (vertex <= NumSubEntities< dim, dim >::value) );
│ │ │ +
452 return vertex;
│ │ │ +
453 }
│ │ │ +
│ │ │ +
454 };
│ │ │ +
│ │ │ +
455
│ │ │ +
456 template<>
│ │ │ +
│ │ │ +
457 struct MapVertices< 2, 1 >
│ │ │ +
458 {
│ │ │ +
│ │ │ +
459 static int apply ( int subEntity, int vertex )
│ │ │ +
460 {
│ │ │ +
461 assert( (subEntity >= 0) && (subEntity < 3) );
│ │ │ +
462 assert( (vertex >= 0) && (vertex < 2) );
│ │ │ +
463 //static const int map[ 3 ][ 2 ] = { {1,2}, {2,0}, {0,1} };
│ │ │ +
464 static const int map[ 3 ][ 2 ] = { {1,2}, {0,2}, {0,1} };
│ │ │ +
465 return map[ subEntity ][ vertex ];
│ │ │ +
466 }
│ │ │ +
│ │ │ +
467 };
│ │ │ +
│ │ │ +
468
│ │ │ +
469 template<>
│ │ │ +
│ │ │ +
470 struct MapVertices< 3, 1 >
│ │ │ +
471 {
│ │ │ +
│ │ │ +
472 static int apply ( int subEntity, int vertex )
│ │ │ +
473 {
│ │ │ +
474 assert( (subEntity >= 0) && (subEntity < 4) );
│ │ │ +
475 assert( (vertex >= 0) && (vertex < 3) );
│ │ │ +
476 //static const int map[ 4 ][ 3 ] = { {1,2,3}, {0,3,2}, {0,1,3}, {0,2,1} };
│ │ │ +
477 static const int map[ 4 ][ 3 ] = { {1,2,3}, {0,2,3}, {0,1,3}, {0,1,2} };
│ │ │ +
478 return map[ subEntity ][ vertex ];
│ │ │ +
479 }
│ │ │ +
│ │ │ +
480 };
│ │ │ +
│ │ │ +
481
│ │ │ +
482 template<>
│ │ │ +
│ │ │ +
483 struct MapVertices< 3, 2 >
│ │ │ +
484 {
│ │ │ +
│ │ │ +
485 static int apply ( int subEntity, int vertex )
│ │ │ +
486 {
│ │ │ +
487 assert( (subEntity >= 0) && (subEntity < 6) );
│ │ │ +
488 assert( (vertex >= 0) && (vertex < 2) );
│ │ │ +
489 static const int map[ 6 ][ 2 ] = { {0,1}, {0,2}, {0,3}, {1,2}, {1,3}, {2,3} };
│ │ │ +
490 return map[ subEntity ][ vertex ];
│ │ │ +
491 }
│ │ │ +
│ │ │ +
492 };
│ │ │ +
│ │ │ +
493
│ │ │ +
494 template< int dim >
│ │ │ +
│ │ │ +
495 struct MapVertices< dim, dim >
│ │ │ +
496 {
│ │ │ +
│ │ │ +
497 static int apply ( int subEntity, int vertex )
│ │ │ +
498 {
│ │ │ +
499 assert( (subEntity >= 0) && (subEntity < NumSubEntities< dim, 1 >::value) );
│ │ │ +
500 assert( vertex == 0 );
│ │ │ +
501 return subEntity;
│ │ │ +
502 }
│ │ │ +
│ │ │ +
503 };
│ │ │ +
│ │ │ +
504
│ │ │ +
505
│ │ │ +
506
│ │ │ +
507 // Twist
│ │ │ +
508 // -----
│ │ │ +
509
│ │ │ +
510 // ******************************************************************
│ │ │ +
511 // Meaning of the twist (same as in ALU)
│ │ │ +
512 // -------------------------------------
│ │ │ +
513 //
│ │ │ +
514 // Consider a fixed ordering of the vertices v_1, ... v_n of a face
│ │ │ +
515 // (here, we assume their indices to be increasing). Denote by k the
│ │ │ +
516 // local number of a vertex v within the element and by t the twist.
│ │ │ +
517 // Then, v = v_j, where j is computed by the following formula:
│ │ │ +
518 //
│ │ │ +
519 // / (2n + 1 - k + t) % n, if t < 0
│ │ │ +
520 // j = <
│ │ │ +
521 // \ (k + t) % n, if t >= 0
│ │ │ +
522 //
│ │ │ +
523 // Note: We use the order of the 0-th vertex dof to assign the twist.
│ │ │ +
524 // This is ok for two reasons:
│ │ │ +
525 // - ALBERTA preserves the relative order of the dofs during
│ │ │ +
526 // dof compression.
│ │ │ +
527 // - ALBERTA enforces the first vertex dof admin to be periodic.
│ │ │ +
528 // ******************************************************************
│ │ │ +
529
│ │ │ +
530 template< int dim, int subdim >
│ │ │ +
│ │ │ +
531 struct Twist
│ │ │ +
532 {
│ │ │ +
533 static const int numSubEntities = NumSubEntities< dim, dim-subdim >::value;
│ │ │ +
534
│ │ │ +
535 static const int minTwist = 0;
│ │ │ +
536 static const int maxTwist = 0;
│ │ │ +
537
│ │ │ +
│ │ │ +
538 static int twist ( [[maybe_unused]] const Element *element,
│ │ │ +
539 [[maybe_unused]] int subEntity )
│ │ │ +
540 {
│ │ │ +
541 assert( (subEntity >= 0) && (subEntity < numSubEntities) );
│ │ │ +
542 return 0;
│ │ │ +
543 }
│ │ │ +
│ │ │ +
544 };
│ │ │ +
│ │ │ +
545
│ │ │ +
546 template< int dim >
│ │ │ +
│ │ │ +
547 struct Twist< dim, 1 >
│ │ │ +
548 {
│ │ │ +
549 static const int numSubEntities = NumSubEntities< dim, dim-1 >::value;
│ │ │ +
550
│ │ │ +
551 static const int minTwist = 0;
│ │ │ +
552 static const int maxTwist = 1;
│ │ │ +
553
│ │ │ +
│ │ │ +
554 static int twist ( const Element *element, int subEntity )
│ │ │ +
555 {
│ │ │ +
556 assert( (subEntity >= 0) && (subEntity < numSubEntities) );
│ │ │ +
557 const int numVertices = NumSubEntities< 1, 1 >::value;
│ │ │ +
558 int dof[ numVertices ];
│ │ │ +
559 for( int i = 0; i < numVertices; ++i )
│ │ │ +
560 {
│ │ │ +
561 const int j = MapVertices< dim, dim-1 >::apply( subEntity, i );
│ │ │ +
562 dof[ i ] = element->dof[ j ][ 0 ];
│ │ │ +
563 }
│ │ │ +
564 return (dof[ 0 ] < dof[ 1 ] ? 0 : 1);
│ │ │ +
565 }
│ │ │ +
│ │ │ +
566 };
│ │ │ +
│ │ │ +
567
│ │ │ +
568
│ │ │ +
569 template<>
│ │ │ +
│ │ │ +
570 struct Twist< 1, 1 >
│ │ │ +
571 {
│ │ │ +
572 static const int minTwist = 0;
│ │ │ +
573 static const int maxTwist = 0;
│ │ │ +
574
│ │ │ +
│ │ │ +
575 static int twist ( [[maybe_unused]] const Element *element,
│ │ │ +
576 [[maybe_unused]] int subEntity )
│ │ │ +
577 {
│ │ │ +
578 assert( subEntity == 0 );
│ │ │ +
579 return 0;
│ │ │ +
580 }
│ │ │ +
│ │ │ +
581 };
│ │ │ +
│ │ │ +
582
│ │ │ +
583
│ │ │ +
584 template< int dim >
│ │ │ +
│ │ │ +
585 struct Twist< dim, 2 >
│ │ │ +
586 {
│ │ │ +
587 static const int numSubEntities = NumSubEntities< dim, dim-2 >::value;
│ │ │ +
588
│ │ │ +
589 static const int minTwist = -3;
│ │ │ +
590 static const int maxTwist = 2;
│ │ │ +
591
│ │ │ +
│ │ │ +
592 static int twist ( const Element *element, int subEntity )
│ │ │ +
593 {
│ │ │ +
594 assert( (subEntity >= 0) && (subEntity < numSubEntities) );
│ │ │ +
595 const int numVertices = NumSubEntities< 2, 2 >::value;
│ │ │ +
596 int dof[ numVertices ];
│ │ │ +
597 for( int i = 0; i < numVertices; ++i )
│ │ │ +
598 {
│ │ │ +
599 const int j = MapVertices< dim, dim-2 >::apply( subEntity, i );
│ │ │ +
600 dof[ i ] = element->dof[ j ][ 0 ];
│ │ │ +
601 }
│ │ │ +
602
│ │ │ +
603 const int twist[ 8 ] = { -2, 1, 666, -1, 2, 666, -3, 0 };
│ │ │ +
604 const int k = int( dof[ 0 ] < dof[ 1 ] )
│ │ │ +
605 | (int( dof[ 0 ] < dof[ 2 ] ) << 1)
│ │ │ +
606 | (int( dof[ 1 ] < dof[ 2 ] ) << 2);
│ │ │ +
607 assert( twist[ k ] != 666 );
│ │ │ +
608 return twist[ k ];
│ │ │ +
609 }
│ │ │ +
│ │ │ +
610 };
│ │ │ +
│ │ │ +
611
│ │ │ +
612
│ │ │ +
613 template<>
│ │ │ +
│ │ │ +
614 struct Twist< 2, 2 >
│ │ │ +
615 {
│ │ │ +
616 static const int minTwist = 0;
│ │ │ +
617 static const int maxTwist = 0;
│ │ │ +
618
│ │ │ +
│ │ │ +
619 static int twist ( [[maybe_unused]] const Element *element,
│ │ │ +
620 [[maybe_unused]] int subEntity )
│ │ │ +
621 {
│ │ │ +
622 assert( subEntity == 0 );
│ │ │ +
623 return 0;
│ │ │ +
624 }
│ │ │ +
│ │ │ +
625 };
│ │ │ +
│ │ │ +
626
│ │ │ +
627
│ │ │ +
628
│ │ │ +
629 template< int dim >
│ │ │ +
│ │ │ +
630 inline int applyTwist ( int twist, int i )
│ │ │ +
631 {
│ │ │ +
632 const int numCorners = NumSubEntities< dim, dim >::value;
│ │ │ +
633 return (twist < 0 ? (2*numCorners + 1 - i + twist) : i + twist) % numCorners;
│ │ │ +
634 }
│ │ │ +
│ │ │ +
635
│ │ │ +
636 template< int dim >
│ │ │ +
│ │ │ +
637 inline int applyInverseTwist ( int twist, int i )
│ │ │ +
638 {
│ │ │ +
639 const int numCorners = NumSubEntities< dim, dim >::value;
│ │ │ +
640 return (twist < 0 ? (2*numCorners + 1 - i + twist) : numCorners + i - twist) % numCorners;
│ │ │ +
641 }
│ │ │ +
│ │ │ +
642
│ │ │ +
643 }
│ │ │ +
644
│ │ │ +
645}
│ │ │ +
646
│ │ │ +
647#endif // #if HAVE_ALBERTA
│ │ │ +
648
│ │ │ +
649#endif // #ifndef DUNE_ALBERTA_MISC_HH
│ │ │ + │ │ │ +
#define DIM_OF_WORLD
Definition albertaheader.hh:23
│ │ │ +
#define ALBERTA
Definition albertaheader.hh:29
│ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ +
int applyInverseTwist(int twist, int i)
Definition misc.hh:637
│ │ │
ALBERTA MESH Mesh
Definition misc.hh:53
│ │ │ -
void abs(const DofVectorPointer< int > &dofVector)
Definition dofvector.hh:328
│ │ │ +
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
│ │ │ -
int min(const DofVectorPointer< int > &dofVector)
Definition dofvector.hh:348
│ │ │ -
int max(const DofVectorPointer< int > &dofVector)
Definition dofvector.hh:337
│ │ │ +
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 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
│ │ │ +
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,563 +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 │ │ │ │ -dofvector.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: │ │ │ │ -5#ifndef DUNE_ALBERTA_DOFVECTOR_HH │ │ │ │ -6#define DUNE_ALBERTA_DOFVECTOR_HH │ │ │ │ +5#ifndef DUNE_ALBERTA_MISC_HH │ │ │ │ +6#define DUNE_ALBERTA_MISC_HH │ │ │ │ 7 │ │ │ │ -8#include │ │ │ │ -9#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_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> │ │ │ │ +11#include │ │ │ │ +12#include │ │ │ │ +13#include │ │ │ │ 14 │ │ │ │ -15#if HAVE_ALBERTA │ │ │ │ +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 │ │ │ │ -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 │ │ │ │ +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 // ---------- │ │ │ │ 29 │ │ │ │ -30 │ │ │ │ -31 // DofVectorProvider │ │ │ │ -32 // ----------------- │ │ │ │ +_3_0 class _A_l_b_e_r_t_a_E_r_r_o_r │ │ │ │ +31 : public Exception │ │ │ │ +32 {}; │ │ │ │ 33 │ │ │ │ -34 template< class Dof > │ │ │ │ -_3_5 struct _D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r; │ │ │ │ -36 │ │ │ │ -37 template<> │ │ │ │ -_3_8 struct _D_o_f_V_e_c_t_o_r_P_r_o_v_i_d_e_r< int > │ │ │ │ -39 { │ │ │ │ -_4_0 typedef _A_L_B_E_R_T_A DOF_INT_VEC _D_o_f_V_e_c_t_o_r; │ │ │ │ -41 │ │ │ │ -_4_2 static _D_o_f_V_e_c_t_o_r *_g_e_t ( const _D_o_f_S_p_a_c_e *dofSpace, const std::string &name ) │ │ │ │ -43 { │ │ │ │ -44 return _A_L_B_E_R_T_A get_dof_int_vec( name.c_str(), dofSpace ); │ │ │ │ -45 } │ │ │ │ -46 │ │ │ │ -_4_7 static void _f_r_e_e ( _D_o_f_V_e_c_t_o_r *dofVector ) │ │ │ │ -48 { │ │ │ │ -49 _A_L_B_E_R_T_A free_dof_int_vec( dofVector ); │ │ │ │ -50 } │ │ │ │ -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; │ │ │ │ +_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 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 │ │ │ │ +_4_8 typedef _A_L_B_E_R_T_A REAL _R_e_a_l; │ │ │ │ +_4_9 typedef _A_L_B_E_R_T_A REAL_B _L_o_c_a_l_V_e_c_t_o_r; // in barycentric coordinates │ │ │ │ +_5_0 typedef _A_L_B_E_R_T_A REAL_D _G_l_o_b_a_l_V_e_c_t_o_r; │ │ │ │ +_5_1 typedef _A_L_B_E_R_T_A REAL_DD _G_l_o_b_a_l_M_a_t_r_i_x; │ │ │ │ +_5_2 typedef _A_L_B_E_R_T_A AFF_TRAFO _A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n; │ │ │ │ +_5_3 typedef _A_L_B_E_R_T_A MESH _M_e_s_h; │ │ │ │ +_5_4 typedef _A_L_B_E_R_T_A EL _E_l_e_m_e_n_t; │ │ │ │ +55 │ │ │ │ +_5_6 static const int _m_e_s_h_R_e_f_i_n_e_d = MESH_REFINED; │ │ │ │ +_5_7 static const int _m_e_s_h_C_o_a_r_s_e_n_e_d = MESH_COARSENED; │ │ │ │ +58 │ │ │ │ +_5_9 static const int _I_n_t_e_r_i_o_r_B_o_u_n_d_a_r_y = INTERIOR; │ │ │ │ +_6_0 static const int _D_i_r_i_c_h_l_e_t_B_o_u_n_d_a_r_y = DIRICHLET; │ │ │ │ +_6_1 typedef _A_L_B_E_R_T_A BNDRY_TYPE _B_o_u_n_d_a_r_y_I_d; │ │ │ │ +62 │ │ │ │ +_6_3 typedef U_CHAR _E_l_e_m_e_n_t_T_y_p_e; │ │ │ │ +64 │ │ │ │ +_6_5 typedef _A_L_B_E_R_T_A FE_SPACE _D_o_f_S_p_a_c_e; │ │ │ │ +66 │ │ │ │ +67 │ │ │ │ 68 │ │ │ │ -_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 ) │ │ │ │ +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 _A_L_B_E_R_T_A read_dof_schar_vec_xdr( filename.c_str(), mesh, dofSpace ); │ │ │ │ +81 return MEM_CALLOC( size, Data ); │ │ │ │ 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); │ │ │ │ +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 │ │ │ │ -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; │ │ │ │ +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 │ │ │ │ -_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 } │ │ │ │ +96 │ │ │ │ +97 │ │ │ │ +98 // GlobalSpace │ │ │ │ +99 // ----------- │ │ │ │ 100 │ │ │ │ -_1_0_1 static void _f_r_e_e ( _D_o_f_V_e_c_t_o_r *dofVector ) │ │ │ │ +_1_0_1 class _G_l_o_b_a_l_S_p_a_c_e │ │ │ │ 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; │ │ │ │ +103 typedef _G_l_o_b_a_l_S_p_a_c_e _T_h_i_s; │ │ │ │ +104 │ │ │ │ +105 public: │ │ │ │ +_1_0_6 typedef _G_l_o_b_a_l_M_a_t_r_i_x _M_a_t_r_i_x; │ │ │ │ +_1_0_7 typedef _G_l_o_b_a_l_V_e_c_t_o_r _V_e_c_t_o_r; │ │ │ │ +108 │ │ │ │ +109 private: │ │ │ │ +110 _M_a_t_r_i_x identityMatrix_; │ │ │ │ +111 _V_e_c_t_o_r nullVector_; │ │ │ │ +112 │ │ │ │ +113 _G_l_o_b_a_l_S_p_a_c_e () │ │ │ │ +114 { │ │ │ │ +115 for( int i = 0; i < _d_i_m_W_o_r_l_d; ++i ) │ │ │ │ +116 { │ │ │ │ +117 for( int j = 0; j < _d_i_m_W_o_r_l_d; ++j ) │ │ │ │ +118 identityMatrix_[ i ][ j ] = _R_e_a_l( 0 ); │ │ │ │ +119 identityMatrix_[ i ][ i ] = _R_e_a_l( 1 ); │ │ │ │ +120 nullVector_[ i ] = _R_e_a_l( 0 ); │ │ │ │ +121 } │ │ │ │ +122 } │ │ │ │ +123 │ │ │ │ +124 static This &instance () │ │ │ │ +125 { │ │ │ │ +126 static This theInstance; │ │ │ │ +127 return theInstance; │ │ │ │ +128 } │ │ │ │ +129 │ │ │ │ +130 public: │ │ │ │ +_1_3_1 static const _M_a_t_r_i_x &_i_d_e_n_t_i_t_y_M_a_t_r_i_x () │ │ │ │ +132 { │ │ │ │ +133 return instance().identityMatrix_; │ │ │ │ +134 } │ │ │ │ +135 │ │ │ │ +_1_3_6 static const _V_e_c_t_o_r &_n_u_l_l_V_e_c_t_o_r () │ │ │ │ +137 { │ │ │ │ +138 return instance().nullVector_; │ │ │ │ +139 } │ │ │ │ +140 }; │ │ │ │ +141 │ │ │ │ +142 │ │ │ │ +143 │ │ │ │ +144 // NumSubEntities │ │ │ │ +145 // -------------- │ │ │ │ +146 │ │ │ │ +147 template< int dim, int codim > │ │ │ │ +_1_4_8 struct _N_u_m_S_u_b_E_n_t_i_t_i_e_s; │ │ │ │ 149 │ │ │ │ -_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 │ │ │ │ +150 template< int dim > │ │ │ │ +_1_5_1 struct _N_u_m_S_u_b_E_n_t_i_t_i_e_s< dim, 0 > │ │ │ │ +152 { │ │ │ │ +_1_5_3 static const int value = 1; │ │ │ │ +154 }; │ │ │ │ +155 │ │ │ │ +156 template< int dim > │ │ │ │ +_1_5_7 struct _N_u_m_S_u_b_E_n_t_i_t_i_e_s< dim, dim > │ │ │ │ +158 { │ │ │ │ +_1_5_9 static const int value = dim+1; │ │ │ │ +160 }; │ │ │ │ +161 │ │ │ │ +162 template<> │ │ │ │ +_1_6_3 struct _N_u_m_S_u_b_E_n_t_i_t_i_e_s< 0, 0 > │ │ │ │ +164 { │ │ │ │ +_1_6_5 static const int value = 1; │ │ │ │ +166 }; │ │ │ │ +167 │ │ │ │ +168 template<> │ │ │ │ +_1_6_9 struct _N_u_m_S_u_b_E_n_t_i_t_i_e_s< 2, 1 > │ │ │ │ +170 { │ │ │ │ +_1_7_1 static const int value = 3; │ │ │ │ +172 }; │ │ │ │ 173 │ │ │ │ -174 // 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; │ │ │ │ +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 │ │ │ │ -_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 {} │ │ │ │ +187 │ │ │ │ +188 // CodimType │ │ │ │ +189 // --------- │ │ │ │ +190 │ │ │ │ +191 template< int dim, int codim > │ │ │ │ +_1_9_2 struct _C_o_d_i_m_T_y_p_e; │ │ │ │ +193 │ │ │ │ +194 template< int dim > │ │ │ │ +_1_9_5 struct _C_o_d_i_m_T_y_p_e< dim, 0 > │ │ │ │ +196 { │ │ │ │ +_1_9_7 static const int value = CENTER; │ │ │ │ +198 }; │ │ │ │ +199 │ │ │ │ +200 template< int dim > │ │ │ │ +_2_0_1 struct _C_o_d_i_m_T_y_p_e< dim, dim > │ │ │ │ +202 { │ │ │ │ +_2_0_3 static const int value = VERTEX; │ │ │ │ +204 }; │ │ │ │ 205 │ │ │ │ -_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 } │ │ │ │ +206 template<> │ │ │ │ +_2_0_7 struct _C_o_d_i_m_T_y_p_e< 2, 1 > │ │ │ │ +208 { │ │ │ │ +_2_0_9 static const int value = EDGE; │ │ │ │ +210 }; │ │ │ │ +211 │ │ │ │ +212 template<> │ │ │ │ +_2_1_3 struct _C_o_d_i_m_T_y_p_e< 3, 1 > │ │ │ │ +214 { │ │ │ │ +_2_1_5 static const int value = FACE; │ │ │ │ +216 }; │ │ │ │ +217 │ │ │ │ +218 template<> │ │ │ │ +_2_1_9 struct _C_o_d_i_m_T_y_p_e< 3, 2 > │ │ │ │ +220 { │ │ │ │ +_2_2_1 static const int value = EDGE; │ │ │ │ +222 }; │ │ │ │ +223 │ │ │ │ +224 │ │ │ │ +225 │ │ │ │ +226 // FillFlags │ │ │ │ +227 // --------- │ │ │ │ +228 │ │ │ │ +229 template< int dim > │ │ │ │ +_2_3_0 struct _F_i_l_l_F_l_a_g_s │ │ │ │ +231 { │ │ │ │ +_2_3_2 typedef _A_L_B_E_R_T_A FLAGS _F_l_a_g_s; │ │ │ │ +233 │ │ │ │ +_2_3_4 static const _F_l_a_g_s _n_o_t_h_i_n_g = FILL_NOTHING; │ │ │ │ 235 │ │ │ │ -_2_3_6 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 } │ │ │ │ +_2_3_6 static const _F_l_a_g_s _c_o_o_r_d_s = FILL_COORDS; │ │ │ │ +237 │ │ │ │ +_2_3_8 static const _F_l_a_g_s _n_e_i_g_h_b_o_r = FILL_NEIGH; │ │ │ │ +239 │ │ │ │ +_2_4_0 static const _F_l_a_g_s _o_r_i_e_n_t_a_t_i_o_n = (dim == 3 ? FILL_ORIENTATION : │ │ │ │ +FILL_NOTHING); │ │ │ │ 241 │ │ │ │ -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 } │ │ │ │ +_2_4_2 static const _F_l_a_g_s _p_r_o_j_e_c_t_i_o_n = FILL_PROJECTION; │ │ │ │ +243 │ │ │ │ +_2_4_4 static const _F_l_a_g_s _e_l_e_m_e_n_t_T_y_p_e = FILL_NOTHING; │ │ │ │ +245 │ │ │ │ +_2_4_6 static const _F_l_a_g_s _b_o_u_n_d_a_r_y_I_d = FILL_MACRO_WALLS; │ │ │ │ +247 │ │ │ │ +_2_4_8 static const _F_l_a_g_s _n_o_n_P_e_r_i_o_d_i_c = FILL_NON_PERIODIC; │ │ │ │ +249 │ │ │ │ +_2_5_0 static const _F_l_a_g_s _a_l_l = _c_o_o_r_d_s | _n_e_i_g_h_b_o_r | _b_o_u_n_d_a_r_y_I_d | _n_o_n_P_e_r_i_o_d_i_c │ │ │ │ +251 | _o_r_i_e_n_t_a_t_i_o_n | _p_r_o_j_e_c_t_i_o_n | _e_l_e_m_e_n_t_T_y_p_e; │ │ │ │ +252 │ │ │ │ +_2_5_3 static const _F_l_a_g_s _s_t_a_n_d_a_r_d_W_i_t_h_C_o_o_r_d_s = _a_l_l & ~nonPeriodic & ~projection; │ │ │ │ +254 │ │ │ │ +255#if DUNE_ALBERTA_CACHE_COORDINATES │ │ │ │ +256 static const _F_l_a_g_s _s_t_a_n_d_a_r_d = _s_t_a_n_d_a_r_d_W_i_t_h_C_o_o_r_d_s & ~coords; │ │ │ │ +257#else │ │ │ │ +_2_5_8 static const _F_l_a_g_s _s_t_a_n_d_a_r_d = _s_t_a_n_d_a_r_d_W_i_t_h_C_o_o_r_d_s; │ │ │ │ +259#endif │ │ │ │ +260 }; │ │ │ │ +261 │ │ │ │ 262 │ │ │ │ -263 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 } │ │ │ │ +263 │ │ │ │ +264 // RefinementEdge │ │ │ │ +265 // -------------- │ │ │ │ +266 │ │ │ │ +267 template< int dim > │ │ │ │ +_2_6_8 struct _R_e_f_i_n_e_m_e_n_t_E_d_g_e │ │ │ │ +269 { │ │ │ │ +_2_7_0 static const int _v_a_l_u_e = 0; │ │ │ │ +271 }; │ │ │ │ +272 │ │ │ │ +273 template<> │ │ │ │ +_2_7_4 struct _R_e_f_i_n_e_m_e_n_t_E_d_g_e< 2 > │ │ │ │ +275 { │ │ │ │ +_2_7_6 static const int _v_a_l_u_e = 2; │ │ │ │ +277 }; │ │ │ │ +278 │ │ │ │ +279 │ │ │ │ +280 │ │ │ │ +281 // Dune2AlbertaNumbering │ │ │ │ +282 // --------------------- │ │ │ │ 283 │ │ │ │ -284 template< 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 ) │ │ │ │ +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 { │ │ │ │ -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 () │ │ │ │ +_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( 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 │ │ │ │ -) │ │ │ │ +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 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 } │ │ │ │ +317 assert( (i >= 0) && (i < _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _d_i_m_,_ _c_o_d_i_m_ _>_:_:_v_a_l_u_e) ); │ │ │ │ +318 return i; │ │ │ │ +319 } │ │ │ │ +320 }; │ │ │ │ +321 │ │ │ │ +322 template< int dim > │ │ │ │ +_3_2_3 struct _G_e_n_e_r_i_c_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g< dim, 1 > │ │ │ │ +324 { │ │ │ │ +_3_2_5 static int _a_p_p_l_y ( const int i ) │ │ │ │ +326 { │ │ │ │ +327 assert( (i >= 0) && (i < _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _d_i_m_,_ _1_ _>_:_:_v_a_l_u_e) ); │ │ │ │ +328 return dim - i; │ │ │ │ +329 } │ │ │ │ +330 }; │ │ │ │ +331 │ │ │ │ +332 template<> │ │ │ │ +_3_3_3 struct _G_e_n_e_r_i_c_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g< 1, 1 > │ │ │ │ +334 { │ │ │ │ +_3_3_5 static int _a_p_p_l_y ( const int i ) │ │ │ │ +336 { │ │ │ │ +337 assert( (i >= 0) && (i < _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _1_,_ _1_ _>_:_:_v_a_l_u_e) ); │ │ │ │ +338 return i; │ │ │ │ +339 } │ │ │ │ +340 }; │ │ │ │ +341 │ │ │ │ +342 template<> │ │ │ │ +_3_4_3 struct _G_e_n_e_r_i_c_2_A_l_b_e_r_t_a_N_u_m_b_e_r_i_n_g< 3, 2 > │ │ │ │ +344 { │ │ │ │ +_3_4_5 static const int numSubEntities = _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _3_,_ _2_ _>_:_:_v_a_l_u_e; │ │ │ │ 346 │ │ │ │ -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 │ │ │ │ +_3_4_7 static int _a_p_p_l_y ( const int i ) │ │ │ │ +348 { │ │ │ │ +349 assert( (i >= 0) && (i < numSubEntities) ); │ │ │ │ +350 static int generic2alberta[ numSubEntities ] = { 0, 1, 3, 2, 4, 5 }; │ │ │ │ +351 return generic2alberta[ i ]; │ │ │ │ +352 } │ │ │ │ +353 }; │ │ │ │ +354 │ │ │ │ +355 │ │ │ │ +356 │ │ │ │ +357 // NumberingMap │ │ │ │ +358 // ------------ │ │ │ │ 359 │ │ │ │ -360} // 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 │ │ │ │ +360 template< int dim, template< int, int > class Numbering = │ │ │ │ +Generic2AlbertaNumbering > │ │ │ │ +_3_6_1 class _N_u_m_b_e_r_i_n_g_M_a_p │ │ │ │ +362 { │ │ │ │ +363 typedef _N_u_m_b_e_r_i_n_g_M_a_p_<_ _d_i_m_,_ _N_u_m_b_e_r_i_n_g_ _> _T_h_i_s; │ │ │ │ +364 │ │ │ │ +365 template< int codim > │ │ │ │ +366 struct Initialize; │ │ │ │ +367 │ │ │ │ +368 int *dune2alberta_[ dim+1 ]; │ │ │ │ +369 int *alberta2dune_[ dim+1 ]; │ │ │ │ +370 int numSubEntities_[ dim+1 ]; │ │ │ │ +371 │ │ │ │ +372 _N_u_m_b_e_r_i_n_g_M_a_p ( const _T_h_i_s & ); │ │ │ │ +373 _T_h_i_s &operator= ( const _T_h_i_s & ); │ │ │ │ +374 │ │ │ │ +375 public: │ │ │ │ +_3_7_6 _N_u_m_b_e_r_i_n_g_M_a_p () │ │ │ │ +377 { │ │ │ │ +378 Hybrid::forEach( std::make_index_sequence< dim+1 >{}, [ & ]( auto i ) │ │ │ │ +{ Initialize< i >::apply( *this ); } ); │ │ │ │ +379 } │ │ │ │ +380 │ │ │ │ +_3_8_1 _~_N_u_m_b_e_r_i_n_g_M_a_p () │ │ │ │ +382 { │ │ │ │ +383 for( int codim = 0; codim <= dim; ++codim ) │ │ │ │ +384 { │ │ │ │ +385 delete[]( dune2alberta_[ codim ] ); │ │ │ │ +386 delete[]( alberta2dune_[ codim ] ); │ │ │ │ +387 } │ │ │ │ +388 } │ │ │ │ +389 │ │ │ │ +_3_9_0 int _d_u_n_e_2_a_l_b_e_r_t_a ( int codim, int i ) const │ │ │ │ +391 { │ │ │ │ +392 assert( (codim >= 0) && (codim <= dim) ); │ │ │ │ +393 assert( (i >= 0) && (i < _n_u_m_S_u_b_E_n_t_i_t_i_e_s( codim )) ); │ │ │ │ +394 return dune2alberta_[ codim ][ i ]; │ │ │ │ +395 } │ │ │ │ +396 │ │ │ │ +_3_9_7 int _a_l_b_e_r_t_a_2_d_u_n_e ( int codim, int i ) const │ │ │ │ +398 { │ │ │ │ +399 assert( (codim >= 0) && (codim <= dim) ); │ │ │ │ +400 assert( (i >= 0) && (i < _n_u_m_S_u_b_E_n_t_i_t_i_e_s( codim )) ); │ │ │ │ +401 return alberta2dune_[ codim ][ i ]; │ │ │ │ +402 } │ │ │ │ +403 │ │ │ │ +_4_0_4 int _n_u_m_S_u_b_E_n_t_i_t_i_e_s ( int codim ) const │ │ │ │ +405 { │ │ │ │ +406 assert( (codim >= 0) && (codim <= dim) ); │ │ │ │ +407 return numSubEntities_[ codim ]; │ │ │ │ +408 } │ │ │ │ +409 }; │ │ │ │ +410 │ │ │ │ +411 │ │ │ │ +412 │ │ │ │ +413 // NumberingMap::Initialize │ │ │ │ +414 // ------------------------ │ │ │ │ +415 │ │ │ │ +416 template< int dim, template< int, int > class Numbering > │ │ │ │ +417 template< int codim > │ │ │ │ +418 struct NumberingMap< dim, Numbering >::Initialize │ │ │ │ +419 { │ │ │ │ +420 static const int _n_u_m_S_u_b_E_n_t_i_t_i_e_s = NumSubEntities< dim, codim >::value; │ │ │ │ +421 │ │ │ │ +422 static void apply ( NumberingMap< dim, Numbering > &map ) │ │ │ │ +423 { │ │ │ │ +424 map.numSubEntities_[ codim ] = _n_u_m_S_u_b_E_n_t_i_t_i_e_s; │ │ │ │ +425 map.dune2alberta_[ codim ] = new int[ _n_u_m_S_u_b_E_n_t_i_t_i_e_s ]; │ │ │ │ +426 map.alberta2dune_[ codim ] = new int[ _n_u_m_S_u_b_E_n_t_i_t_i_e_s ]; │ │ │ │ +427 │ │ │ │ +428 for( int i = 0; i < _n_u_m_S_u_b_E_n_t_i_t_i_e_s; ++i ) │ │ │ │ +429 { │ │ │ │ +430 const int j = Numbering< dim, codim >::apply( i ); │ │ │ │ +431 map.dune2alberta_[ codim ][ i ] = j; │ │ │ │ +432 map.alberta2dune_[ codim ][ j ] = i; │ │ │ │ +433 } │ │ │ │ +434 } │ │ │ │ +435 }; │ │ │ │ +436 │ │ │ │ +437 │ │ │ │ +438 │ │ │ │ +439 // MapVertices │ │ │ │ +440 // ----------- │ │ │ │ +441 │ │ │ │ +442 template< int dim, int codim > │ │ │ │ +_4_4_3 struct _M_a_p_V_e_r_t_i_c_e_s; │ │ │ │ +444 │ │ │ │ +445 template< int dim > │ │ │ │ +_4_4_6 struct _M_a_p_V_e_r_t_i_c_e_s< dim, 0 > │ │ │ │ +447 { │ │ │ │ +_4_4_8 static int _a_p_p_l_y ( int subEntity, int vertex ) │ │ │ │ +449 { │ │ │ │ +450 assert( subEntity == 0 ); │ │ │ │ +451 assert( (vertex >= 0) && (vertex <= _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _d_i_m_,_ _d_i_m_ _>_:_:_v_a_l_u_e) ); │ │ │ │ +452 return vertex; │ │ │ │ +453 } │ │ │ │ +454 }; │ │ │ │ +455 │ │ │ │ +456 template<> │ │ │ │ +_4_5_7 struct _M_a_p_V_e_r_t_i_c_e_s< 2, 1 > │ │ │ │ +458 { │ │ │ │ +_4_5_9 static int _a_p_p_l_y ( int subEntity, int vertex ) │ │ │ │ +460 { │ │ │ │ +461 assert( (subEntity >= 0) && (subEntity < 3) ); │ │ │ │ +462 assert( (vertex >= 0) && (vertex < 2) ); │ │ │ │ +463 //static const int map[ 3 ][ 2 ] = { {1,2}, {2,0}, {0,1} }; │ │ │ │ +464 static const int map[ 3 ][ 2 ] = { {1,2}, {0,2}, {0,1} }; │ │ │ │ +465 return map[ subEntity ][ vertex ]; │ │ │ │ +466 } │ │ │ │ +467 }; │ │ │ │ +468 │ │ │ │ +469 template<> │ │ │ │ +_4_7_0 struct _M_a_p_V_e_r_t_i_c_e_s< 3, 1 > │ │ │ │ +471 { │ │ │ │ +_4_7_2 static int _a_p_p_l_y ( int subEntity, int vertex ) │ │ │ │ +473 { │ │ │ │ +474 assert( (subEntity >= 0) && (subEntity < 4) ); │ │ │ │ +475 assert( (vertex >= 0) && (vertex < 3) ); │ │ │ │ +476 //static const int map[ 4 ][ 3 ] = { {1,2,3}, {0,3,2}, {0,1,3}, {0,2,1} }; │ │ │ │ +477 static const int map[ 4 ][ 3 ] = { {1,2,3}, {0,2,3}, {0,1,3}, {0,1,2} }; │ │ │ │ +478 return map[ subEntity ][ vertex ]; │ │ │ │ +479 } │ │ │ │ +480 }; │ │ │ │ +481 │ │ │ │ +482 template<> │ │ │ │ +_4_8_3 struct _M_a_p_V_e_r_t_i_c_e_s< 3, 2 > │ │ │ │ +484 { │ │ │ │ +_4_8_5 static int _a_p_p_l_y ( int subEntity, int vertex ) │ │ │ │ +486 { │ │ │ │ +487 assert( (subEntity >= 0) && (subEntity < 6) ); │ │ │ │ +488 assert( (vertex >= 0) && (vertex < 2) ); │ │ │ │ +489 static const int map[ 6 ][ 2 ] = { {0,1}, {0,2}, {0,3}, {1,2}, {1,3}, {2,3} │ │ │ │ +}; │ │ │ │ +490 return map[ subEntity ][ vertex ]; │ │ │ │ +491 } │ │ │ │ +492 }; │ │ │ │ +493 │ │ │ │ +494 template< int dim > │ │ │ │ +_4_9_5 struct _M_a_p_V_e_r_t_i_c_e_s< dim, dim > │ │ │ │ +496 { │ │ │ │ +_4_9_7 static int _a_p_p_l_y ( int subEntity, int vertex ) │ │ │ │ +498 { │ │ │ │ +499 assert( (subEntity >= 0) && (subEntity < _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _d_i_m_,_ _1_ _>_:_:_v_a_l_u_e) │ │ │ │ +); │ │ │ │ +500 assert( vertex == 0 ); │ │ │ │ +501 return subEntity; │ │ │ │ +502 } │ │ │ │ +503 }; │ │ │ │ +504 │ │ │ │ +505 │ │ │ │ +506 │ │ │ │ +507 // Twist │ │ │ │ +508 // ----- │ │ │ │ +509 │ │ │ │ +510 // ****************************************************************** │ │ │ │ +511 // Meaning of the twist (same as in ALU) │ │ │ │ +512 // ------------------------------------- │ │ │ │ +513 // │ │ │ │ +514 // Consider a fixed ordering of the vertices v_1, ... v_n of a face │ │ │ │ +515 // (here, we assume their indices to be increasing). Denote by k the │ │ │ │ +516 // local number of a vertex v within the element and by t the twist. │ │ │ │ +517 // Then, v = v_j, where j is computed by the following formula: │ │ │ │ +518 // │ │ │ │ +519 // / (2n + 1 - k + t) % n, if t < 0 │ │ │ │ +520 // j = < │ │ │ │ +521 // \ (k + t) % n, if t >= 0 │ │ │ │ +522 // │ │ │ │ +523 // Note: We use the order of the 0-th vertex dof to assign the twist. │ │ │ │ +524 // This is ok for two reasons: │ │ │ │ +525 // - ALBERTA preserves the relative order of the dofs during │ │ │ │ +526 // dof compression. │ │ │ │ +527 // - ALBERTA enforces the first vertex dof admin to be periodic. │ │ │ │ +528 // ****************************************************************** │ │ │ │ +529 │ │ │ │ +530 template< int dim, int subdim > │ │ │ │ +_5_3_1 struct _T_w_i_s_t │ │ │ │ +532 { │ │ │ │ +_5_3_3 static const int _n_u_m_S_u_b_E_n_t_i_t_i_e_s = _N_u_m_S_u_b_E_n_t_i_t_i_e_s< dim, dim-subdim >::value; │ │ │ │ +534 │ │ │ │ +_5_3_5 static const int _m_i_n_T_w_i_s_t = 0; │ │ │ │ +_5_3_6 static const int _m_a_x_T_w_i_s_t = 0; │ │ │ │ +537 │ │ │ │ +_5_3_8 static int _t_w_i_s_t ( [[maybe_unused]] const _E_l_e_m_e_n_t *element, │ │ │ │ +539 [[maybe_unused]] int subEntity ) │ │ │ │ +540 { │ │ │ │ +541 assert( (subEntity >= 0) && (subEntity < _n_u_m_S_u_b_E_n_t_i_t_i_e_s) ); │ │ │ │ +542 return 0; │ │ │ │ +543 } │ │ │ │ +544 }; │ │ │ │ +545 │ │ │ │ +546 template< int dim > │ │ │ │ +_5_4_7 struct _T_w_i_s_t< dim, 1 > │ │ │ │ +548 { │ │ │ │ +_5_4_9 static const int _n_u_m_S_u_b_E_n_t_i_t_i_e_s = _N_u_m_S_u_b_E_n_t_i_t_i_e_s< dim, dim-1 >::value; │ │ │ │ +550 │ │ │ │ +_5_5_1 static const int _m_i_n_T_w_i_s_t = 0; │ │ │ │ +_5_5_2 static const int _m_a_x_T_w_i_s_t = 1; │ │ │ │ +553 │ │ │ │ +_5_5_4 static int _t_w_i_s_t ( const _E_l_e_m_e_n_t *element, int subEntity ) │ │ │ │ +555 { │ │ │ │ +556 assert( (subEntity >= 0) && (subEntity < _n_u_m_S_u_b_E_n_t_i_t_i_e_s) ); │ │ │ │ +557 const int numVertices = _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _1_,_ _1_ _>_:_:_v_a_l_u_e; │ │ │ │ +558 int dof[ numVertices ]; │ │ │ │ +559 for( int i = 0; i < numVertices; ++i ) │ │ │ │ +560 { │ │ │ │ +561 const int j = _M_a_p_V_e_r_t_i_c_e_s_<_ _d_i_m_,_ _d_i_m_-_1_ _>_:_:_a_p_p_l_y( subEntity, i ); │ │ │ │ +562 dof[ i ] = element->dof[ j ][ 0 ]; │ │ │ │ +563 } │ │ │ │ +564 return (dof[ 0 ] < dof[ 1 ] ? 0 : 1); │ │ │ │ +565 } │ │ │ │ +566 }; │ │ │ │ +567 │ │ │ │ +568 │ │ │ │ +569 template<> │ │ │ │ +_5_7_0 struct _T_w_i_s_t< 1, 1 > │ │ │ │ +571 { │ │ │ │ +_5_7_2 static const int _m_i_n_T_w_i_s_t = 0; │ │ │ │ +_5_7_3 static const int _m_a_x_T_w_i_s_t = 0; │ │ │ │ +574 │ │ │ │ +_5_7_5 static int _t_w_i_s_t ( [[maybe_unused]] const _E_l_e_m_e_n_t *element, │ │ │ │ +576 [[maybe_unused]] int subEntity ) │ │ │ │ +577 { │ │ │ │ +578 assert( subEntity == 0 ); │ │ │ │ +579 return 0; │ │ │ │ +580 } │ │ │ │ +581 }; │ │ │ │ +582 │ │ │ │ +583 │ │ │ │ +584 template< int dim > │ │ │ │ +_5_8_5 struct _T_w_i_s_t< dim, 2 > │ │ │ │ +586 { │ │ │ │ +_5_8_7 static const int _n_u_m_S_u_b_E_n_t_i_t_i_e_s = _N_u_m_S_u_b_E_n_t_i_t_i_e_s< dim, dim-2 >::value; │ │ │ │ +588 │ │ │ │ +_5_8_9 static const int _m_i_n_T_w_i_s_t = -3; │ │ │ │ +_5_9_0 static const int _m_a_x_T_w_i_s_t = 2; │ │ │ │ +591 │ │ │ │ +_5_9_2 static int _t_w_i_s_t ( const _E_l_e_m_e_n_t *element, int subEntity ) │ │ │ │ +593 { │ │ │ │ +594 assert( (subEntity >= 0) && (subEntity < _n_u_m_S_u_b_E_n_t_i_t_i_e_s) ); │ │ │ │ +595 const int numVertices = _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _2_,_ _2_ _>_:_:_v_a_l_u_e; │ │ │ │ +596 int dof[ numVertices ]; │ │ │ │ +597 for( int i = 0; i < numVertices; ++i ) │ │ │ │ +598 { │ │ │ │ +599 const int j = _M_a_p_V_e_r_t_i_c_e_s_<_ _d_i_m_,_ _d_i_m_-_2_ _>_:_:_a_p_p_l_y( subEntity, i ); │ │ │ │ +600 dof[ i ] = element->dof[ j ][ 0 ]; │ │ │ │ +601 } │ │ │ │ +602 │ │ │ │ +603 const int _t_w_i_s_t[ 8 ] = { -2, 1, 666, -1, 2, 666, -3, 0 }; │ │ │ │ +604 const int k = int( dof[ 0 ] < dof[ 1 ] ) │ │ │ │ +605 | (int( dof[ 0 ] < dof[ 2 ] ) << 1) │ │ │ │ +606 | (int( dof[ 1 ] < dof[ 2 ] ) << 2); │ │ │ │ +607 assert( _t_w_i_s_t[ k ] != 666 ); │ │ │ │ +608 return _t_w_i_s_t[ k ]; │ │ │ │ +609 } │ │ │ │ +610 }; │ │ │ │ +611 │ │ │ │ +612 │ │ │ │ +613 template<> │ │ │ │ +_6_1_4 struct _T_w_i_s_t< 2, 2 > │ │ │ │ +615 { │ │ │ │ +_6_1_6 static const int _m_i_n_T_w_i_s_t = 0; │ │ │ │ +_6_1_7 static const int _m_a_x_T_w_i_s_t = 0; │ │ │ │ +618 │ │ │ │ +_6_1_9 static int _t_w_i_s_t ( [[maybe_unused]] const _E_l_e_m_e_n_t *element, │ │ │ │ +620 [[maybe_unused]] int subEntity ) │ │ │ │ +621 { │ │ │ │ +622 assert( subEntity == 0 ); │ │ │ │ +623 return 0; │ │ │ │ +624 } │ │ │ │ +625 }; │ │ │ │ +626 │ │ │ │ +627 │ │ │ │ +628 │ │ │ │ +629 template< int dim > │ │ │ │ +_6_3_0 inline int _a_p_p_l_y_T_w_i_s_t ( int twist, int i ) │ │ │ │ +631 { │ │ │ │ +632 const int numCorners = _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _d_i_m_,_ _d_i_m_ _>_:_:_v_a_l_u_e; │ │ │ │ +633 return (twist < 0 ? (2*numCorners + 1 - i + twist) : i + twist) % │ │ │ │ +numCorners; │ │ │ │ +634 } │ │ │ │ +635 │ │ │ │ +636 template< int dim > │ │ │ │ +_6_3_7 inline int _a_p_p_l_y_I_n_v_e_r_s_e_T_w_i_s_t ( int twist, int i ) │ │ │ │ +638 { │ │ │ │ +639 const int numCorners = _N_u_m_S_u_b_E_n_t_i_t_i_e_s_<_ _d_i_m_,_ _d_i_m_ _>_:_:_v_a_l_u_e; │ │ │ │ +640 return (twist < 0 ? (2*numCorners + 1 - i + twist) : numCorners + i - │ │ │ │ +twist) % numCorners; │ │ │ │ +641 } │ │ │ │ +642 │ │ │ │ +643 } │ │ │ │ +644 │ │ │ │ +645} │ │ │ │ +646 │ │ │ │ +647#endif // #if HAVE_ALBERTA │ │ │ │ +648 │ │ │ │ +649#endif // #ifndef DUNE_ALBERTA_MISC_HH │ │ │ │ +_a_l_b_e_r_t_a_h_e_a_d_e_r_._h_h │ │ │ │ +_D_I_M___O_F___W_O_R_L_D │ │ │ │ +#define DIM_OF_WORLD │ │ │ │ +DDeeffiinniittiioonn albertaheader.hh:23 │ │ │ │ _A_L_B_E_R_T_A │ │ │ │ #define ALBERTA │ │ │ │ DDeeffiinniittiioonn albertaheader.hh:29 │ │ │ │ _D_u_n_e │ │ │ │ Include standard header files. │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_a_p_p_l_y_I_n_v_e_r_s_e_T_w_i_s_t │ │ │ │ +int applyInverseTwist(int twist, int i) │ │ │ │ +DDeeffiinniittiioonn misc.hh:637 │ │ │ │ _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_e_s_h │ │ │ │ ALBERTA MESH Mesh │ │ │ │ DDeeffiinniittiioonn misc.hh:53 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_a_b_s │ │ │ │ -void abs(const DofVectorPointer< int > &dofVector) │ │ │ │ -DDeeffiinniittiioonn dofvector.hh:328 │ │ │ │ +_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_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_:_:_m_e_m_C_A_l_l_o_c │ │ │ │ +Data * memCAlloc(size_t size) │ │ │ │ +DDeeffiinniittiioonn misc.hh:79 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_i_m_W_o_r_l_d │ │ │ │ +static const int dimWorld │ │ │ │ +DDeeffiinniittiioonn misc.hh:46 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_E_l_e_m_e_n_t_T_y_p_e │ │ │ │ +U_CHAR ElementType │ │ │ │ +DDeeffiinniittiioonn misc.hh:63 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_m_e_s_h_C_o_a_r_s_e_n_e_d │ │ │ │ +static const int meshCoarsened │ │ │ │ +DDeeffiinniittiioonn misc.hh:57 │ │ │ │ _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r │ │ │ │ ALBERTA REAL_D GlobalVector │ │ │ │ DDeeffiinniittiioonn misc.hh:50 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_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 │ │ │ │ +_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/a00695.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dofadmin.hh File Reference │ │ │ +dune-grid: albertareader.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,38 +72,34 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
dofadmin.hh File Reference
│ │ │ +
albertareader.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <utility>
│ │ │ -#include <dune/common/hybridutilities.hh>
│ │ │ -#include <dune/grid/albertagrid/misc.hh>
│ │ │ -#include <dune/grid/albertagrid/elementinfo.hh>
│ │ │ +
#include <dune/geometry/type.hh>
│ │ │ +#include <dune/grid/common/grid.hh>
│ │ │ +#include <dune/grid/common/gridfactory.hh>
│ │ │ +#include <dune/grid/albertagrid/macrodata.hh>
│ │ │
│ │ │

Go to the source code of this file.

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

│ │ │ Classes

class  Dune::Alberta::DofAccess< dim, codim >
 
class  Dune::Alberta::HierarchyDofNumbering< dim >
class  Dune::AlbertaReader< Grid >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │

│ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::Alberta
 
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── 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 │ │ │ │ -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> │ │ │ │ +albertareader.hh File Reference │ │ │ │ +#include │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_._h_h> │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_f_a_c_t_o_r_y_._h_h> │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_a_c_r_o_d_a_t_a_._h_h> │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -class   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_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_R_e_a_d_e_r_<_ _G_r_i_d_ _> │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │   Include standard header files. │ │ │ │   │ │ │ │ -namespace   _D_u_n_e_:_:_A_l_b_e_r_t_a │ │ │ │ -  │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00695_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dofadmin.hh Source File │ │ │ +dune-grid: albertareader.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,387 +74,134 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
dofadmin.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_ALBERTA_DOFADMIN_HH
│ │ │ -
6#define DUNE_ALBERTA_DOFADMIN_HH
│ │ │ +
5#ifndef DUNE_ALBERTA_ALBERTAREADER_HH
│ │ │ +
6#define DUNE_ALBERTA_ALBERTAREADER_HH
│ │ │
7
│ │ │ -
8#include <utility>
│ │ │ +
8#include <dune/geometry/type.hh>
│ │ │
9
│ │ │ -
10#include <dune/common/hybridutilities.hh>
│ │ │ -
11
│ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ +
12
│ │ │ + │ │ │
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
│ │ │ +
20 template< class Grid >
│ │ │ +
│ │ │ + │ │ │ +
22 {
│ │ │ + │ │ │ +
24
│ │ │ +
25 public:
│ │ │ + │ │ │ +
27
│ │ │ +
28 typedef typename Grid::ctype ctype;
│ │ │
29
│ │ │ -
30
│ │ │ -
31 // DofAccess
│ │ │ -
32 // ---------
│ │ │ -
33
│ │ │ -
34 template< int dim, int codim >
│ │ │ -
│ │ │ - │ │ │ -
36 {
│ │ │ -
37 static const int codimtype = CodimType< dim, codim >::value;
│ │ │ +
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 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 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
│ │ │ -
│ │ │ - │ │ │ -
provides a wrapper for ALBERTA's el_info structure
│ │ │ -
#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 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
│ │ │ +
static const int dimWorld
Definition misc.hh:46
│ │ │ +
ALBERTA REAL_D GlobalVector
Definition misc.hh:50
│ │ │ +
Definition albertareader.hh:22
│ │ │ +
Grid::ctype ctype
Definition albertareader.hh:28
│ │ │ +
static const int dimensionworld
Definition albertareader.hh:31
│ │ │ +
static const int dimension
Definition albertareader.hh:30
│ │ │ +
Dune::GridFactory< Grid > GridFactory
Definition albertareader.hh:26
│ │ │ +
AlbertaReader()
Definition albertareader.hh:45
│ │ │ +
void readGrid(const std::string &fileName, GridFactory &factory)
Definition albertareader.hh:48
│ │ │ + │ │ │ +
int ElementId[numVertices]
Definition macrodata.hh:48
│ │ │ +
void release()
release the macro data structure
Definition macrodata.hh:127
│ │ │ +
int elementCount() const
Definition macrodata.hh:68
│ │ │ +
GlobalVector & vertex(int i) const
Definition macrodata.hh:255
│ │ │ +
int vertexCount() const
Definition macrodata.hh:63
│ │ │ +
ElementId & element(int i) const
Definition macrodata.hh:246
│ │ │ +
void read(const std::string &filename, bool binary=false)
Definition macrodata.hh:413
│ │ │ +
static constexpr int dimension
The dimension of the grid.
Definition common/grid.hh:387
│ │ │ +
static constexpr int dimensionworld
The dimension of the world the grid lives in.
Definition common/grid.hh:390
│ │ │ +
ct ctype
Define type used for coordinates in grid module.
Definition common/grid.hh: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.
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,403 +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 │ │ │ │ -dofadmin.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_ALBERTA_DOFADMIN_HH │ │ │ │ -6#define DUNE_ALBERTA_DOFADMIN_HH │ │ │ │ +5#ifndef DUNE_ALBERTA_ALBERTAREADER_HH │ │ │ │ +6#define DUNE_ALBERTA_ALBERTAREADER_HH │ │ │ │ 7 │ │ │ │ -8#include │ │ │ │ +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> │ │ │ │ +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 namespace Alberta │ │ │ │ -21 { │ │ │ │ -22 │ │ │ │ -23 // External Forward Declarations │ │ │ │ -24 // ----------------------------- │ │ │ │ -25 │ │ │ │ -26 template< int dim > │ │ │ │ -27 class MeshPointer; │ │ │ │ -28 │ │ │ │ +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 │ │ │ │ -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; │ │ │ │ +_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 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 │ │ │ │ -_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 │ │ │ │ -_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 │ │ │ │ +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_:_:_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 │ │ │ │ +_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 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 │ │ │ │ +DDeeffiinniittiioonn albertareader.hh:30 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_R_e_a_d_e_r_:_:_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ +Dune::GridFactory< Grid > GridFactory │ │ │ │ +DDeeffiinniittiioonn albertareader.hh:26 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_R_e_a_d_e_r_:_:_A_l_b_e_r_t_a_R_e_a_d_e_r │ │ │ │ +AlbertaReader() │ │ │ │ +DDeeffiinniittiioonn albertareader.hh:45 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_R_e_a_d_e_r_:_:_r_e_a_d_G_r_i_d │ │ │ │ +void readGrid(const std::string &fileName, GridFactory &factory) │ │ │ │ +DDeeffiinniittiioonn albertareader.hh:48 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_<_ _d_i_m_e_n_s_i_o_n_ _> │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_<_ _d_i_m_e_n_s_i_o_n_ _>_:_:_E_l_e_m_e_n_t_I_d │ │ │ │ +int ElementId[numVertices] │ │ │ │ +DDeeffiinniittiioonn macrodata.hh:48 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_r_e_l_e_a_s_e │ │ │ │ void release() │ │ │ │ -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 │ │ │ │ +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. │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00704.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: coordcache.hh File Reference │ │ │ +dune-grid: albertagrid.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,41 +71,66 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces
│ │ │ -
coordcache.hh File Reference
│ │ │ +Namespaces | │ │ │ +Macros | │ │ │ +Functions | │ │ │ +Variables
│ │ │ +
albertagrid.cc File Reference
│ │ │ │ │ │
│ │ │ -
#include <dune/grid/albertagrid/meshpointer.hh>
│ │ │ -#include <dune/grid/albertagrid/dofadmin.hh>
│ │ │ -#include <dune/grid/albertagrid/dofvector.hh>
│ │ │ +
#include "geometry.cc"
│ │ │ +#include "entity.cc"
│ │ │ +#include "intersection.cc"
│ │ │
│ │ │

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

│ │ │ +Macros

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

│ │ │ +Functions

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

│ │ │ +Variables

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

Macro Definition Documentation

│ │ │ + │ │ │ +

◆ DUNE_ALBERTAGRID_CC

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define DUNE_ALBERTAGRID_CC
│ │ │ +
│ │ │ + │ │ │ +
│ │ │ +
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,28 +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 │ │ │ │ -coordcache.hh File Reference │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_e_s_h_p_o_i_n_t_e_r_._h_h> │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_d_o_f_a_d_m_i_n_._h_h> │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_d_o_f_v_e_c_t_o_r_._h_h> │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _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_:_:_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 │ │ │ │   │ │ │ │ +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/a00704_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: coordcache.hh Source File │ │ │ +dune-grid: albertagrid.cc Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,225 +74,799 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
coordcache.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_COORDCACHE_HH
│ │ │ -
6#define DUNE_ALBERTA_COORDCACHE_HH
│ │ │ +
5#ifndef DUNE_ALBERTAGRID_CC
│ │ │ +
6#define DUNE_ALBERTAGRID_CC
│ │ │
7
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
11
│ │ │ -
12#if HAVE_ALBERTA
│ │ │ -
13
│ │ │ -
14namespace Dune
│ │ │ -
15{
│ │ │ -
16
│ │ │ -
17 namespace Alberta
│ │ │ -
18 {
│ │ │ -
19
│ │ │ -
20 // CoordCache
│ │ │ -
21 // ----------
│ │ │ -
22
│ │ │ -
23 template< int dim >
│ │ │ -
│ │ │ - │ │ │ -
25 {
│ │ │ - │ │ │ - │ │ │ -
28
│ │ │ -
29 class LocalCaching;
│ │ │ -
30 struct Interpolation;
│ │ │ -
31
│ │ │ -
32 public:
│ │ │ -
33 static const int dimension = dim;
│ │ │ -
34
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
38
│ │ │ -
│ │ │ -
39 GlobalVector &operator() ( const Element *element, int vertex ) const
│ │ │ -
40 {
│ │ │ -
41 assert( !(!coords_) );
│ │ │ -
42 GlobalVector *array = (GlobalVector *)coords_;
│ │ │ -
43 return array[ dofAccess_( element, vertex ) ];
│ │ │ -
44 }
│ │ │ -
│ │ │ -
45
│ │ │ -
│ │ │ -
46 GlobalVector &operator() ( const ElementInfo &elementInfo, int vertex ) const
│ │ │ -
47 {
│ │ │ -
48 return (*this)( elementInfo.el(), vertex );
│ │ │ -
49 }
│ │ │ -
│ │ │ -
50
│ │ │ -
│ │ │ -
51 void create ( const DofNumbering &dofNumbering )
│ │ │ -
52 {
│ │ │ -
53 MeshPointer mesh = dofNumbering.mesh();
│ │ │ -
54 const DofSpace *dofSpace = dofNumbering.dofSpace( dimension );
│ │ │ -
55
│ │ │ -
56 coords_.create( dofSpace, "Coordinate Cache" );
│ │ │ -
57 LocalCaching localCaching( coords_ );
│ │ │ - │ │ │ -
59 coords_.template setupInterpolation< Interpolation >();
│ │ │ -
60
│ │ │ -
61 dofAccess_ = DofAccess( dofSpace );
│ │ │ -
62 }
│ │ │ -
│ │ │ -
63
│ │ │ -
│ │ │ -
64 void release ()
│ │ │ -
65 {
│ │ │ -
66 coords_.release();
│ │ │ -
67 }
│ │ │ -
│ │ │ -
68
│ │ │ -
69 private:
│ │ │ -
70 CoordVectorPointer coords_;
│ │ │ -
71 DofAccess dofAccess_;
│ │ │ -
72 };
│ │ │ -
│ │ │ -
73
│ │ │ -
74
│ │ │ +
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 // 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 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
│ │ │ -
105
│ │ │ -
106 // CoordCache::Interpolation
│ │ │ -
107 // -------------------------
│ │ │ -
108
│ │ │ -
109 template< int dim >
│ │ │ -
│ │ │ - │ │ │ -
111 {
│ │ │ -
112 static const int dimension = dim;
│ │ │ +
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
│ │ │ - │ │ │ -
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 // 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 }
│ │ │ +
114 setup();
│ │ │ +
115 hIndexSet_.create();
│ │ │ +
116
│ │ │ +
117 calcExtras();
│ │ │ +
118 }
│ │ │ +
│ │ │ +
119
│ │ │ +
120
│ │ │ +
121 template < int dim, int dimworld >
│ │ │ + │ │ │ +
│ │ │ +
123 ::AlbertaGrid ( const std::string &macroGridFileName )
│ │ │ +
124 : mesh_(),
│ │ │ +
125 maxlevel_( 0 ),
│ │ │ +
126 hIndexSet_( dofNumbering_ ),
│ │ │ +
127 idSet_( hIndexSet_ ),
│ │ │ +
128 levelIndexVec_( (size_t)MAXL, 0 ),
│ │ │ +
129 leafIndexSet_ ( 0 ),
│ │ │ +
130 sizeCache_( *this ),
│ │ │ +
131 leafMarkerVector_( dofNumbering_ ),
│ │ │ +
132 levelMarkerVector_( (size_t)MAXL, MarkerVector( dofNumbering_ ) )
│ │ │ +
133 {
│ │ │ + │ │ │ +
135
│ │ │ +
136 numBoundarySegments_ = mesh_.create( macroGridFileName );
│ │ │ +
137 if( !mesh_ )
│ │ │ +
138 {
│ │ │ + │ │ │ +
140 "Grid file '" << macroGridFileName
│ │ │ +
141 << "' is not in ALBERTA macro triangulation format." );
│ │ │ +
142 }
│ │ │ +
143
│ │ │ +
144 setup();
│ │ │ +
145 hIndexSet_.create();
│ │ │
146
│ │ │ -
147}
│ │ │ +
147 calcExtras();
│ │ │
148
│ │ │ -
149#endif // #if HAVE_ALBERTA
│ │ │ -
150
│ │ │ -
151#endif // #ifndef DUNE_ALBERTA_COORDCACHE_HH
│ │ │ -
provides a wrapper for ALBERTA's mesh structure
│ │ │ - │ │ │ - │ │ │ +
149 std::cout << typeName() << " created from macro grid file '"
│ │ │ +
150 << macroGridFileName << "'." << std::endl;
│ │ │ +
151 }
│ │ │ +
│ │ │ +
152
│ │ │ +
153
│ │ │ +
154 template< int dim, int dimworld >
│ │ │ + │ │ │ +
156 {
│ │ │ +
157 dofNumbering_.create( mesh_ );
│ │ │ +
158
│ │ │ +
159 levelProvider_.create( dofNumbering_ );
│ │ │ +
160
│ │ │ +
161#if DUNE_ALBERTA_CACHE_COORDINATES
│ │ │ +
162 coordCache_.create( dofNumbering_ );
│ │ │ +
163#endif
│ │ │ +
164 }
│ │ │ +
165
│ │ │ +
166
│ │ │ +
167 template< int dim, int dimworld >
│ │ │ +
168 inline void AlbertaGrid< dim, dimworld >::removeMesh ()
│ │ │ +
169 {
│ │ │ +
170 for( size_t i = 0; i < levelIndexVec_.size(); ++i )
│ │ │ +
171 {
│ │ │ +
172 if( levelIndexVec_[ i ] != 0 )
│ │ │ +
173 delete levelIndexVec_[ i ];
│ │ │ +
174 levelIndexVec_[ i ] = 0;
│ │ │ +
175 }
│ │ │ +
176
│ │ │ +
177 if( leafIndexSet_ != 0 )
│ │ │ +
178 delete leafIndexSet_;
│ │ │ +
179 leafIndexSet_ = 0;
│ │ │ +
180
│ │ │ +
181 // release dof vectors
│ │ │ +
182 hIndexSet_.release();
│ │ │ +
183 levelProvider_.release();
│ │ │ +
184#if DUNE_ALBERTA_CACHE_COORDINATES
│ │ │ +
185 coordCache_.release();
│ │ │ +
186#endif
│ │ │ +
187 dofNumbering_.release();
│ │ │ +
188
│ │ │ +
189 sizeCache_.reset();
│ │ │ +
190
│ │ │ +
191 mesh_.release();
│ │ │ +
192 }
│ │ │ +
193
│ │ │ +
194
│ │ │ +
195 template< int dim, int dimworld >
│ │ │ +
│ │ │ + │ │ │ +
197 {
│ │ │ +
198 removeMesh();
│ │ │ +
199 }
│ │ │ +
│ │ │ +
200
│ │ │ +
201
│ │ │ +
202 template< int dim, int dimworld >
│ │ │ +
203 template< int codim, PartitionIteratorType pitype >
│ │ │ + │ │ │ +
205 ::template Codim< codim >::template Partition<pitype>::LevelIterator
│ │ │ +
│ │ │ + │ │ │ +
207 {
│ │ │ + │ │ │ +
209 assert( level >= 0 );
│ │ │ +
210
│ │ │ +
211 if( level > maxlevel_ )
│ │ │ +
212 return lend< codim, pitype >( level );
│ │ │ +
213 MarkerVector &markerVector = levelMarkerVector_[ level ];
│ │ │ +
214
│ │ │ +
215 if( (codim > 0) && !markerVector.up2Date() )
│ │ │ +
216 markerVector.template markSubEntities< 1 >( lbegin< 0 >( level ), lend< 0 >( level ) );
│ │ │ +
217
│ │ │ +
218 return LevelIteratorImp( *this, &markerVector, level );
│ │ │ +
219 }
│ │ │ +
│ │ │ +
220
│ │ │ +
221
│ │ │ +
222 template< int dim, int dimworld >
│ │ │ +
223 template< int codim, PartitionIteratorType pitype >
│ │ │ + │ │ │ +
225 ::template Codim< codim >::template Partition< pitype >::LevelIterator
│ │ │ +
│ │ │ + │ │ │ +
227 {
│ │ │ + │ │ │ +
229 assert( level >= 0 );
│ │ │ +
230
│ │ │ +
231 return LevelIteratorImp( *this, level );
│ │ │ +
232 }
│ │ │ +
│ │ │ +
233
│ │ │ +
234
│ │ │ +
235 template< int dim, int dimworld >
│ │ │ +
236 template< int codim >
│ │ │ + │ │ │ +
238 ::template Codim< codim >::LevelIterator
│ │ │ +
│ │ │ + │ │ │ +
240 {
│ │ │ +
241 return lbegin< codim, All_Partition >( level );
│ │ │ +
242 }
│ │ │ +
│ │ │ +
243
│ │ │ +
244
│ │ │ +
245 template< int dim, int dimworld >
│ │ │ +
246 template< int codim >
│ │ │ + │ │ │ +
248 ::template Codim< codim >::LevelIterator
│ │ │ +
│ │ │ + │ │ │ +
250 {
│ │ │ +
251 return lend< codim, All_Partition >( level );
│ │ │ +
252 }
│ │ │ +
│ │ │ +
253
│ │ │ +
254
│ │ │ +
255 template< int dim, int dimworld >
│ │ │ +
256 template< int codim, PartitionIteratorType pitype >
│ │ │ + │ │ │ +
258 ::template Codim< codim >::template Partition< pitype >::LeafIterator
│ │ │ +
│ │ │ + │ │ │ +
260 {
│ │ │ + │ │ │ +
262
│ │ │ +
263 MarkerVector &markerVector = leafMarkerVector_;
│ │ │ +
│ │ │ +
264 const int firstMarkedCodim = 2;
│ │ │ +
265 if( (codim >= firstMarkedCodim) && !markerVector.up2Date() )
│ │ │ + │ │ │ +
267
│ │ │ +
268 return LeafIteratorImp( *this, &markerVector, maxlevel_ );
│ │ │ +
269 }
│ │ │ +
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 {
│ │ │ + │ │ │ + │ │ │ +
│ │ │ +
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 // 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
│ │ │ +
│ │ │ +
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
│ │ │ +
│ │ │ + │ │ │ +
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 }
│ │ │ +
│ │ │ + │ │ │ +
434
│ │ │ +
435 template< int dim, int dimworld >
│ │ │ +
436 template< class DataHandle >
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
440 preAdapt();
│ │ │ +
441
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
446
│ │ │ + │ │ │ +
448 typename Callback::DofVectorPointer callbackVector;
│ │ │ +
449 callbackVector.create( dofNumbering_.emptyDofSpace(), "Adaptation Callback" );
│ │ │ + │ │ │ + │ │ │ +
452 if( Callback::DofVectorPointer::supportsAdaptationData )
│ │ │ +
453 callbackVector.setAdaptationData( &dataHandler );
│ │ │ +
454 else
│ │ │ +
455 Alberta::adaptationDataHandler_ = &dataHandler;
│ │ │ +
456
│ │ │ +
457 bool refined = adapt();
│ │ │ +
458
│ │ │ +
459 if( !Callback::DofVectorPointer::supportsAdaptationData )
│ │ │ +
460 Alberta::adaptationDataHandler_ = 0;
│ │ │ +
461 callbackVector.release();
│ │ │ +
462
│ │ │ +
463 postAdapt();
│ │ │ +
464 return refined;
│ │ │ +
465 }
│ │ │ +
466
│ │ │ +
467
│ │ │ +
468 template< int dim, int dimworld >
│ │ │ +
469 inline const Alberta::GlobalVector &
│ │ │ + │ │ │ +
│ │ │ +
471 ::getCoord ( const ElementInfo &elementInfo, int vertex ) const
│ │ │ +
472 {
│ │ │ +
473 assert( (vertex >= 0) && (vertex <= dim) );
│ │ │ +
474#if DUNE_ALBERTA_CACHE_COORDINATES
│ │ │ +
475 return coordCache_( elementInfo, vertex );
│ │ │ +
476#else
│ │ │ +
477 return elementInfo.coordinate( vertex );
│ │ │ +
478#endif
│ │ │ +
479 }
│ │ │ +
│ │ │ +
480
│ │ │ +
481
│ │ │ +
482 template < int dim, int dimworld >
│ │ │ +
│ │ │ + │ │ │ +
484 {
│ │ │ +
485 return maxlevel_;
│ │ │ +
486 }
│ │ │ +
│ │ │ +
487
│ │ │ +
488
│ │ │ +
489 template< int dim, int dimworld >
│ │ │ +
│ │ │ +
490 inline int AlbertaGrid< dim, dimworld >::size ( int level, int codim ) const
│ │ │ +
491 {
│ │ │ +
492 return ((level >= 0) && (level <= maxlevel_) ? sizeCache_.size( level, codim ) : 0);
│ │ │ +
493 }
│ │ │ +
│ │ │ +
494
│ │ │ +
495
│ │ │ +
496 template< int dim, int dimworld >
│ │ │ +
│ │ │ +
497 inline int AlbertaGrid< dim, dimworld >::size ( int level, GeometryType type ) const
│ │ │ +
498 {
│ │ │ +
499 return ((level >= 0) && (level <= maxlevel_) ? sizeCache_.size( level, type ) : 0);
│ │ │ +
500 }
│ │ │ +
│ │ │ +
501
│ │ │ +
502
│ │ │ +
503 template< int dim, int dimworld >
│ │ │ +
│ │ │ +
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
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ -
ALBERTA EL Element
Definition misc.hh:54
│ │ │ -
ALBERTA FE_SPACE DofSpace
Definition misc.hh:65
│ │ │ +
static void checkAlbertaDimensions()
Definition albertagrid.cc:29
│ │ │
static const int dimWorld
Definition misc.hh:46
│ │ │ +
static void * adaptationDataHandler_
Definition albertagrid.cc:24
│ │ │
ALBERTA REAL_D GlobalVector
Definition misc.hh:50
│ │ │ -
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
│ │ │ +
[ 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
│ │ │ +
Definition dofvector.hh:179
│ │ │ │ │ │
const GlobalVector & coordinate(int vertex) const
Definition elementinfo.hh:685
│ │ │ -
Element * el() const
Definition elementinfo.hh:737
│ │ │ -
Definition misc.hh:231
│ │ │ +
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
│ │ │ +
Definition misc.hh:32
│ │ │ +
Definition misc.hh:36
│ │ │ +
Definition albertagrid/projection.hh:80
│ │ │ +
Definition albertagrid/projection.hh:163
│ │ │
Definition refinement.hh:40
│ │ │ +
marker assigning subentities to one element containing them
Definition treeiterator.hh:35
│ │ │ +
A Traits struct that collects all associated types of one implementation.
Definition common/grid.hh:411
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,259 +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 │ │ │ │ -coordcache.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_COORDCACHE_HH │ │ │ │ -6#define DUNE_ALBERTA_COORDCACHE_HH │ │ │ │ +5#ifndef DUNE_ALBERTAGRID_CC │ │ │ │ +_6#define DUNE_ALBERTAGRID_CC │ │ │ │ 7 │ │ │ │ -8#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_e_s_h_p_o_i_n_t_e_r_._h_h> │ │ │ │ -9#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_d_o_f_a_d_m_i_n_._h_h> │ │ │ │ -10#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_d_o_f_v_e_c_t_o_r_._h_h> │ │ │ │ -11 │ │ │ │ -12#if HAVE_ALBERTA │ │ │ │ -13 │ │ │ │ -14namespace _D_u_n_e │ │ │ │ -15{ │ │ │ │ -16 │ │ │ │ -17 namespace Alberta │ │ │ │ -18 { │ │ │ │ -19 │ │ │ │ -20 // CoordCache │ │ │ │ -21 // ---------- │ │ │ │ -22 │ │ │ │ -23 template< int dim > │ │ │ │ -_2_4 class _C_o_o_r_d_C_a_c_h_e │ │ │ │ -25 { │ │ │ │ -26 typedef _D_o_f_V_e_c_t_o_r_P_o_i_n_t_e_r_<_ _G_l_o_b_a_l_V_e_c_t_o_r_ _> _C_o_o_r_d_V_e_c_t_o_r_P_o_i_n_t_e_r; │ │ │ │ -27 typedef _A_l_b_e_r_t_a_:_:_D_o_f_A_c_c_e_s_s_<_ _d_i_m_,_ _d_i_m_ _> _D_o_f_A_c_c_e_s_s; │ │ │ │ -28 │ │ │ │ -29 class _L_o_c_a_l_C_a_c_h_i_n_g; │ │ │ │ -30 struct _I_n_t_e_r_p_o_l_a_t_i_o_n; │ │ │ │ -31 │ │ │ │ -32 public: │ │ │ │ -_3_3 static const int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ -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 ); │ │ │ │ -55 │ │ │ │ -56 coords_._c_r_e_a_t_e( dofSpace, "Coordinate Cache" ); │ │ │ │ -57 _L_o_c_a_l_C_a_c_h_i_n_g localCaching( coords_ ); │ │ │ │ -58 mesh._h_i_e_r_a_r_c_h_i_c_T_r_a_v_e_r_s_e( localCaching, _F_i_l_l_F_l_a_g_s_<_ _d_i_m_e_n_s_i_o_n_ _>_:_:_c_o_o_r_d_s ); │ │ │ │ -59 coords_.template setupInterpolation< Interpolation >(); │ │ │ │ -60 │ │ │ │ -61 dofAccess_ = _D_o_f_A_c_c_e_s_s( dofSpace ); │ │ │ │ -62 } │ │ │ │ -63 │ │ │ │ -_6_4 void _r_e_l_e_a_s_e () │ │ │ │ -65 { │ │ │ │ -66 coords_._r_e_l_e_a_s_e(); │ │ │ │ -67 } │ │ │ │ -68 │ │ │ │ -69 private: │ │ │ │ -70 CoordVectorPointer coords_; │ │ │ │ -71 _D_o_f_A_c_c_e_s_s dofAccess_; │ │ │ │ -72 }; │ │ │ │ -73 │ │ │ │ -74 │ │ │ │ +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 // 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 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 │ │ │ │ -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; │ │ │ │ +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 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 // 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 } │ │ │ │ +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 │ │ │ │ -145 } │ │ │ │ +143 │ │ │ │ +144 setup(); │ │ │ │ +145 hIndexSet_._c_r_e_a_t_e(); │ │ │ │ 146 │ │ │ │ -147} │ │ │ │ +147 calcExtras(); │ │ │ │ 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_v_e_c_t_o_r_._h_h │ │ │ │ -_d_o_f_a_d_m_i_n_._h_h │ │ │ │ +149 std::cout << _t_y_p_e_N_a_m_e() << " created from macro grid file '" │ │ │ │ +150 << _m_a_c_r_o_G_r_i_d_F_i_l_e_N_a_m_e << "'." << std::endl; │ │ │ │ +151 } │ │ │ │ +152 │ │ │ │ +153 │ │ │ │ +154 template< int dim, int dimworld > │ │ │ │ +155 inline void _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_s_e_t_u_p () │ │ │ │ +156 { │ │ │ │ +157 dofNumbering_.create( mesh_ ); │ │ │ │ +158 │ │ │ │ +159 levelProvider_.create( dofNumbering_ ); │ │ │ │ +160 │ │ │ │ +161#if DUNE_ALBERTA_CACHE_COORDINATES │ │ │ │ +162 coordCache_.create( dofNumbering_ ); │ │ │ │ +163#endif │ │ │ │ +164 } │ │ │ │ +165 │ │ │ │ +166 │ │ │ │ +167 template< int dim, int dimworld > │ │ │ │ +168 inline void AlbertaGrid< dim, dimworld >::removeMesh () │ │ │ │ +169 { │ │ │ │ +170 for( size_t i = 0; i < levelIndexVec_.size(); ++i ) │ │ │ │ +171 { │ │ │ │ +172 if( levelIndexVec_[ i ] != 0 ) │ │ │ │ +173 delete levelIndexVec_[ i ]; │ │ │ │ +174 levelIndexVec_[ i ] = 0; │ │ │ │ +175 } │ │ │ │ +176 │ │ │ │ +177 if( leafIndexSet_ != 0 ) │ │ │ │ +178 delete leafIndexSet_; │ │ │ │ +179 leafIndexSet_ = 0; │ │ │ │ +180 │ │ │ │ +181 // release dof vectors │ │ │ │ +182 hIndexSet_.release(); │ │ │ │ +183 levelProvider_.release(); │ │ │ │ +184#if DUNE_ALBERTA_CACHE_COORDINATES │ │ │ │ +185 coordCache_.release(); │ │ │ │ +186#endif │ │ │ │ +187 dofNumbering_.release(); │ │ │ │ +188 │ │ │ │ +189 sizeCache_.reset(); │ │ │ │ +190 │ │ │ │ +191 mesh_.release(); │ │ │ │ +192 } │ │ │ │ +193 │ │ │ │ +194 │ │ │ │ +195 template< int dim, int dimworld > │ │ │ │ +_1_9_6 inline _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_~_A_l_b_e_r_t_a_G_r_i_d () │ │ │ │ +197 { │ │ │ │ +198 removeMesh(); │ │ │ │ +199 } │ │ │ │ +200 │ │ │ │ +201 │ │ │ │ +202 template< int dim, int dimworld > │ │ │ │ +203 template< int codim, PartitionIteratorType pitype > │ │ │ │ +204 inline typename _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_T_r_a_i_t_s │ │ │ │ +205 ::template Codim< codim >::template Partition::LevelIterator │ │ │ │ +_2_0_6 _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_l_b_e_g_i_n ( int level ) const │ │ │ │ +207 { │ │ │ │ +208 typedef _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _c_o_n_s_t_ _T_h_i_s_ _> │ │ │ │ +LevelIteratorImp; │ │ │ │ +209 _a_s_s_e_r_t( level >= 0 ); │ │ │ │ +210 │ │ │ │ +211 if( level > maxlevel_ ) │ │ │ │ +212 return _l_e_n_d_<_ _c_o_d_i_m_,_ _p_i_t_y_p_e_ _>( level ); │ │ │ │ +213 _M_a_r_k_e_r_V_e_c_t_o_r &_m_a_r_k_e_r_V_e_c_t_o_r = levelMarkerVector_[ level ]; │ │ │ │ +214 │ │ │ │ +215 if( (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 ); │ │ │ │ +230 │ │ │ │ +231 return LevelIteratorImp( *this, level ); │ │ │ │ +232 } │ │ │ │ +233 │ │ │ │ +234 │ │ │ │ +235 template< int dim, int dimworld > │ │ │ │ +236 template< int codim > │ │ │ │ +237 inline typename _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_T_r_a_i_t_s │ │ │ │ +238 ::template Codim< codim >::LevelIterator │ │ │ │ +_2_3_9 _A_l_b_e_r_t_a_G_r_i_d_ _<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_l_b_e_g_i_n ( int level ) const │ │ │ │ +240 { │ │ │ │ +241 return _l_b_e_g_i_n_<_ _c_o_d_i_m_,_ _A_l_l___P_a_r_t_i_t_i_o_n_ _>( level ); │ │ │ │ +242 } │ │ │ │ +243 │ │ │ │ +244 │ │ │ │ +245 template< int dim, int dimworld > │ │ │ │ +246 template< int codim > │ │ │ │ +247 inline typename _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_T_r_a_i_t_s │ │ │ │ +248 ::template Codim< codim >::LevelIterator │ │ │ │ +_2_4_9 _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_l_e_n_d ( int level ) const │ │ │ │ +250 { │ │ │ │ +251 return _l_e_n_d_<_ _c_o_d_i_m_,_ _A_l_l___P_a_r_t_i_t_i_o_n_ _>( level ); │ │ │ │ +252 } │ │ │ │ +253 │ │ │ │ +254 │ │ │ │ +255 template< int dim, int dimworld > │ │ │ │ +256 template< int codim, PartitionIteratorType pitype > │ │ │ │ +257 inline typename _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_T_r_a_i_t_s │ │ │ │ +258 ::template Codim< codim >::template Partition< pitype >::LeafIterator │ │ │ │ +_2_5_9 _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_l_e_a_f_b_e_g_i_n () const │ │ │ │ +260 { │ │ │ │ +261 typedef _A_l_b_e_r_t_a_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _c_o_n_s_t_ _T_h_i_s_ _> │ │ │ │ +LeafIteratorImp; │ │ │ │ +262 │ │ │ │ +263 _M_a_r_k_e_r_V_e_c_t_o_r &_m_a_r_k_e_r_V_e_c_t_o_r = leafMarkerVector_; │ │ │ │ +_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 } │ │ │ │ +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 template< int dim, int dimworld > │ │ │ │ +_3_0_4 inline void _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_g_l_o_b_a_l_R_e_f_i_n_e ( int refCount ) │ │ │ │ +305 { │ │ │ │ +306 typedef typename _T_r_a_i_t_s_:_:_t_e_m_p_l_a_t_e _C_o_d_i_m_<_ _0_ _>_:_:_L_e_a_f_I_t_e_r_a_t_o_r LeafIterator; │ │ │ │ +307 │ │ │ │ +308 // only MAXL levels allowed │ │ │ │ +309 _a_s_s_e_r_t( (refCount >= 0) && (refCount + maxlevel_ < MAXL) ); │ │ │ │ +310 │ │ │ │ +311 for( int i = 0; i < refCount; ++i ) │ │ │ │ +312 { │ │ │ │ +313 // mark all interior elements │ │ │ │ +314 const LeafIterator _e_n_d_i_t = _l_e_a_f_e_n_d_<_ _0_ _>(); │ │ │ │ +315 for( LeafIterator _i_t = _l_e_a_f_b_e_g_i_n_<_ _0_ _>(); _i_t != _e_n_d_i_t; ++_i_t ) │ │ │ │ +316 mark( 1, *_i_t ); │ │ │ │ +317 │ │ │ │ +318 preAdapt(); │ │ │ │ +319 adapt(); │ │ │ │ +320 postAdapt(); │ │ │ │ +321 } │ │ │ │ +322 } │ │ │ │ +323 │ │ │ │ +324 │ │ │ │ +325 template< int dim, int dimworld > │ │ │ │ +326 template< class DataHandle > │ │ │ │ +327 inline void _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _> │ │ │ │ +_3_2_8_ _:_:_g_l_o_b_a_l_R_e_f_i_n_e ( int refCount, _A_d_a_p_t_D_a_t_a_H_a_n_d_l_e_I_n_t_e_r_f_a_c_e_<_ _T_h_i_s_,_ _D_a_t_a_H_a_n_d_l_e_ _> │ │ │ │ +&_h_a_n_d_l_e ) │ │ │ │ +329 { │ │ │ │ +330 typedef typename _T_r_a_i_t_s_:_:_t_e_m_p_l_a_t_e _C_o_d_i_m_<_ _0_ _>_:_:_L_e_a_f_I_t_e_r_a_t_o_r LeafIterator; │ │ │ │ +331 │ │ │ │ +332 // only MAXL levels allowed │ │ │ │ +333 _a_s_s_e_r_t( (refCount >= 0) && (refCount + maxlevel_ < MAXL) ); │ │ │ │ +334 │ │ │ │ +335 for( int i = 0; i < refCount; ++i ) │ │ │ │ +336 { │ │ │ │ +337 // mark all interior elements │ │ │ │ +_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 │ │ │ │ +_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 │ │ │ │ +_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 │ │ │ │ +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; │ │ │ │ +465 } │ │ │ │ +466 │ │ │ │ +467 │ │ │ │ +468 template< int dim, int dimworld > │ │ │ │ +469 inline const _A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r & │ │ │ │ +470 _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _> │ │ │ │ +_4_7_1_ _:_:_g_e_t_C_o_o_r_d ( const _E_l_e_m_e_n_t_I_n_f_o &elementInfo, int vertex ) const │ │ │ │ +472 { │ │ │ │ +473 _a_s_s_e_r_t( (vertex >= 0) && (vertex <= dim) ); │ │ │ │ +474#if DUNE_ALBERTA_CACHE_COORDINATES │ │ │ │ +475 return _c_o_o_r_d_C_a_c_h_e__( elementInfo, vertex ); │ │ │ │ +476#else │ │ │ │ +477 return elementInfo._c_o_o_r_d_i_n_a_t_e( vertex ); │ │ │ │ +478#endif │ │ │ │ +479 } │ │ │ │ +480 │ │ │ │ +481 │ │ │ │ +482 template < int dim, int dimworld > │ │ │ │ +_4_8_3 inline int _A_l_b_e_r_t_a_G_r_i_d_ _<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_m_a_x_L_e_v_e_l() const │ │ │ │ +484 { │ │ │ │ +485 return maxlevel_; │ │ │ │ +486 } │ │ │ │ +487 │ │ │ │ +488 │ │ │ │ +489 template< int dim, int dimworld > │ │ │ │ +_4_9_0 inline int _A_l_b_e_r_t_a_G_r_i_d_<_ _d_i_m_,_ _d_i_m_w_o_r_l_d_ _>_:_:_s_i_z_e ( int level, int 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 │ │ │ │ +_e_n_t_i_t_y_._c_c │ │ │ │ +_i_n_t_e_r_s_e_c_t_i_o_n_._c_c │ │ │ │ +_g_e_o_m_e_t_r_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_:_:_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_:_:_c_h_e_c_k_A_l_b_e_r_t_a_D_i_m_e_n_s_i_o_n_s │ │ │ │ +static void checkAlbertaDimensions() │ │ │ │ +DDeeffiinniittiioonn albertagrid.cc:29 │ │ │ │ _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_i_m_W_o_r_l_d │ │ │ │ static const int dimWorld │ │ │ │ DDeeffiinniittiioonn misc.hh:46 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_a_d_a_p_t_a_t_i_o_n_D_a_t_a_H_a_n_d_l_e_r__ │ │ │ │ +static void * adaptationDataHandler_ │ │ │ │ +DDeeffiinniittiioonn albertagrid.cc:24 │ │ │ │ _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r │ │ │ │ ALBERTA REAL_D GlobalVector │ │ │ │ DDeeffiinniittiioonn misc.hh:50 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_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_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_:_:_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_:_:_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_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_E_r_r_o_r │ │ │ │ +DDeeffiinniittiioonn misc.hh:32 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_I_O_E_r_r_o_r │ │ │ │ +DDeeffiinniittiioonn misc.hh:36 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_r_o_j_e_c_t_i_o_n_F_a_c_t_o_r_y_I_n_t_e_r_f_a_c_e │ │ │ │ +DDeeffiinniittiioonn albertagrid/projection.hh:80 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_u_n_e_G_l_o_b_a_l_B_o_u_n_d_a_r_y_P_r_o_j_e_c_t_i_o_n_F_a_c_t_o_r_y │ │ │ │ +DDeeffiinniittiioonn albertagrid/projection.hh:163 │ │ │ │ _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_P_a_t_c_h │ │ │ │ DDeeffiinniittiioonn refinement.hh:40 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_M_a_r_k_e_r_V_e_c_t_o_r │ │ │ │ +marker assigning subentities to one element containing them │ │ │ │ +DDeeffiinniittiioonn treeiterator.hh:35 │ │ │ │ +_D_u_n_e_:_:_G_r_i_d_:_:_C_o_d_i_m │ │ │ │ +A Traits struct that collects all associated types of one implementation. │ │ │ │ +DDeeffiinniittiioonn common/grid.hh:411 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00707.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: algebra.hh File Reference │ │ │ +dune-grid: undefine-3.0.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -69,78 +69,25 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
│ │ │ -Namespaces | │ │ │ -Functions
│ │ │ -
algebra.hh File Reference
│ │ │ +
undefine-3.0.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <dune/common/fvector.hh>
│ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ -
│ │ │ + │ │ │ +

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

│ │ │ + │ │ │

Go to the source code of this file.

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

│ │ │ -Namespaces

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

│ │ │ -Functions

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

Detailed Description

│ │ │ +

Contains #undefs for all preprocessor macros defined by alberta.

│ │ │ +

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

│ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,77 +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 │ │ │ │ -_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 │ │ │ │ +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_. │ │ │ │ -NNaammeessppaacceess │ │ │ │ -namespace   _D_u_n_e │ │ │ │ -  Include standard header files. │ │ │ │ -  │ │ │ │ -namespace   _D_u_n_e_:_:_A_l_b_e_r_t_a │ │ │ │ -  │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -template │ │ │ │ -static FieldVector< K, 3 >  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_v_e_c_t_o_r_P_r_o_d_u_c_t (const FieldVector< K, │ │ │ │ - 3 > &u, const FieldVector< K, 3 > &v) │ │ │ │ -  │ │ │ │ -template │ │ │ │ - static K  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_e_t_e_r_m_i_n_a_n_t (const FieldMatrix< K, │ │ │ │ - 0, m > &matrix) │ │ │ │ -  │ │ │ │ -template │ │ │ │ - static K  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_e_t_e_r_m_i_n_a_n_t (const FieldMatrix< K, │ │ │ │ - 1, 1 > &matrix) │ │ │ │ -  │ │ │ │ -template │ │ │ │ - static K  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_e_t_e_r_m_i_n_a_n_t (const FieldMatrix< K, │ │ │ │ - 1, m > &matrix) │ │ │ │ -  │ │ │ │ -template │ │ │ │ - static K  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_e_t_e_r_m_i_n_a_n_t (const FieldMatrix< K, │ │ │ │ - 2, 2 > &matrix) │ │ │ │ -  │ │ │ │ -template │ │ │ │ - static K  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_e_t_e_r_m_i_n_a_n_t (const FieldMatrix< K, │ │ │ │ - 2, 3 > &matrix) │ │ │ │ -  │ │ │ │ -template │ │ │ │ - static K  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_e_t_e_r_m_i_n_a_n_t (const FieldMatrix< K, │ │ │ │ - 2, m > &matrix) │ │ │ │ -  │ │ │ │ -template │ │ │ │ - static K  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_e_t_e_r_m_i_n_a_n_t (const FieldMatrix< K, │ │ │ │ - 3, 3 > &matrix) │ │ │ │ -  │ │ │ │ -template │ │ │ │ - static K  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_i_n_v_e_r_t (const FieldMatrix< K, 0, m > │ │ │ │ - &matrix, FieldMatrix< K, m, 0 > &inverse) │ │ │ │ -  │ │ │ │ -template │ │ │ │ - static K  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_i_n_v_e_r_t (const FieldMatrix< K, 1, 1 > │ │ │ │ - &matrix, FieldMatrix< K, 1, 1 > &inverse) │ │ │ │ -  │ │ │ │ -template │ │ │ │ - static K  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_i_n_v_e_r_t (const FieldMatrix< K, 1, m > │ │ │ │ - &matrix, FieldMatrix< K, m, 1 > &inverse) │ │ │ │ -  │ │ │ │ -template │ │ │ │ - static K  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_i_n_v_e_r_t (const FieldMatrix< K, 2, 2 > │ │ │ │ - &matrix, FieldMatrix< K, 2, 2 > &inverse) │ │ │ │ -  │ │ │ │ -template │ │ │ │ - static K  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_i_n_v_e_r_t (const FieldMatrix< K, 2, m > │ │ │ │ - &matrix, FieldMatrix< K, m, 2 > &inverse) │ │ │ │ -  │ │ │ │ -template │ │ │ │ - static K  _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_i_n_v_e_r_t (const FieldMatrix< K, 3, 3 > │ │ │ │ - &matrix, FieldMatrix< K, 3, 3 > &inverse) │ │ │ │ -  │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ +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/a00707_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: algebra.hh Source File │ │ │ +dune-grid: undefine-3.0.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,197 +74,900 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
algebra.hh
│ │ │ +
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
│ │ │
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │
3// -*- 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
│ │ │ -
7
│ │ │ -
8#include <dune/common/fvector.hh>
│ │ │ -
9#include <dune/common/fmatrix.hh>
│ │ │ -
10
│ │ │ -
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 }
│ │ │ -
│ │ │ +
12#ifdef _ALBERTA_H_
│ │ │ +
13 #undef _ALBERTA_H_
│ │ │ +
14#endif // _ALBERTA_H_
│ │ │ +
15
│ │ │ +
16#ifdef ALBERTA_MAGIC
│ │ │ +
17 #undef ALBERTA_MAGIC
│ │ │ +
18#endif // ALBERTA_MAGIC
│ │ │ +
19
│ │ │ +
20#ifdef ALBERTA_VERSION
│ │ │ +
21 #undef ALBERTA_VERSION
│ │ │ +
22#endif // ALBERTA_VERSION
│ │ │ +
23
│ │ │ +
24#ifdef DIM_LIMIT
│ │ │ +
25 #undef DIM_LIMIT
│ │ │ +
26#endif // DIM_LIMIT
│ │ │
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
│ │ │ +
28#ifdef DIM_MAX
│ │ │ +
29 #undef DIM_MAX
│ │ │ +
30#endif // DIM_MAX
│ │ │ +
31
│ │ │ +
32#ifdef N_VERTICES
│ │ │ +
33 #undef N_VERTICES
│ │ │ +
34#endif // N_VERTICES
│ │ │ +
35
│ │ │ +
36#ifdef N_EDGES
│ │ │ +
37 #undef N_EDGES
│ │ │ +
38#endif // N_EDGES
│ │ │ +
39
│ │ │ +
40#ifdef N_WALLS
│ │ │ +
41 #undef N_WALLS
│ │ │ +
42#endif // N_WALLS
│ │ │ +
43
│ │ │ +
44#ifdef N_FACES
│ │ │ +
45 #undef N_FACES
│ │ │ +
46#endif // N_FACES
│ │ │ +
47
│ │ │ +
48#ifdef N_NEIGH
│ │ │ +
49 #undef N_NEIGH
│ │ │ +
50#endif // N_NEIGH
│ │ │ +
51
│ │ │ +
52#ifdef N_LAMBDA
│ │ │ +
53 #undef N_LAMBDA
│ │ │ +
54#endif // N_LAMBDA
│ │ │ +
55
│ │ │ +
56#ifdef DIM_FAC
│ │ │ +
57 #undef DIM_FAC
│ │ │ +
58#endif // DIM_FAC
│ │ │ +
59
│ │ │ +
60#ifdef VERTEX_OF_EDGE
│ │ │ +
61 #undef VERTEX_OF_EDGE
│ │ │ +
62#endif // VERTEX_OF_EDGE
│ │ │ +
63
│ │ │ +
64#ifdef VERTEX_OF_WALL
│ │ │ +
65 #undef VERTEX_OF_WALL
│ │ │ +
66#endif // VERTEX_OF_WALL
│ │ │ +
67
│ │ │ +
68#ifdef N_VERTICES_0D
│ │ │ +
69 #undef N_VERTICES_0D
│ │ │ +
70#endif // N_VERTICES_0D
│ │ │ +
71
│ │ │ +
72#ifdef N_EDGES_0D
│ │ │ +
73 #undef N_EDGES_0D
│ │ │ +
74#endif // N_EDGES_0D
│ │ │ +
75
│ │ │ +
76#ifdef N_FACES_0D
│ │ │ +
77 #undef N_FACES_0D
│ │ │ +
78#endif // N_FACES_0D
│ │ │
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 }
│ │ │ -
│ │ │ +
80#ifdef N_NEIGH_0D
│ │ │ +
81 #undef N_NEIGH_0D
│ │ │ +
82#endif // N_NEIGH_0D
│ │ │ +
83
│ │ │ +
84#ifdef N_WALLS_0D
│ │ │ +
85 #undef N_WALLS_0D
│ │ │ +
86#endif // N_WALLS_0D
│ │ │ +
87
│ │ │ +
88#ifdef N_LAMBDA_0D
│ │ │ +
89 #undef N_LAMBDA_0D
│ │ │ +
90#endif // N_LAMBDA_0D
│ │ │ +
91
│ │ │ +
92#ifdef DIM_FAC_0D
│ │ │ +
93 #undef DIM_FAC_0D
│ │ │ +
94#endif // DIM_FAC_0D
│ │ │ +
95
│ │ │ +
96#ifdef VERTEX_OF_EDGE_0D
│ │ │ +
97 #undef VERTEX_OF_EDGE_0D
│ │ │ +
98#endif // VERTEX_OF_EDGE_0D
│ │ │ +
99
│ │ │ +
100#ifdef VERTEX_OF_WALL_0D
│ │ │ +
101 #undef VERTEX_OF_WALL_0D
│ │ │ +
102#endif // VERTEX_OF_WALL_0D
│ │ │ +
103
│ │ │ +
104#ifdef N_VERTICES_1D
│ │ │ +
105 #undef N_VERTICES_1D
│ │ │ +
106#endif // N_VERTICES_1D
│ │ │ +
107
│ │ │ +
108#ifdef N_EDGES_1D
│ │ │ +
109 #undef N_EDGES_1D
│ │ │ +
110#endif // N_EDGES_1D
│ │ │ +
111
│ │ │ +
112#ifdef N_FACES_1D
│ │ │ +
113 #undef N_FACES_1D
│ │ │ +
114#endif // N_FACES_1D
│ │ │ +
115
│ │ │ +
116#ifdef N_NEIGH_1D
│ │ │ +
117 #undef N_NEIGH_1D
│ │ │ +
118#endif // N_NEIGH_1D
│ │ │
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}
│ │ │ +
120#ifdef N_WALLS_1D
│ │ │ +
121 #undef N_WALLS_1D
│ │ │ +
122#endif // N_WALLS_1D
│ │ │ +
123
│ │ │ +
124#ifdef N_LAMBDA_1D
│ │ │ +
125 #undef N_LAMBDA_1D
│ │ │ +
126#endif // N_LAMBDA_1D
│ │ │ +
127
│ │ │ +
128#ifdef DIM_FAC_1D
│ │ │ +
129 #undef DIM_FAC_1D
│ │ │ +
130#endif // DIM_FAC_1D
│ │ │ +
131
│ │ │ +
132#ifdef VERTEX_OF_EDGE_1D
│ │ │ +
133 #undef VERTEX_OF_EDGE_1D
│ │ │ +
134#endif // VERTEX_OF_EDGE_1D
│ │ │ +
135
│ │ │ +
136#ifdef VERTEX_OF_WALL_1D
│ │ │ +
137 #undef VERTEX_OF_WALL_1D
│ │ │ +
138#endif // VERTEX_OF_WALL_1D
│ │ │ +
139
│ │ │ +
140#ifdef N_VERTICES_2D
│ │ │ +
141 #undef N_VERTICES_2D
│ │ │ +
142#endif // N_VERTICES_2D
│ │ │ +
143
│ │ │ +
144#ifdef N_EDGES_2D
│ │ │ +
145 #undef N_EDGES_2D
│ │ │ +
146#endif // N_EDGES_2D
│ │ │
147
│ │ │ -
148#endif // #ifndef DUNE_ALBERTA_ALGEBRA_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
│ │ │ +
148#ifdef N_FACES_2D
│ │ │ +
149 #undef N_FACES_2D
│ │ │ +
150#endif // N_FACES_2D
│ │ │ +
151
│ │ │ +
152#ifdef N_NEIGH_2D
│ │ │ +
153 #undef N_NEIGH_2D
│ │ │ +
154#endif // N_NEIGH_2D
│ │ │ +
155
│ │ │ +
156#ifdef N_WALLS_2D
│ │ │ +
157 #undef N_WALLS_2D
│ │ │ +
158#endif // N_WALLS_2D
│ │ │ +
159
│ │ │ +
160#ifdef N_LAMBDA_2D
│ │ │ +
161 #undef N_LAMBDA_2D
│ │ │ +
162#endif // N_LAMBDA_2D
│ │ │ +
163
│ │ │ +
164#ifdef DIM_FAC_2D
│ │ │ +
165 #undef DIM_FAC_2D
│ │ │ +
166#endif // DIM_FAC_2D
│ │ │ +
167
│ │ │ +
168#ifdef VERTEX_OF_EDGE_2D
│ │ │ +
169 #undef VERTEX_OF_EDGE_2D
│ │ │ +
170#endif // VERTEX_OF_EDGE_2D
│ │ │ +
171
│ │ │ +
172#ifdef VERTEX_OF_WALL_2D
│ │ │ +
173 #undef VERTEX_OF_WALL_2D
│ │ │ +
174#endif // VERTEX_OF_WALL_2D
│ │ │ +
175
│ │ │ +
176#ifdef N_VERTICES_3D
│ │ │ +
177 #undef N_VERTICES_3D
│ │ │ +
178#endif // N_VERTICES_3D
│ │ │ +
179
│ │ │ +
180#ifdef N_EDGES_3D
│ │ │ +
181 #undef N_EDGES_3D
│ │ │ +
182#endif // N_EDGES_3D
│ │ │ +
183
│ │ │ +
184#ifdef N_FACES_3D
│ │ │ +
185 #undef N_FACES_3D
│ │ │ +
186#endif // N_FACES_3D
│ │ │ +
187
│ │ │ +
188#ifdef N_NEIGH_3D
│ │ │ +
189 #undef N_NEIGH_3D
│ │ │ +
190#endif // N_NEIGH_3D
│ │ │ +
191
│ │ │ +
192#ifdef N_WALLS_3D
│ │ │ +
193 #undef N_WALLS_3D
│ │ │ +
194#endif // N_WALLS_3D
│ │ │ +
195
│ │ │ +
196#ifdef N_LAMBDA_3D
│ │ │ +
197 #undef N_LAMBDA_3D
│ │ │ +
198#endif // N_LAMBDA_3D
│ │ │ +
199
│ │ │ +
200#ifdef DIM_FAC_3D
│ │ │ +
201 #undef DIM_FAC_3D
│ │ │ +
202#endif // DIM_FAC_3D
│ │ │ +
203
│ │ │ +
204#ifdef VERTEX_OF_EDGE_3D
│ │ │ +
205 #undef VERTEX_OF_EDGE_3D
│ │ │ +
206#endif // VERTEX_OF_EDGE_3D
│ │ │ +
207
│ │ │ +
208#ifdef VERTEX_OF_WALL_3D
│ │ │ +
209 #undef VERTEX_OF_WALL_3D
│ │ │ +
210#endif // VERTEX_OF_WALL_3D
│ │ │ +
211
│ │ │ +
212#ifdef N_LAMBDA_MAX
│ │ │ +
213 #undef N_LAMBDA_MAX
│ │ │ +
214#endif // N_LAMBDA_MAX
│ │ │ +
215
│ │ │ +
216#ifdef N_VERTICES_MAX
│ │ │ +
217 #undef N_VERTICES_MAX
│ │ │ +
218#endif // N_VERTICES_MAX
│ │ │ +
219
│ │ │ +
220#ifdef N_EDGES_MAX
│ │ │ +
221 #undef N_EDGES_MAX
│ │ │ +
222#endif // N_EDGES_MAX
│ │ │ +
223
│ │ │ +
224#ifdef N_FACES_MAX
│ │ │ +
225 #undef N_FACES_MAX
│ │ │ +
226#endif // N_FACES_MAX
│ │ │ +
227
│ │ │ +
228#ifdef N_NEIGH_MAX
│ │ │ +
229 #undef N_NEIGH_MAX
│ │ │ +
230#endif // N_NEIGH_MAX
│ │ │ +
231
│ │ │ +
232#ifdef N_WALLS_MAX
│ │ │ +
233 #undef N_WALLS_MAX
│ │ │ +
234#endif // N_WALLS_MAX
│ │ │ +
235
│ │ │ +
236#ifdef DIM_FAC_MAX
│ │ │ +
237 #undef DIM_FAC_MAX
│ │ │ +
238#endif // DIM_FAC_MAX
│ │ │ +
239
│ │ │ +
240#ifdef N_LAMBDA_LIMIT
│ │ │ +
241 #undef N_LAMBDA_LIMIT
│ │ │ +
242#endif // N_LAMBDA_LIMIT
│ │ │ +
243
│ │ │ +
244#ifdef N_VERTICES_LIMIT
│ │ │ +
245 #undef N_VERTICES_LIMIT
│ │ │ +
246#endif // N_VERTICES_LIMIT
│ │ │ +
247
│ │ │ +
248#ifdef N_EDGES_LIMIT
│ │ │ +
249 #undef N_EDGES_LIMIT
│ │ │ +
250#endif // N_EDGES_LIMIT
│ │ │ +
251
│ │ │ +
252#ifdef N_FACES_LIMIT
│ │ │ +
253 #undef N_FACES_LIMIT
│ │ │ +
254#endif // N_FACES_LIMIT
│ │ │ +
255
│ │ │ +
256#ifdef N_NEIGH_LIMIT
│ │ │ +
257 #undef N_NEIGH_LIMIT
│ │ │ +
258#endif // N_NEIGH_LIMIT
│ │ │ +
259
│ │ │ +
260#ifdef N_WALLS_LIMIT
│ │ │ +
261 #undef N_WALLS_LIMIT
│ │ │ +
262#endif // N_WALLS_LIMIT
│ │ │ +
263
│ │ │ +
264#ifdef DIM_FAC_LIMIT
│ │ │ +
265 #undef DIM_FAC_LIMIT
│ │ │ +
266#endif // DIM_FAC_LIMIT
│ │ │ +
267
│ │ │ +
268#ifdef INDEX
│ │ │ +
269 #undef INDEX
│ │ │ +
270#endif // INDEX
│ │ │ +
271
│ │ │ +
272#ifdef INDEX
│ │ │ +
273 #undef INDEX
│ │ │ +
274#endif // INDEX
│ │ │ +
275
│ │ │ +
276#ifdef IS_LEAF_EL
│ │ │ +
277 #undef IS_LEAF_EL
│ │ │ +
278#endif // IS_LEAF_EL
│ │ │ +
279
│ │ │ +
280#ifdef LEAF_DATA
│ │ │ +
281 #undef LEAF_DATA
│ │ │ +
282#endif // LEAF_DATA
│ │ │ +
283
│ │ │ +
284#ifdef INTERIOR
│ │ │ +
285 #undef INTERIOR
│ │ │ +
286#endif // INTERIOR
│ │ │ +
287
│ │ │ +
288#ifdef DIRICHLET
│ │ │ +
289 #undef DIRICHLET
│ │ │ +
290#endif // DIRICHLET
│ │ │ +
291
│ │ │ +
292#ifdef NEUMANN
│ │ │ +
293 #undef NEUMANN
│ │ │ +
294#endif // NEUMANN
│ │ │ +
295
│ │ │ +
296#ifdef IS_NEUMANN
│ │ │ +
297 #undef IS_NEUMANN
│ │ │ +
298#endif // IS_NEUMANN
│ │ │ +
299
│ │ │ +
300#ifdef IS_DIRICHLET
│ │ │ +
301 #undef IS_DIRICHLET
│ │ │ +
302#endif // IS_DIRICHLET
│ │ │ +
303
│ │ │ +
304#ifdef IS_INTERIOR
│ │ │ +
305 #undef IS_INTERIOR
│ │ │ +
306#endif // IS_INTERIOR
│ │ │ +
307
│ │ │ +
308#ifdef N_BNDRY_TYPES
│ │ │ +
309 #undef N_BNDRY_TYPES
│ │ │ +
310#endif // N_BNDRY_TYPES
│ │ │ +
311
│ │ │ +
312#ifdef LIST_ENTRY
│ │ │ +
313 #undef LIST_ENTRY
│ │ │ +
314#endif // LIST_ENTRY
│ │ │ +
315
│ │ │ +
316#ifdef INIT_EL_TAG_CTX_INIT
│ │ │ +
317 #undef INIT_EL_TAG_CTX_INIT
│ │ │ +
318#endif // INIT_EL_TAG_CTX_INIT
│ │ │ +
319
│ │ │ +
320#ifdef INIT_EL_TAG_CTX_UNIQ
│ │ │ +
321 #undef INIT_EL_TAG_CTX_UNIQ
│ │ │ +
322#endif // INIT_EL_TAG_CTX_UNIQ
│ │ │ +
323
│ │ │ +
324#ifdef INIT_EL_TAG_CTX_NULL
│ │ │ +
325 #undef INIT_EL_TAG_CTX_NULL
│ │ │ +
326#endif // INIT_EL_TAG_CTX_NULL
│ │ │ +
327
│ │ │ +
328#ifdef INIT_EL_TAG_CTX_DFLT
│ │ │ +
329 #undef INIT_EL_TAG_CTX_DFLT
│ │ │ +
330#endif // INIT_EL_TAG_CTX_DFLT
│ │ │ +
331
│ │ │ +
332#ifdef INIT_EL_TAG_CTX_TAG
│ │ │ +
333 #undef INIT_EL_TAG_CTX_TAG
│ │ │ +
334#endif // INIT_EL_TAG_CTX_TAG
│ │ │ +
335
│ │ │ +
336#ifdef INIT_ELEMENT_METHOD
│ │ │ +
337 #undef INIT_ELEMENT_METHOD
│ │ │ +
338#endif // INIT_ELEMENT_METHOD
│ │ │ +
339
│ │ │ +
340#ifdef INIT_ELEMENT_FLAGS
│ │ │ +
341 #undef INIT_ELEMENT_FLAGS
│ │ │ +
342#endif // INIT_ELEMENT_FLAGS
│ │ │ +
343
│ │ │ +
344#ifdef INIT_ELEMENT_DEFUN
│ │ │ +
345 #undef INIT_ELEMENT_DEFUN
│ │ │ +
346#endif // INIT_ELEMENT_DEFUN
│ │ │ +
347
│ │ │ +
348#ifdef INIT_OBJECT
│ │ │ +
349 #undef INIT_OBJECT
│ │ │ +
350#endif // INIT_OBJECT
│ │ │ +
351
│ │ │ +
352#ifdef INIT_ELEMENT_DECL
│ │ │ +
353 #undef INIT_ELEMENT_DECL
│ │ │ +
354#endif // INIT_ELEMENT_DECL
│ │ │ +
355
│ │ │ +
356#ifdef INIT_ELEMENT_INITIALIZER
│ │ │ +
357 #undef INIT_ELEMENT_INITIALIZER
│ │ │ +
358#endif // INIT_ELEMENT_INITIALIZER
│ │ │ +
359
│ │ │ +
360#ifdef INIT_ELEMENT
│ │ │ +
361 #undef INIT_ELEMENT
│ │ │ +
362#endif // INIT_ELEMENT
│ │ │ +
363
│ │ │ +
364#ifdef INIT_ELEMENT_NEEDED
│ │ │ +
365 #undef INIT_ELEMENT_NEEDED
│ │ │ +
366#endif // INIT_ELEMENT_NEEDED
│ │ │ +
367
│ │ │ +
368#ifdef INIT_ELEMENT_SETUP
│ │ │ +
369 #undef INIT_ELEMENT_SETUP
│ │ │ +
370#endif // INIT_ELEMENT_SETUP
│ │ │ +
371
│ │ │ +
372#ifdef INIT_OBJECT_SINGLE
│ │ │ +
373 #undef INIT_OBJECT_SINGLE
│ │ │ +
374#endif // INIT_OBJECT_SINGLE
│ │ │ +
375
│ │ │ +
376#ifdef INIT_ELEMENT_SINGLE
│ │ │ +
377 #undef INIT_ELEMENT_SINGLE
│ │ │ +
378#endif // INIT_ELEMENT_SINGLE
│ │ │ +
379
│ │ │ +
380#ifdef vertex_of_wall_2d
│ │ │ +
381 #undef vertex_of_wall_2d
│ │ │ +
382#endif // vertex_of_wall_2d
│ │ │ +
383
│ │ │ +
384#ifdef PARAM_STRATEGY_MASK
│ │ │ +
385 #undef PARAM_STRATEGY_MASK
│ │ │ +
386#endif // PARAM_STRATEGY_MASK
│ │ │ +
387
│ │ │ +
388#ifdef PARAM_PERIODIC_COORDS
│ │ │ +
389 #undef PARAM_PERIODIC_COORDS
│ │ │ +
390#endif // PARAM_PERIODIC_COORDS
│ │ │ +
391
│ │ │ +
392#ifdef FILL_EL_DET
│ │ │ +
393 #undef FILL_EL_DET
│ │ │ +
394#endif // FILL_EL_DET
│ │ │ +
395
│ │ │ +
396#ifdef FILL_EL_LAMBDA
│ │ │ +
397 #undef FILL_EL_LAMBDA
│ │ │ +
398#endif // FILL_EL_LAMBDA
│ │ │ +
399
│ │ │ +
400#ifdef FILL_EL_WALL_SHIFT
│ │ │ +
401 #undef FILL_EL_WALL_SHIFT
│ │ │ +
402#endif // FILL_EL_WALL_SHIFT
│ │ │ +
403
│ │ │ +
404#ifdef FILL_EL_WALL_MASK
│ │ │ +
405 #undef FILL_EL_WALL_MASK
│ │ │ +
406#endif // FILL_EL_WALL_MASK
│ │ │ +
407
│ │ │ +
408#ifdef FILL_EL_WALL_DET
│ │ │ +
409 #undef FILL_EL_WALL_DET
│ │ │ +
410#endif // FILL_EL_WALL_DET
│ │ │ +
411
│ │ │ +
412#ifdef FILL_EL_WALL_NORMAL
│ │ │ +
413 #undef FILL_EL_WALL_NORMAL
│ │ │ +
414#endif // FILL_EL_WALL_NORMAL
│ │ │ +
415
│ │ │ +
416#ifdef FILL_EL_WALL_ORIENTATION
│ │ │ +
417 #undef FILL_EL_WALL_ORIENTATION
│ │ │ +
418#endif // FILL_EL_WALL_ORIENTATION
│ │ │ +
419
│ │ │ +
420#ifdef FILL_EL_WALL_REL_ORIENTATION
│ │ │ +
421 #undef FILL_EL_WALL_REL_ORIENTATION
│ │ │ +
422#endif // FILL_EL_WALL_REL_ORIENTATION
│ │ │ +
423
│ │ │ +
424#ifdef FILL_EL_WALL_DETS
│ │ │ +
425 #undef FILL_EL_WALL_DETS
│ │ │ +
426#endif // FILL_EL_WALL_DETS
│ │ │ +
427
│ │ │ +
428#ifdef FILL_EL_WALL_NORMALS
│ │ │ +
429 #undef FILL_EL_WALL_NORMALS
│ │ │ +
430#endif // FILL_EL_WALL_NORMALS
│ │ │ +
431
│ │ │ +
432#ifdef FILL_EL_WALL_ORIENTATIONS
│ │ │ +
433 #undef FILL_EL_WALL_ORIENTATIONS
│ │ │ +
434#endif // FILL_EL_WALL_ORIENTATIONS
│ │ │ +
435
│ │ │ +
436#ifdef FILL_EL_WALL_REL_ORIENTATIONS
│ │ │ +
437 #undef FILL_EL_WALL_REL_ORIENTATIONS
│ │ │ +
438#endif // FILL_EL_WALL_REL_ORIENTATIONS
│ │ │ +
439
│ │ │ +
440#ifdef BNDRY_FLAGS_INIT
│ │ │ +
441 #undef BNDRY_FLAGS_INIT
│ │ │ +
442#endif // BNDRY_FLAGS_INIT
│ │ │ +
443
│ │ │ +
444#ifdef BNDRY_FLAGS_ALL
│ │ │ +
445 #undef BNDRY_FLAGS_ALL
│ │ │ +
446#endif // BNDRY_FLAGS_ALL
│ │ │ +
447
│ │ │ +
448#ifdef BNDRY_FLAGS_CPY
│ │ │ +
449 #undef BNDRY_FLAGS_CPY
│ │ │ +
450#endif // BNDRY_FLAGS_CPY
│ │ │ +
451
│ │ │ +
452#ifdef BNDRY_FLAGS_AND
│ │ │ +
453 #undef BNDRY_FLAGS_AND
│ │ │ +
454#endif // BNDRY_FLAGS_AND
│ │ │ +
455
│ │ │ +
456#ifdef BNDRY_FLAGS_OR
│ │ │ +
457 #undef BNDRY_FLAGS_OR
│ │ │ +
458#endif // BNDRY_FLAGS_OR
│ │ │ +
459
│ │ │ +
460#ifdef BNDRY_FLAGS_XOR
│ │ │ +
461 #undef BNDRY_FLAGS_XOR
│ │ │ +
462#endif // BNDRY_FLAGS_XOR
│ │ │ +
463
│ │ │ +
464#ifdef BNDRY_FLAGS_IS_INTERIOR
│ │ │ +
465 #undef BNDRY_FLAGS_IS_INTERIOR
│ │ │ +
466#endif // BNDRY_FLAGS_IS_INTERIOR
│ │ │ +
467
│ │ │ +
468#ifdef BNDRY_FLAGS_IS_AT_BNDRY
│ │ │ +
469 #undef BNDRY_FLAGS_IS_AT_BNDRY
│ │ │ +
470#endif // BNDRY_FLAGS_IS_AT_BNDRY
│ │ │ +
471
│ │ │ +
472#ifdef BNDRY_FLAGS_SET
│ │ │ +
473 #undef BNDRY_FLAGS_SET
│ │ │ +
474#endif // BNDRY_FLAGS_SET
│ │ │ +
475
│ │ │ +
476#ifdef BNDRY_FLAGS_IS_PARTOF
│ │ │ +
477 #undef BNDRY_FLAGS_IS_PARTOF
│ │ │ +
478#endif // BNDRY_FLAGS_IS_PARTOF
│ │ │ +
479
│ │ │ +
480#ifdef BNDRY_FLAGS_FFBB
│ │ │ +
481 #undef BNDRY_FLAGS_FFBB
│ │ │ +
482#endif // BNDRY_FLAGS_FFBB
│ │ │ +
483
│ │ │ +
484#ifdef RCLE_NONE
│ │ │ +
485 #undef RCLE_NONE
│ │ │ +
486#endif // RCLE_NONE
│ │ │ +
487
│ │ │ +
488#ifdef RCLE_COARSE_EDGE_COMPAT
│ │ │ +
489 #undef RCLE_COARSE_EDGE_COMPAT
│ │ │ +
490#endif // RCLE_COARSE_EDGE_COMPAT
│ │ │ +
491
│ │ │ +
492#ifdef FILL_NOTHING
│ │ │ +
493 #undef FILL_NOTHING
│ │ │ +
494#endif // FILL_NOTHING
│ │ │ +
495
│ │ │ +
496#ifdef FILL_COORDS
│ │ │ +
497 #undef FILL_COORDS
│ │ │ +
498#endif // FILL_COORDS
│ │ │ +
499
│ │ │ +
500#ifdef FILL_BOUND
│ │ │ +
501 #undef FILL_BOUND
│ │ │ +
502#endif // FILL_BOUND
│ │ │ +
503
│ │ │ +
504#ifdef FILL_NEIGH
│ │ │ +
505 #undef FILL_NEIGH
│ │ │ +
506#endif // FILL_NEIGH
│ │ │ +
507
│ │ │ +
508#ifdef FILL_OPP_COORDS
│ │ │ +
509 #undef FILL_OPP_COORDS
│ │ │ +
510#endif // FILL_OPP_COORDS
│ │ │ +
511
│ │ │ +
512#ifdef FILL_ORIENTATION
│ │ │ +
513 #undef FILL_ORIENTATION
│ │ │ +
514#endif // FILL_ORIENTATION
│ │ │ +
515
│ │ │ +
516#ifdef FILL_PROJECTION
│ │ │ +
517 #undef FILL_PROJECTION
│ │ │ +
518#endif // FILL_PROJECTION
│ │ │ +
519
│ │ │ +
520#ifdef FILL_MACRO_WALLS
│ │ │ +
521 #undef FILL_MACRO_WALLS
│ │ │ +
522#endif // FILL_MACRO_WALLS
│ │ │ +
523
│ │ │ +
524#ifdef FILL_WALL_MAP
│ │ │ +
525 #undef FILL_WALL_MAP
│ │ │ +
526#endif // FILL_WALL_MAP
│ │ │ +
527
│ │ │ +
528#ifdef FILL_NON_PERIODIC
│ │ │ +
529 #undef FILL_NON_PERIODIC
│ │ │ +
530#endif // FILL_NON_PERIODIC
│ │ │ +
531
│ │ │ +
532#ifdef FILL_MASTER_INFO
│ │ │ +
533 #undef FILL_MASTER_INFO
│ │ │ +
534#endif // FILL_MASTER_INFO
│ │ │ +
535
│ │ │ +
536#ifdef FILL_ANY
│ │ │ +
537 #undef FILL_ANY
│ │ │ +
538#endif // FILL_ANY
│ │ │ +
539
│ │ │ +
540#ifdef CALL_EVERY_EL_PREORDER
│ │ │ +
541 #undef CALL_EVERY_EL_PREORDER
│ │ │ +
542#endif // CALL_EVERY_EL_PREORDER
│ │ │ +
543
│ │ │ +
544#ifdef CALL_EVERY_EL_INORDER
│ │ │ +
545 #undef CALL_EVERY_EL_INORDER
│ │ │ +
546#endif // CALL_EVERY_EL_INORDER
│ │ │ +
547
│ │ │ +
548#ifdef CALL_EVERY_EL_POSTORDER
│ │ │ +
549 #undef CALL_EVERY_EL_POSTORDER
│ │ │ +
550#endif // CALL_EVERY_EL_POSTORDER
│ │ │ +
551
│ │ │ +
552#ifdef CALL_LEAF_EL
│ │ │ +
553 #undef CALL_LEAF_EL
│ │ │ +
554#endif // CALL_LEAF_EL
│ │ │ +
555
│ │ │ +
556#ifdef CALL_LEAF_EL_LEVEL
│ │ │ +
557 #undef CALL_LEAF_EL_LEVEL
│ │ │ +
558#endif // CALL_LEAF_EL_LEVEL
│ │ │ +
559
│ │ │ +
560#ifdef CALL_EL_LEVEL
│ │ │ +
561 #undef CALL_EL_LEVEL
│ │ │ +
562#endif // CALL_EL_LEVEL
│ │ │ +
563
│ │ │ +
564#ifdef CALL_MG_LEVEL
│ │ │ +
565 #undef CALL_MG_LEVEL
│ │ │ +
566#endif // CALL_MG_LEVEL
│ │ │ +
567
│ │ │ +
568#ifdef TEST_FLAG
│ │ │ +
569 #undef TEST_FLAG
│ │ │ +
570#endif // TEST_FLAG
│ │ │ +
571
│ │ │ +
572#ifdef ADM_FLAGS_MASK
│ │ │ +
573 #undef ADM_FLAGS_MASK
│ │ │ +
574#endif // ADM_FLAGS_MASK
│ │ │ +
575
│ │ │ +
576#ifdef UCHAR_name
│ │ │ +
577 #undef UCHAR_name
│ │ │ +
578#endif // UCHAR_name
│ │ │ +
579
│ │ │ +
580#ifdef uchar_VECNAME
│ │ │ +
581 #undef uchar_VECNAME
│ │ │ +
582#endif // uchar_VECNAME
│ │ │ +
583
│ │ │ +
584#ifdef SCHAR_name
│ │ │ +
585 #undef SCHAR_name
│ │ │ +
586#endif // SCHAR_name
│ │ │ +
587
│ │ │ +
588#ifdef schar_VECNAME
│ │ │ +
589 #undef schar_VECNAME
│ │ │ +
590#endif // schar_VECNAME
│ │ │ +
591
│ │ │ +
592#ifdef INT_name
│ │ │ +
593 #undef INT_name
│ │ │ +
594#endif // INT_name
│ │ │ +
595
│ │ │ +
596#ifdef int_VECNAME
│ │ │ +
597 #undef int_VECNAME
│ │ │ +
598#endif // int_VECNAME
│ │ │ +
599
│ │ │ +
600#ifdef DOF_name
│ │ │ +
601 #undef DOF_name
│ │ │ +
602#endif // DOF_name
│ │ │ +
603
│ │ │ +
604#ifdef dof_VECNAME
│ │ │ +
605 #undef dof_VECNAME
│ │ │ +
606#endif // dof_VECNAME
│ │ │ +
607
│ │ │ +
608#ifdef PTR_name
│ │ │ +
609 #undef PTR_name
│ │ │ +
610#endif // PTR_name
│ │ │ +
611
│ │ │ +
612#ifdef ptr_VECNAME
│ │ │ +
613 #undef ptr_VECNAME
│ │ │ +
614#endif // ptr_VECNAME
│ │ │ +
615
│ │ │ +
616#ifdef REAL_name
│ │ │ +
617 #undef REAL_name
│ │ │ +
618#endif // REAL_name
│ │ │ +
619
│ │ │ +
620#ifdef real_VECNAME
│ │ │ +
621 #undef real_VECNAME
│ │ │ +
622#endif // real_VECNAME
│ │ │ +
623
│ │ │ +
624#ifdef REAL_D_name
│ │ │ +
625 #undef REAL_D_name
│ │ │ +
626#endif // REAL_D_name
│ │ │ +
627
│ │ │ +
628#ifdef real_d_VECNAME
│ │ │ +
629 #undef real_d_VECNAME
│ │ │ +
630#endif // real_d_VECNAME
│ │ │ +
631
│ │ │ +
632#ifdef BNDRY_name
│ │ │ +
633 #undef BNDRY_name
│ │ │ +
634#endif // BNDRY_name
│ │ │ +
635
│ │ │ +
636#ifdef bndry_VECNAME
│ │ │ +
637 #undef bndry_VECNAME
│ │ │ +
638#endif // bndry_VECNAME
│ │ │ +
639
│ │ │ +
640#ifdef DECL_DOF_EL_VEC
│ │ │ +
641 #undef DECL_DOF_EL_VEC
│ │ │ +
642#endif // DECL_DOF_EL_VEC
│ │ │ +
643
│ │ │ +
644#ifdef PHI
│ │ │ +
645 #undef PHI
│ │ │ +
646#endif // PHI
│ │ │ +
647
│ │ │ +
648#ifdef GRD_PHI
│ │ │ +
649 #undef GRD_PHI
│ │ │ +
650#endif // GRD_PHI
│ │ │ +
651
│ │ │ +
652#ifdef D2_PHI
│ │ │ +
653 #undef D2_PHI
│ │ │ +
654#endif // D2_PHI
│ │ │ +
655
│ │ │ +
656#ifdef D3_PHI
│ │ │ +
657 #undef D3_PHI
│ │ │ +
658#endif // D3_PHI
│ │ │ +
659
│ │ │ +
660#ifdef D4_PHI
│ │ │ +
661 #undef D4_PHI
│ │ │ +
662#endif // D4_PHI
│ │ │ +
663
│ │ │ +
664#ifdef PHI_D
│ │ │ +
665 #undef PHI_D
│ │ │ +
666#endif // PHI_D
│ │ │ +
667
│ │ │ +
668#ifdef GRD_PHI_D
│ │ │ +
669 #undef GRD_PHI_D
│ │ │ +
670#endif // GRD_PHI_D
│ │ │ +
671
│ │ │ +
672#ifdef D2_PHI_D
│ │ │ +
673 #undef D2_PHI_D
│ │ │ +
674#endif // D2_PHI_D
│ │ │ +
675
│ │ │ +
676#ifdef GET_DOF_INDICES
│ │ │ +
677 #undef GET_DOF_INDICES
│ │ │ +
678#endif // GET_DOF_INDICES
│ │ │ +
679
│ │ │ +
680#ifdef INTERPOL
│ │ │ +
681 #undef INTERPOL
│ │ │ +
682#endif // INTERPOL
│ │ │ +
683
│ │ │ +
684#ifdef INTERPOL_D
│ │ │ +
685 #undef INTERPOL_D
│ │ │ +
686#endif // INTERPOL_D
│ │ │ +
687
│ │ │ +
688#ifdef INTERPOL_DOW
│ │ │ +
689 #undef INTERPOL_DOW
│ │ │ +
690#endif // INTERPOL_DOW
│ │ │ +
691
│ │ │ +
692#ifdef GET_BOUND
│ │ │ +
693 #undef GET_BOUND
│ │ │ +
694#endif // GET_BOUND
│ │ │ +
695
│ │ │ +
696#ifdef LAGRANGE_NODES
│ │ │ +
697 #undef LAGRANGE_NODES
│ │ │ +
698#endif // LAGRANGE_NODES
│ │ │ +
699
│ │ │ +
700#ifdef FILL_EL_QUAD_WORLD
│ │ │ +
701 #undef FILL_EL_QUAD_WORLD
│ │ │ +
702#endif // FILL_EL_QUAD_WORLD
│ │ │ +
703
│ │ │ +
704#ifdef FILL_EL_QUAD_DET
│ │ │ +
705 #undef FILL_EL_QUAD_DET
│ │ │ +
706#endif // FILL_EL_QUAD_DET
│ │ │ +
707
│ │ │ +
708#ifdef FILL_EL_QUAD_LAMBDA
│ │ │ +
709 #undef FILL_EL_QUAD_LAMBDA
│ │ │ +
710#endif // FILL_EL_QUAD_LAMBDA
│ │ │ +
711
│ │ │ +
712#ifdef FILL_EL_QUAD_DLAMBDA
│ │ │ +
713 #undef FILL_EL_QUAD_DLAMBDA
│ │ │ +
714#endif // FILL_EL_QUAD_DLAMBDA
│ │ │ +
715
│ │ │ +
716#ifdef FILL_EL_QUAD_GRD_WORLD
│ │ │ +
717 #undef FILL_EL_QUAD_GRD_WORLD
│ │ │ +
718#endif // FILL_EL_QUAD_GRD_WORLD
│ │ │ +
719
│ │ │ +
720#ifdef FILL_EL_QUAD_D2_WORLD
│ │ │ +
721 #undef FILL_EL_QUAD_D2_WORLD
│ │ │ +
722#endif // FILL_EL_QUAD_D2_WORLD
│ │ │ +
723
│ │ │ +
724#ifdef FILL_EL_QUAD_D3_WORLD
│ │ │ +
725 #undef FILL_EL_QUAD_D3_WORLD
│ │ │ +
726#endif // FILL_EL_QUAD_D3_WORLD
│ │ │ +
727
│ │ │ +
728#ifdef FILL_EL_QUAD_WALL_DET
│ │ │ +
729 #undef FILL_EL_QUAD_WALL_DET
│ │ │ +
730#endif // FILL_EL_QUAD_WALL_DET
│ │ │ +
731
│ │ │ +
732#ifdef FILL_EL_QUAD_WALL_NORMAL
│ │ │ +
733 #undef FILL_EL_QUAD_WALL_NORMAL
│ │ │ +
734#endif // FILL_EL_QUAD_WALL_NORMAL
│ │ │ +
735
│ │ │ +
736#ifdef FILL_EL_QUAD_GRD_NORMAL
│ │ │ +
737 #undef FILL_EL_QUAD_GRD_NORMAL
│ │ │ +
738#endif // FILL_EL_QUAD_GRD_NORMAL
│ │ │ +
739
│ │ │ +
740#ifdef FILL_EL_QUAD_D2_NORMAL
│ │ │ +
741 #undef FILL_EL_QUAD_D2_NORMAL
│ │ │ +
742#endif // FILL_EL_QUAD_D2_NORMAL
│ │ │ +
743
│ │ │ +
744#ifdef INIT_PHI
│ │ │ +
745 #undef INIT_PHI
│ │ │ +
746#endif // INIT_PHI
│ │ │ +
747
│ │ │ +
748#ifdef INIT_GRD_PHI
│ │ │ +
749 #undef INIT_GRD_PHI
│ │ │ +
750#endif // INIT_GRD_PHI
│ │ │ +
751
│ │ │ +
752#ifdef INIT_D2_PHI
│ │ │ +
753 #undef INIT_D2_PHI
│ │ │ +
754#endif // INIT_D2_PHI
│ │ │ +
755
│ │ │ +
756#ifdef INIT_D3_PHI
│ │ │ +
757 #undef INIT_D3_PHI
│ │ │ +
758#endif // INIT_D3_PHI
│ │ │ +
759
│ │ │ +
760#ifdef INIT_D4_PHI
│ │ │ +
761 #undef INIT_D4_PHI
│ │ │ +
762#endif // INIT_D4_PHI
│ │ │ +
763
│ │ │ +
764#ifdef INIT_TANGENTIAL
│ │ │ +
765 #undef INIT_TANGENTIAL
│ │ │ +
766#endif // INIT_TANGENTIAL
│ │ │ +
767
│ │ │ +
768#ifdef MESH_REFINED
│ │ │ +
769 #undef MESH_REFINED
│ │ │ +
770#endif // MESH_REFINED
│ │ │ +
771
│ │ │ +
772#ifdef MESH_COARSENED
│ │ │ +
773 #undef MESH_COARSENED
│ │ │ +
774#endif // MESH_COARSENED
│ │ │ +
775
│ │ │ +
776#ifdef GRAPH_MESH_BOUNDARY
│ │ │ +
777 #undef GRAPH_MESH_BOUNDARY
│ │ │ +
778#endif // GRAPH_MESH_BOUNDARY
│ │ │ +
779
│ │ │ +
780#ifdef GRAPH_MESH_ELEMENT_MARK
│ │ │ +
781 #undef GRAPH_MESH_ELEMENT_MARK
│ │ │ +
782#endif // GRAPH_MESH_ELEMENT_MARK
│ │ │ +
783
│ │ │ +
784#ifdef GRAPH_MESH_VERTEX_DOF
│ │ │ +
785 #undef GRAPH_MESH_VERTEX_DOF
│ │ │ +
786#endif // GRAPH_MESH_VERTEX_DOF
│ │ │ +
787
│ │ │ +
788#ifdef GRAPH_MESH_ELEMENT_INDEX
│ │ │ +
789 #undef GRAPH_MESH_ELEMENT_INDEX
│ │ │ +
790#endif // GRAPH_MESH_ELEMENT_INDEX
│ │ │ +
791
│ │ │ +
792#ifdef GET_MESH
│ │ │ +
793 #undef GET_MESH
│ │ │ +
794#endif // GET_MESH
│ │ │ +
795
│ │ │ +
796#ifdef GET_DOF_VEC
│ │ │ +
797 #undef GET_DOF_VEC
│ │ │ +
798#endif // GET_DOF_VEC
│ │ │ +
799
│ │ │ +
800#ifdef TRACE_DOF_VEC_PROTO
│ │ │ +
801 #undef TRACE_DOF_VEC_PROTO
│ │ │ +
802#endif // TRACE_DOF_VEC_PROTO
│ │ │ +
803
│ │ │ +
804#ifdef INIT_UH
│ │ │ +
805 #undef INIT_UH
│ │ │ +
806#endif // INIT_UH
│ │ │ +
807
│ │ │ +
808#ifdef INIT_GRD_UH
│ │ │ +
809 #undef INIT_GRD_UH
│ │ │ +
810#endif // INIT_GRD_UH
│ │ │ +
811
│ │ │ +
812#ifdef ellipt_est_d_init
│ │ │ +
813 #undef ellipt_est_d_init
│ │ │ +
814#endif // ellipt_est_d_init
│ │ │ +
815
│ │ │ +
816#ifdef head_est_d_init
│ │ │ +
817 #undef head_est_d_init
│ │ │ +
818#endif // head_est_d_init
│ │ │ +
819
│ │ │ +
820#ifdef element_est_d
│ │ │ +
821 #undef element_est_d
│ │ │ +
822#endif // element_est_d
│ │ │ +
823
│ │ │ +
824#ifdef element_est_d_finish
│ │ │ +
825 #undef element_est_d_finish
│ │ │ +
826#endif // element_est_d_finish
│ │ │ +
827
│ │ │ +
828#ifdef element_est_uh_d
│ │ │ +
829 #undef element_est_uh_d
│ │ │ +
830#endif // element_est_uh_d
│ │ │ +
831
│ │ │ +
832#ifdef element_est_grd_uh_d
│ │ │ +
833 #undef element_est_grd_uh_d
│ │ │ +
834#endif // element_est_grd_uh_d
│ │ │ +
835
│ │ │ +
836#ifdef ellipt_est_d_finish
│ │ │ +
837 #undef ellipt_est_d_finish
│ │ │ +
838#endif // ellipt_est_d_finish
│ │ │ +
839
│ │ │ +
840#ifdef heat_est_d_finish
│ │ │ +
841 #undef heat_est_d_finish
│ │ │ +
842#endif // heat_est_d_finish
│ │ │ +
843
│ │ │ +
844#ifdef TRAVERSE_FIRST
│ │ │ +
845 #undef TRAVERSE_FIRST
│ │ │ +
846#endif // TRAVERSE_FIRST
│ │ │ +
847
│ │ │ +
848#ifdef TRAVERSE_NEXT
│ │ │ +
849 #undef TRAVERSE_NEXT
│ │ │ +
850#endif // TRAVERSE_NEXT
│ │ │ +
851
│ │ │ +
852#ifdef TRAVERSE_START
│ │ │ +
853 #undef TRAVERSE_START
│ │ │ +
854#endif // TRAVERSE_START
│ │ │ +
855
│ │ │ +
856#ifdef TRAVERSE_STOP
│ │ │ +
857 #undef TRAVERSE_STOP
│ │ │ +
858#endif // TRAVERSE_STOP
│ │ │ +
859
│ │ │ +
860#ifdef TRAVERSE_NEIGHBOUR
│ │ │ +
861 #undef TRAVERSE_NEIGHBOUR
│ │ │ +
862#endif // TRAVERSE_NEIGHBOUR
│ │ │ +
863
│ │ │ +
864#ifdef IFF_TAG_ALBERTA
│ │ │ +
865 #undef IFF_TAG_ALBERTA
│ │ │ +
866#endif // IFF_TAG_ALBERTA
│ │ │ +
867
│ │ │ +
868#ifdef IFF_TAG_MESH
│ │ │ +
869 #undef IFF_TAG_MESH
│ │ │ +
870#endif // IFF_TAG_MESH
│ │ │ +
871
│ │ │ +
872#ifdef IFF_TAG_REAL_VEC
│ │ │ +
873 #undef IFF_TAG_REAL_VEC
│ │ │ +
874#endif // IFF_TAG_REAL_VEC
│ │ │ +
875
│ │ │ +
876#ifdef IFF_TAG_REAL_D_VEC
│ │ │ +
877 #undef IFF_TAG_REAL_D_VEC
│ │ │ +
878#endif // IFF_TAG_REAL_D_VEC
│ │ │ +
879
│ │ │ +
880#ifdef IFF_TAG_INT_VEC
│ │ │ +
881 #undef IFF_TAG_INT_VEC
│ │ │ +
882#endif // IFF_TAG_INT_VEC
│ │ │ +
883
│ │ │ +
884#ifdef IFF_TAG_UCHAR_VEC
│ │ │ +
885 #undef IFF_TAG_UCHAR_VEC
│ │ │ +
886#endif // IFF_TAG_UCHAR_VEC
│ │ │ +
887
│ │ │ +
888#ifdef IFF_TAG_SCHAR_VEC
│ │ │ +
889 #undef IFF_TAG_SCHAR_VEC
│ │ │ +
890#endif // IFF_TAG_SCHAR_VEC
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,179 +1,895 @@ │ │ │ │ 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 │ │ │ │ +undefine-3.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_ALGEBRA_HH │ │ │ │ -6#define DUNE_ALBERTA_ALGEBRA_HH │ │ │ │ -7 │ │ │ │ -8#include │ │ │ │ -9#include │ │ │ │ -10 │ │ │ │ -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 } │ │ │ │ +12#ifdef _ALBERTA_H_ │ │ │ │ +13 #undef _ALBERTA_H_ │ │ │ │ +14#endif // _ALBERTA_H_ │ │ │ │ +15 │ │ │ │ +16#ifdef ALBERTA_MAGIC │ │ │ │ +17 #undef ALBERTA_MAGIC │ │ │ │ +18#endif // ALBERTA_MAGIC │ │ │ │ +19 │ │ │ │ +20#ifdef ALBERTA_VERSION │ │ │ │ +21 #undef ALBERTA_VERSION │ │ │ │ +22#endif // ALBERTA_VERSION │ │ │ │ +23 │ │ │ │ +24#ifdef DIM_LIMIT │ │ │ │ +25 #undef DIM_LIMIT │ │ │ │ +26#endif // DIM_LIMIT │ │ │ │ 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 ); │ │ │ │ -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 │ │ │ │ +28#ifdef DIM_MAX │ │ │ │ +29 #undef DIM_MAX │ │ │ │ +30#endif // DIM_MAX │ │ │ │ +31 │ │ │ │ +32#ifdef N_VERTICES │ │ │ │ +33 #undef N_VERTICES │ │ │ │ +34#endif // N_VERTICES │ │ │ │ +35 │ │ │ │ +36#ifdef N_EDGES │ │ │ │ +37 #undef N_EDGES │ │ │ │ +38#endif // N_EDGES │ │ │ │ +39 │ │ │ │ +40#ifdef N_WALLS │ │ │ │ +41 #undef N_WALLS │ │ │ │ +42#endif // N_WALLS │ │ │ │ +43 │ │ │ │ +44#ifdef N_FACES │ │ │ │ +45 #undef N_FACES │ │ │ │ +46#endif // N_FACES │ │ │ │ +47 │ │ │ │ +48#ifdef N_NEIGH │ │ │ │ +49 #undef N_NEIGH │ │ │ │ +50#endif // N_NEIGH │ │ │ │ +51 │ │ │ │ +52#ifdef N_LAMBDA │ │ │ │ +53 #undef N_LAMBDA │ │ │ │ +54#endif // N_LAMBDA │ │ │ │ +55 │ │ │ │ +56#ifdef DIM_FAC │ │ │ │ +57 #undef DIM_FAC │ │ │ │ +58#endif // DIM_FAC │ │ │ │ +59 │ │ │ │ +60#ifdef VERTEX_OF_EDGE │ │ │ │ +61 #undef VERTEX_OF_EDGE │ │ │ │ +62#endif // VERTEX_OF_EDGE │ │ │ │ +63 │ │ │ │ +64#ifdef VERTEX_OF_WALL │ │ │ │ +65 #undef VERTEX_OF_WALL │ │ │ │ +66#endif // VERTEX_OF_WALL │ │ │ │ +67 │ │ │ │ +68#ifdef N_VERTICES_0D │ │ │ │ +69 #undef N_VERTICES_0D │ │ │ │ +70#endif // N_VERTICES_0D │ │ │ │ +71 │ │ │ │ +72#ifdef N_EDGES_0D │ │ │ │ +73 #undef N_EDGES_0D │ │ │ │ +74#endif // N_EDGES_0D │ │ │ │ +75 │ │ │ │ +76#ifdef N_FACES_0D │ │ │ │ +77 #undef N_FACES_0D │ │ │ │ +78#endif // N_FACES_0D │ │ │ │ 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 } │ │ │ │ +80#ifdef N_NEIGH_0D │ │ │ │ +81 #undef N_NEIGH_0D │ │ │ │ +82#endif // N_NEIGH_0D │ │ │ │ +83 │ │ │ │ +84#ifdef N_WALLS_0D │ │ │ │ +85 #undef N_WALLS_0D │ │ │ │ +86#endif // N_WALLS_0D │ │ │ │ +87 │ │ │ │ +88#ifdef N_LAMBDA_0D │ │ │ │ +89 #undef N_LAMBDA_0D │ │ │ │ +90#endif // N_LAMBDA_0D │ │ │ │ +91 │ │ │ │ +92#ifdef DIM_FAC_0D │ │ │ │ +93 #undef DIM_FAC_0D │ │ │ │ +94#endif // DIM_FAC_0D │ │ │ │ +95 │ │ │ │ +96#ifdef VERTEX_OF_EDGE_0D │ │ │ │ +97 #undef VERTEX_OF_EDGE_0D │ │ │ │ +98#endif // VERTEX_OF_EDGE_0D │ │ │ │ +99 │ │ │ │ +100#ifdef VERTEX_OF_WALL_0D │ │ │ │ +101 #undef VERTEX_OF_WALL_0D │ │ │ │ +102#endif // VERTEX_OF_WALL_0D │ │ │ │ +103 │ │ │ │ +104#ifdef N_VERTICES_1D │ │ │ │ +105 #undef N_VERTICES_1D │ │ │ │ +106#endif // N_VERTICES_1D │ │ │ │ +107 │ │ │ │ +108#ifdef N_EDGES_1D │ │ │ │ +109 #undef N_EDGES_1D │ │ │ │ +110#endif // N_EDGES_1D │ │ │ │ +111 │ │ │ │ +112#ifdef N_FACES_1D │ │ │ │ +113 #undef N_FACES_1D │ │ │ │ +114#endif // N_FACES_1D │ │ │ │ +115 │ │ │ │ +116#ifdef N_NEIGH_1D │ │ │ │ +117 #undef N_NEIGH_1D │ │ │ │ +118#endif // N_NEIGH_1D │ │ │ │ 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} │ │ │ │ +120#ifdef N_WALLS_1D │ │ │ │ +121 #undef N_WALLS_1D │ │ │ │ +122#endif // N_WALLS_1D │ │ │ │ +123 │ │ │ │ +124#ifdef N_LAMBDA_1D │ │ │ │ +125 #undef N_LAMBDA_1D │ │ │ │ +126#endif // N_LAMBDA_1D │ │ │ │ +127 │ │ │ │ +128#ifdef DIM_FAC_1D │ │ │ │ +129 #undef DIM_FAC_1D │ │ │ │ +130#endif // DIM_FAC_1D │ │ │ │ +131 │ │ │ │ +132#ifdef VERTEX_OF_EDGE_1D │ │ │ │ +133 #undef VERTEX_OF_EDGE_1D │ │ │ │ +134#endif // VERTEX_OF_EDGE_1D │ │ │ │ +135 │ │ │ │ +136#ifdef VERTEX_OF_WALL_1D │ │ │ │ +137 #undef VERTEX_OF_WALL_1D │ │ │ │ +138#endif // VERTEX_OF_WALL_1D │ │ │ │ +139 │ │ │ │ +140#ifdef N_VERTICES_2D │ │ │ │ +141 #undef N_VERTICES_2D │ │ │ │ +142#endif // N_VERTICES_2D │ │ │ │ +143 │ │ │ │ +144#ifdef N_EDGES_2D │ │ │ │ +145 #undef N_EDGES_2D │ │ │ │ +146#endif // N_EDGES_2D │ │ │ │ 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_:_:_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 │ │ │ │ +148#ifdef N_FACES_2D │ │ │ │ +149 #undef N_FACES_2D │ │ │ │ +150#endif // N_FACES_2D │ │ │ │ +151 │ │ │ │ +152#ifdef N_NEIGH_2D │ │ │ │ +153 #undef N_NEIGH_2D │ │ │ │ +154#endif // N_NEIGH_2D │ │ │ │ +155 │ │ │ │ +156#ifdef N_WALLS_2D │ │ │ │ +157 #undef N_WALLS_2D │ │ │ │ +158#endif // N_WALLS_2D │ │ │ │ +159 │ │ │ │ +160#ifdef N_LAMBDA_2D │ │ │ │ +161 #undef N_LAMBDA_2D │ │ │ │ +162#endif // N_LAMBDA_2D │ │ │ │ +163 │ │ │ │ +164#ifdef DIM_FAC_2D │ │ │ │ +165 #undef DIM_FAC_2D │ │ │ │ +166#endif // DIM_FAC_2D │ │ │ │ +167 │ │ │ │ +168#ifdef VERTEX_OF_EDGE_2D │ │ │ │ +169 #undef VERTEX_OF_EDGE_2D │ │ │ │ +170#endif // VERTEX_OF_EDGE_2D │ │ │ │ +171 │ │ │ │ +172#ifdef VERTEX_OF_WALL_2D │ │ │ │ +173 #undef VERTEX_OF_WALL_2D │ │ │ │ +174#endif // VERTEX_OF_WALL_2D │ │ │ │ +175 │ │ │ │ +176#ifdef N_VERTICES_3D │ │ │ │ +177 #undef N_VERTICES_3D │ │ │ │ +178#endif // N_VERTICES_3D │ │ │ │ +179 │ │ │ │ +180#ifdef N_EDGES_3D │ │ │ │ +181 #undef N_EDGES_3D │ │ │ │ +182#endif // N_EDGES_3D │ │ │ │ +183 │ │ │ │ +184#ifdef N_FACES_3D │ │ │ │ +185 #undef N_FACES_3D │ │ │ │ +186#endif // N_FACES_3D │ │ │ │ +187 │ │ │ │ +188#ifdef N_NEIGH_3D │ │ │ │ +189 #undef N_NEIGH_3D │ │ │ │ +190#endif // N_NEIGH_3D │ │ │ │ +191 │ │ │ │ +192#ifdef N_WALLS_3D │ │ │ │ +193 #undef N_WALLS_3D │ │ │ │ +194#endif // N_WALLS_3D │ │ │ │ +195 │ │ │ │ +196#ifdef N_LAMBDA_3D │ │ │ │ +197 #undef N_LAMBDA_3D │ │ │ │ +198#endif // N_LAMBDA_3D │ │ │ │ +199 │ │ │ │ +200#ifdef DIM_FAC_3D │ │ │ │ +201 #undef DIM_FAC_3D │ │ │ │ +202#endif // DIM_FAC_3D │ │ │ │ +203 │ │ │ │ +204#ifdef VERTEX_OF_EDGE_3D │ │ │ │ +205 #undef VERTEX_OF_EDGE_3D │ │ │ │ +206#endif // VERTEX_OF_EDGE_3D │ │ │ │ +207 │ │ │ │ +208#ifdef VERTEX_OF_WALL_3D │ │ │ │ +209 #undef VERTEX_OF_WALL_3D │ │ │ │ +210#endif // VERTEX_OF_WALL_3D │ │ │ │ +211 │ │ │ │ +212#ifdef N_LAMBDA_MAX │ │ │ │ +213 #undef N_LAMBDA_MAX │ │ │ │ +214#endif // N_LAMBDA_MAX │ │ │ │ +215 │ │ │ │ +216#ifdef N_VERTICES_MAX │ │ │ │ +217 #undef N_VERTICES_MAX │ │ │ │ +218#endif // N_VERTICES_MAX │ │ │ │ +219 │ │ │ │ +220#ifdef N_EDGES_MAX │ │ │ │ +221 #undef N_EDGES_MAX │ │ │ │ +222#endif // N_EDGES_MAX │ │ │ │ +223 │ │ │ │ +224#ifdef N_FACES_MAX │ │ │ │ +225 #undef N_FACES_MAX │ │ │ │ +226#endif // N_FACES_MAX │ │ │ │ +227 │ │ │ │ +228#ifdef N_NEIGH_MAX │ │ │ │ +229 #undef N_NEIGH_MAX │ │ │ │ +230#endif // N_NEIGH_MAX │ │ │ │ +231 │ │ │ │ +232#ifdef N_WALLS_MAX │ │ │ │ +233 #undef N_WALLS_MAX │ │ │ │ +234#endif // N_WALLS_MAX │ │ │ │ +235 │ │ │ │ +236#ifdef DIM_FAC_MAX │ │ │ │ +237 #undef DIM_FAC_MAX │ │ │ │ +238#endif // DIM_FAC_MAX │ │ │ │ +239 │ │ │ │ +240#ifdef N_LAMBDA_LIMIT │ │ │ │ +241 #undef N_LAMBDA_LIMIT │ │ │ │ +242#endif // N_LAMBDA_LIMIT │ │ │ │ +243 │ │ │ │ +244#ifdef N_VERTICES_LIMIT │ │ │ │ +245 #undef N_VERTICES_LIMIT │ │ │ │ +246#endif // N_VERTICES_LIMIT │ │ │ │ +247 │ │ │ │ +248#ifdef N_EDGES_LIMIT │ │ │ │ +249 #undef N_EDGES_LIMIT │ │ │ │ +250#endif // N_EDGES_LIMIT │ │ │ │ +251 │ │ │ │ +252#ifdef N_FACES_LIMIT │ │ │ │ +253 #undef N_FACES_LIMIT │ │ │ │ +254#endif // N_FACES_LIMIT │ │ │ │ +255 │ │ │ │ +256#ifdef N_NEIGH_LIMIT │ │ │ │ +257 #undef N_NEIGH_LIMIT │ │ │ │ +258#endif // N_NEIGH_LIMIT │ │ │ │ +259 │ │ │ │ +260#ifdef N_WALLS_LIMIT │ │ │ │ +261 #undef N_WALLS_LIMIT │ │ │ │ +262#endif // N_WALLS_LIMIT │ │ │ │ +263 │ │ │ │ +264#ifdef DIM_FAC_LIMIT │ │ │ │ +265 #undef DIM_FAC_LIMIT │ │ │ │ +266#endif // DIM_FAC_LIMIT │ │ │ │ +267 │ │ │ │ +268#ifdef INDEX │ │ │ │ +269 #undef INDEX │ │ │ │ +270#endif // INDEX │ │ │ │ +271 │ │ │ │ +272#ifdef INDEX │ │ │ │ +273 #undef INDEX │ │ │ │ +274#endif // INDEX │ │ │ │ +275 │ │ │ │ +276#ifdef IS_LEAF_EL │ │ │ │ +277 #undef IS_LEAF_EL │ │ │ │ +278#endif // IS_LEAF_EL │ │ │ │ +279 │ │ │ │ +280#ifdef LEAF_DATA │ │ │ │ +281 #undef LEAF_DATA │ │ │ │ +282#endif // LEAF_DATA │ │ │ │ +283 │ │ │ │ +284#ifdef INTERIOR │ │ │ │ +285 #undef INTERIOR │ │ │ │ +286#endif // INTERIOR │ │ │ │ +287 │ │ │ │ +288#ifdef DIRICHLET │ │ │ │ +289 #undef DIRICHLET │ │ │ │ +290#endif // DIRICHLET │ │ │ │ +291 │ │ │ │ +292#ifdef NEUMANN │ │ │ │ +293 #undef NEUMANN │ │ │ │ +294#endif // NEUMANN │ │ │ │ +295 │ │ │ │ +296#ifdef IS_NEUMANN │ │ │ │ +297 #undef IS_NEUMANN │ │ │ │ +298#endif // IS_NEUMANN │ │ │ │ +299 │ │ │ │ +300#ifdef IS_DIRICHLET │ │ │ │ +301 #undef IS_DIRICHLET │ │ │ │ +302#endif // IS_DIRICHLET │ │ │ │ +303 │ │ │ │ +304#ifdef IS_INTERIOR │ │ │ │ +305 #undef IS_INTERIOR │ │ │ │ +306#endif // IS_INTERIOR │ │ │ │ +307 │ │ │ │ +308#ifdef N_BNDRY_TYPES │ │ │ │ +309 #undef N_BNDRY_TYPES │ │ │ │ +310#endif // N_BNDRY_TYPES │ │ │ │ +311 │ │ │ │ +312#ifdef LIST_ENTRY │ │ │ │ +313 #undef LIST_ENTRY │ │ │ │ +314#endif // LIST_ENTRY │ │ │ │ +315 │ │ │ │ +316#ifdef INIT_EL_TAG_CTX_INIT │ │ │ │ +317 #undef INIT_EL_TAG_CTX_INIT │ │ │ │ +318#endif // INIT_EL_TAG_CTX_INIT │ │ │ │ +319 │ │ │ │ +320#ifdef INIT_EL_TAG_CTX_UNIQ │ │ │ │ +321 #undef INIT_EL_TAG_CTX_UNIQ │ │ │ │ +322#endif // INIT_EL_TAG_CTX_UNIQ │ │ │ │ +323 │ │ │ │ +324#ifdef INIT_EL_TAG_CTX_NULL │ │ │ │ +325 #undef INIT_EL_TAG_CTX_NULL │ │ │ │ +326#endif // INIT_EL_TAG_CTX_NULL │ │ │ │ +327 │ │ │ │ +328#ifdef INIT_EL_TAG_CTX_DFLT │ │ │ │ +329 #undef INIT_EL_TAG_CTX_DFLT │ │ │ │ +330#endif // INIT_EL_TAG_CTX_DFLT │ │ │ │ +331 │ │ │ │ +332#ifdef INIT_EL_TAG_CTX_TAG │ │ │ │ +333 #undef INIT_EL_TAG_CTX_TAG │ │ │ │ +334#endif // INIT_EL_TAG_CTX_TAG │ │ │ │ +335 │ │ │ │ +336#ifdef INIT_ELEMENT_METHOD │ │ │ │ +337 #undef INIT_ELEMENT_METHOD │ │ │ │ +338#endif // INIT_ELEMENT_METHOD │ │ │ │ +339 │ │ │ │ +340#ifdef INIT_ELEMENT_FLAGS │ │ │ │ +341 #undef INIT_ELEMENT_FLAGS │ │ │ │ +342#endif // INIT_ELEMENT_FLAGS │ │ │ │ +343 │ │ │ │ +344#ifdef INIT_ELEMENT_DEFUN │ │ │ │ +345 #undef INIT_ELEMENT_DEFUN │ │ │ │ +346#endif // INIT_ELEMENT_DEFUN │ │ │ │ +347 │ │ │ │ +348#ifdef INIT_OBJECT │ │ │ │ +349 #undef INIT_OBJECT │ │ │ │ +350#endif // INIT_OBJECT │ │ │ │ +351 │ │ │ │ +352#ifdef INIT_ELEMENT_DECL │ │ │ │ +353 #undef INIT_ELEMENT_DECL │ │ │ │ +354#endif // INIT_ELEMENT_DECL │ │ │ │ +355 │ │ │ │ +356#ifdef INIT_ELEMENT_INITIALIZER │ │ │ │ +357 #undef INIT_ELEMENT_INITIALIZER │ │ │ │ +358#endif // INIT_ELEMENT_INITIALIZER │ │ │ │ +359 │ │ │ │ +360#ifdef INIT_ELEMENT │ │ │ │ +361 #undef INIT_ELEMENT │ │ │ │ +362#endif // INIT_ELEMENT │ │ │ │ +363 │ │ │ │ +364#ifdef INIT_ELEMENT_NEEDED │ │ │ │ +365 #undef INIT_ELEMENT_NEEDED │ │ │ │ +366#endif // INIT_ELEMENT_NEEDED │ │ │ │ +367 │ │ │ │ +368#ifdef INIT_ELEMENT_SETUP │ │ │ │ +369 #undef INIT_ELEMENT_SETUP │ │ │ │ +370#endif // INIT_ELEMENT_SETUP │ │ │ │ +371 │ │ │ │ +372#ifdef INIT_OBJECT_SINGLE │ │ │ │ +373 #undef INIT_OBJECT_SINGLE │ │ │ │ +374#endif // INIT_OBJECT_SINGLE │ │ │ │ +375 │ │ │ │ +376#ifdef INIT_ELEMENT_SINGLE │ │ │ │ +377 #undef INIT_ELEMENT_SINGLE │ │ │ │ +378#endif // INIT_ELEMENT_SINGLE │ │ │ │ +379 │ │ │ │ +380#ifdef vertex_of_wall_2d │ │ │ │ +381 #undef vertex_of_wall_2d │ │ │ │ +382#endif // vertex_of_wall_2d │ │ │ │ +383 │ │ │ │ +384#ifdef PARAM_STRATEGY_MASK │ │ │ │ +385 #undef PARAM_STRATEGY_MASK │ │ │ │ +386#endif // PARAM_STRATEGY_MASK │ │ │ │ +387 │ │ │ │ +388#ifdef PARAM_PERIODIC_COORDS │ │ │ │ +389 #undef PARAM_PERIODIC_COORDS │ │ │ │ +390#endif // PARAM_PERIODIC_COORDS │ │ │ │ +391 │ │ │ │ +392#ifdef FILL_EL_DET │ │ │ │ +393 #undef FILL_EL_DET │ │ │ │ +394#endif // FILL_EL_DET │ │ │ │ +395 │ │ │ │ +396#ifdef FILL_EL_LAMBDA │ │ │ │ +397 #undef FILL_EL_LAMBDA │ │ │ │ +398#endif // FILL_EL_LAMBDA │ │ │ │ +399 │ │ │ │ +400#ifdef FILL_EL_WALL_SHIFT │ │ │ │ +401 #undef FILL_EL_WALL_SHIFT │ │ │ │ +402#endif // FILL_EL_WALL_SHIFT │ │ │ │ +403 │ │ │ │ +404#ifdef FILL_EL_WALL_MASK │ │ │ │ +405 #undef FILL_EL_WALL_MASK │ │ │ │ +406#endif // FILL_EL_WALL_MASK │ │ │ │ +407 │ │ │ │ +408#ifdef FILL_EL_WALL_DET │ │ │ │ +409 #undef FILL_EL_WALL_DET │ │ │ │ +410#endif // FILL_EL_WALL_DET │ │ │ │ +411 │ │ │ │ +412#ifdef FILL_EL_WALL_NORMAL │ │ │ │ +413 #undef FILL_EL_WALL_NORMAL │ │ │ │ +414#endif // FILL_EL_WALL_NORMAL │ │ │ │ +415 │ │ │ │ +416#ifdef FILL_EL_WALL_ORIENTATION │ │ │ │ +417 #undef FILL_EL_WALL_ORIENTATION │ │ │ │ +418#endif // FILL_EL_WALL_ORIENTATION │ │ │ │ +419 │ │ │ │ +420#ifdef FILL_EL_WALL_REL_ORIENTATION │ │ │ │ +421 #undef FILL_EL_WALL_REL_ORIENTATION │ │ │ │ +422#endif // FILL_EL_WALL_REL_ORIENTATION │ │ │ │ +423 │ │ │ │ +424#ifdef FILL_EL_WALL_DETS │ │ │ │ +425 #undef FILL_EL_WALL_DETS │ │ │ │ +426#endif // FILL_EL_WALL_DETS │ │ │ │ +427 │ │ │ │ +428#ifdef FILL_EL_WALL_NORMALS │ │ │ │ +429 #undef FILL_EL_WALL_NORMALS │ │ │ │ +430#endif // FILL_EL_WALL_NORMALS │ │ │ │ +431 │ │ │ │ +432#ifdef FILL_EL_WALL_ORIENTATIONS │ │ │ │ +433 #undef FILL_EL_WALL_ORIENTATIONS │ │ │ │ +434#endif // FILL_EL_WALL_ORIENTATIONS │ │ │ │ +435 │ │ │ │ +436#ifdef FILL_EL_WALL_REL_ORIENTATIONS │ │ │ │ +437 #undef FILL_EL_WALL_REL_ORIENTATIONS │ │ │ │ +438#endif // FILL_EL_WALL_REL_ORIENTATIONS │ │ │ │ +439 │ │ │ │ +440#ifdef BNDRY_FLAGS_INIT │ │ │ │ +441 #undef BNDRY_FLAGS_INIT │ │ │ │ +442#endif // BNDRY_FLAGS_INIT │ │ │ │ +443 │ │ │ │ +444#ifdef BNDRY_FLAGS_ALL │ │ │ │ +445 #undef BNDRY_FLAGS_ALL │ │ │ │ +446#endif // BNDRY_FLAGS_ALL │ │ │ │ +447 │ │ │ │ +448#ifdef BNDRY_FLAGS_CPY │ │ │ │ +449 #undef BNDRY_FLAGS_CPY │ │ │ │ +450#endif // BNDRY_FLAGS_CPY │ │ │ │ +451 │ │ │ │ +452#ifdef BNDRY_FLAGS_AND │ │ │ │ +453 #undef BNDRY_FLAGS_AND │ │ │ │ +454#endif // BNDRY_FLAGS_AND │ │ │ │ +455 │ │ │ │ +456#ifdef BNDRY_FLAGS_OR │ │ │ │ +457 #undef BNDRY_FLAGS_OR │ │ │ │ +458#endif // BNDRY_FLAGS_OR │ │ │ │ +459 │ │ │ │ +460#ifdef BNDRY_FLAGS_XOR │ │ │ │ +461 #undef BNDRY_FLAGS_XOR │ │ │ │ +462#endif // BNDRY_FLAGS_XOR │ │ │ │ +463 │ │ │ │ +464#ifdef BNDRY_FLAGS_IS_INTERIOR │ │ │ │ +465 #undef BNDRY_FLAGS_IS_INTERIOR │ │ │ │ +466#endif // BNDRY_FLAGS_IS_INTERIOR │ │ │ │ +467 │ │ │ │ +468#ifdef BNDRY_FLAGS_IS_AT_BNDRY │ │ │ │ +469 #undef BNDRY_FLAGS_IS_AT_BNDRY │ │ │ │ +470#endif // BNDRY_FLAGS_IS_AT_BNDRY │ │ │ │ +471 │ │ │ │ +472#ifdef BNDRY_FLAGS_SET │ │ │ │ +473 #undef BNDRY_FLAGS_SET │ │ │ │ +474#endif // BNDRY_FLAGS_SET │ │ │ │ +475 │ │ │ │ +476#ifdef BNDRY_FLAGS_IS_PARTOF │ │ │ │ +477 #undef BNDRY_FLAGS_IS_PARTOF │ │ │ │ +478#endif // BNDRY_FLAGS_IS_PARTOF │ │ │ │ +479 │ │ │ │ +480#ifdef BNDRY_FLAGS_FFBB │ │ │ │ +481 #undef BNDRY_FLAGS_FFBB │ │ │ │ +482#endif // BNDRY_FLAGS_FFBB │ │ │ │ +483 │ │ │ │ +484#ifdef RCLE_NONE │ │ │ │ +485 #undef RCLE_NONE │ │ │ │ +486#endif // RCLE_NONE │ │ │ │ +487 │ │ │ │ +488#ifdef RCLE_COARSE_EDGE_COMPAT │ │ │ │ +489 #undef RCLE_COARSE_EDGE_COMPAT │ │ │ │ +490#endif // RCLE_COARSE_EDGE_COMPAT │ │ │ │ +491 │ │ │ │ +492#ifdef FILL_NOTHING │ │ │ │ +493 #undef FILL_NOTHING │ │ │ │ +494#endif // FILL_NOTHING │ │ │ │ +495 │ │ │ │ +496#ifdef FILL_COORDS │ │ │ │ +497 #undef FILL_COORDS │ │ │ │ +498#endif // FILL_COORDS │ │ │ │ +499 │ │ │ │ +500#ifdef FILL_BOUND │ │ │ │ +501 #undef FILL_BOUND │ │ │ │ +502#endif // FILL_BOUND │ │ │ │ +503 │ │ │ │ +504#ifdef FILL_NEIGH │ │ │ │ +505 #undef FILL_NEIGH │ │ │ │ +506#endif // FILL_NEIGH │ │ │ │ +507 │ │ │ │ +508#ifdef FILL_OPP_COORDS │ │ │ │ +509 #undef FILL_OPP_COORDS │ │ │ │ +510#endif // FILL_OPP_COORDS │ │ │ │ +511 │ │ │ │ +512#ifdef FILL_ORIENTATION │ │ │ │ +513 #undef FILL_ORIENTATION │ │ │ │ +514#endif // FILL_ORIENTATION │ │ │ │ +515 │ │ │ │ +516#ifdef FILL_PROJECTION │ │ │ │ +517 #undef FILL_PROJECTION │ │ │ │ +518#endif // FILL_PROJECTION │ │ │ │ +519 │ │ │ │ +520#ifdef FILL_MACRO_WALLS │ │ │ │ +521 #undef FILL_MACRO_WALLS │ │ │ │ +522#endif // FILL_MACRO_WALLS │ │ │ │ +523 │ │ │ │ +524#ifdef FILL_WALL_MAP │ │ │ │ +525 #undef FILL_WALL_MAP │ │ │ │ +526#endif // FILL_WALL_MAP │ │ │ │ +527 │ │ │ │ +528#ifdef FILL_NON_PERIODIC │ │ │ │ +529 #undef FILL_NON_PERIODIC │ │ │ │ +530#endif // FILL_NON_PERIODIC │ │ │ │ +531 │ │ │ │ +532#ifdef FILL_MASTER_INFO │ │ │ │ +533 #undef FILL_MASTER_INFO │ │ │ │ +534#endif // FILL_MASTER_INFO │ │ │ │ +535 │ │ │ │ +536#ifdef FILL_ANY │ │ │ │ +537 #undef FILL_ANY │ │ │ │ +538#endif // FILL_ANY │ │ │ │ +539 │ │ │ │ +540#ifdef CALL_EVERY_EL_PREORDER │ │ │ │ +541 #undef CALL_EVERY_EL_PREORDER │ │ │ │ +542#endif // CALL_EVERY_EL_PREORDER │ │ │ │ +543 │ │ │ │ +544#ifdef CALL_EVERY_EL_INORDER │ │ │ │ +545 #undef CALL_EVERY_EL_INORDER │ │ │ │ +546#endif // CALL_EVERY_EL_INORDER │ │ │ │ +547 │ │ │ │ +548#ifdef CALL_EVERY_EL_POSTORDER │ │ │ │ +549 #undef CALL_EVERY_EL_POSTORDER │ │ │ │ +550#endif // CALL_EVERY_EL_POSTORDER │ │ │ │ +551 │ │ │ │ +552#ifdef CALL_LEAF_EL │ │ │ │ +553 #undef CALL_LEAF_EL │ │ │ │ +554#endif // CALL_LEAF_EL │ │ │ │ +555 │ │ │ │ +556#ifdef CALL_LEAF_EL_LEVEL │ │ │ │ +557 #undef CALL_LEAF_EL_LEVEL │ │ │ │ +558#endif // CALL_LEAF_EL_LEVEL │ │ │ │ +559 │ │ │ │ +560#ifdef CALL_EL_LEVEL │ │ │ │ +561 #undef CALL_EL_LEVEL │ │ │ │ +562#endif // CALL_EL_LEVEL │ │ │ │ +563 │ │ │ │ +564#ifdef CALL_MG_LEVEL │ │ │ │ +565 #undef CALL_MG_LEVEL │ │ │ │ +566#endif // CALL_MG_LEVEL │ │ │ │ +567 │ │ │ │ +568#ifdef TEST_FLAG │ │ │ │ +569 #undef TEST_FLAG │ │ │ │ +570#endif // TEST_FLAG │ │ │ │ +571 │ │ │ │ +572#ifdef ADM_FLAGS_MASK │ │ │ │ +573 #undef ADM_FLAGS_MASK │ │ │ │ +574#endif // ADM_FLAGS_MASK │ │ │ │ +575 │ │ │ │ +576#ifdef UCHAR_name │ │ │ │ +577 #undef UCHAR_name │ │ │ │ +578#endif // UCHAR_name │ │ │ │ +579 │ │ │ │ +580#ifdef uchar_VECNAME │ │ │ │ +581 #undef uchar_VECNAME │ │ │ │ +582#endif // uchar_VECNAME │ │ │ │ +583 │ │ │ │ +584#ifdef SCHAR_name │ │ │ │ +585 #undef SCHAR_name │ │ │ │ +586#endif // SCHAR_name │ │ │ │ +587 │ │ │ │ +588#ifdef schar_VECNAME │ │ │ │ +589 #undef schar_VECNAME │ │ │ │ +590#endif // schar_VECNAME │ │ │ │ +591 │ │ │ │ +592#ifdef INT_name │ │ │ │ +593 #undef INT_name │ │ │ │ +594#endif // INT_name │ │ │ │ +595 │ │ │ │ +596#ifdef int_VECNAME │ │ │ │ +597 #undef int_VECNAME │ │ │ │ +598#endif // int_VECNAME │ │ │ │ +599 │ │ │ │ +600#ifdef DOF_name │ │ │ │ +601 #undef DOF_name │ │ │ │ +602#endif // DOF_name │ │ │ │ +603 │ │ │ │ +604#ifdef dof_VECNAME │ │ │ │ +605 #undef dof_VECNAME │ │ │ │ +606#endif // dof_VECNAME │ │ │ │ +607 │ │ │ │ +608#ifdef PTR_name │ │ │ │ +609 #undef PTR_name │ │ │ │ +610#endif // PTR_name │ │ │ │ +611 │ │ │ │ +612#ifdef ptr_VECNAME │ │ │ │ +613 #undef ptr_VECNAME │ │ │ │ +614#endif // ptr_VECNAME │ │ │ │ +615 │ │ │ │ +616#ifdef REAL_name │ │ │ │ +617 #undef REAL_name │ │ │ │ +618#endif // REAL_name │ │ │ │ +619 │ │ │ │ +620#ifdef real_VECNAME │ │ │ │ +621 #undef real_VECNAME │ │ │ │ +622#endif // real_VECNAME │ │ │ │ +623 │ │ │ │ +624#ifdef REAL_D_name │ │ │ │ +625 #undef REAL_D_name │ │ │ │ +626#endif // REAL_D_name │ │ │ │ +627 │ │ │ │ +628#ifdef real_d_VECNAME │ │ │ │ +629 #undef real_d_VECNAME │ │ │ │ +630#endif // real_d_VECNAME │ │ │ │ +631 │ │ │ │ +632#ifdef BNDRY_name │ │ │ │ +633 #undef BNDRY_name │ │ │ │ +634#endif // BNDRY_name │ │ │ │ +635 │ │ │ │ +636#ifdef bndry_VECNAME │ │ │ │ +637 #undef bndry_VECNAME │ │ │ │ +638#endif // bndry_VECNAME │ │ │ │ +639 │ │ │ │ +640#ifdef DECL_DOF_EL_VEC │ │ │ │ +641 #undef DECL_DOF_EL_VEC │ │ │ │ +642#endif // DECL_DOF_EL_VEC │ │ │ │ +643 │ │ │ │ +644#ifdef PHI │ │ │ │ +645 #undef PHI │ │ │ │ +646#endif // PHI │ │ │ │ +647 │ │ │ │ +648#ifdef GRD_PHI │ │ │ │ +649 #undef GRD_PHI │ │ │ │ +650#endif // GRD_PHI │ │ │ │ +651 │ │ │ │ +652#ifdef D2_PHI │ │ │ │ +653 #undef D2_PHI │ │ │ │ +654#endif // D2_PHI │ │ │ │ +655 │ │ │ │ +656#ifdef D3_PHI │ │ │ │ +657 #undef D3_PHI │ │ │ │ +658#endif // D3_PHI │ │ │ │ +659 │ │ │ │ +660#ifdef D4_PHI │ │ │ │ +661 #undef D4_PHI │ │ │ │ +662#endif // D4_PHI │ │ │ │ +663 │ │ │ │ +664#ifdef PHI_D │ │ │ │ +665 #undef PHI_D │ │ │ │ +666#endif // PHI_D │ │ │ │ +667 │ │ │ │ +668#ifdef GRD_PHI_D │ │ │ │ +669 #undef GRD_PHI_D │ │ │ │ +670#endif // GRD_PHI_D │ │ │ │ +671 │ │ │ │ +672#ifdef D2_PHI_D │ │ │ │ +673 #undef D2_PHI_D │ │ │ │ +674#endif // D2_PHI_D │ │ │ │ +675 │ │ │ │ +676#ifdef GET_DOF_INDICES │ │ │ │ +677 #undef GET_DOF_INDICES │ │ │ │ +678#endif // GET_DOF_INDICES │ │ │ │ +679 │ │ │ │ +680#ifdef INTERPOL │ │ │ │ +681 #undef INTERPOL │ │ │ │ +682#endif // INTERPOL │ │ │ │ +683 │ │ │ │ +684#ifdef INTERPOL_D │ │ │ │ +685 #undef INTERPOL_D │ │ │ │ +686#endif // INTERPOL_D │ │ │ │ +687 │ │ │ │ +688#ifdef INTERPOL_DOW │ │ │ │ +689 #undef INTERPOL_DOW │ │ │ │ +690#endif // INTERPOL_DOW │ │ │ │ +691 │ │ │ │ +692#ifdef GET_BOUND │ │ │ │ +693 #undef GET_BOUND │ │ │ │ +694#endif // GET_BOUND │ │ │ │ +695 │ │ │ │ +696#ifdef LAGRANGE_NODES │ │ │ │ +697 #undef LAGRANGE_NODES │ │ │ │ +698#endif // LAGRANGE_NODES │ │ │ │ +699 │ │ │ │ +700#ifdef FILL_EL_QUAD_WORLD │ │ │ │ +701 #undef FILL_EL_QUAD_WORLD │ │ │ │ +702#endif // FILL_EL_QUAD_WORLD │ │ │ │ +703 │ │ │ │ +704#ifdef FILL_EL_QUAD_DET │ │ │ │ +705 #undef FILL_EL_QUAD_DET │ │ │ │ +706#endif // FILL_EL_QUAD_DET │ │ │ │ +707 │ │ │ │ +708#ifdef FILL_EL_QUAD_LAMBDA │ │ │ │ +709 #undef FILL_EL_QUAD_LAMBDA │ │ │ │ +710#endif // FILL_EL_QUAD_LAMBDA │ │ │ │ +711 │ │ │ │ +712#ifdef FILL_EL_QUAD_DLAMBDA │ │ │ │ +713 #undef FILL_EL_QUAD_DLAMBDA │ │ │ │ +714#endif // FILL_EL_QUAD_DLAMBDA │ │ │ │ +715 │ │ │ │ +716#ifdef FILL_EL_QUAD_GRD_WORLD │ │ │ │ +717 #undef FILL_EL_QUAD_GRD_WORLD │ │ │ │ +718#endif // FILL_EL_QUAD_GRD_WORLD │ │ │ │ +719 │ │ │ │ +720#ifdef FILL_EL_QUAD_D2_WORLD │ │ │ │ +721 #undef FILL_EL_QUAD_D2_WORLD │ │ │ │ +722#endif // FILL_EL_QUAD_D2_WORLD │ │ │ │ +723 │ │ │ │ +724#ifdef FILL_EL_QUAD_D3_WORLD │ │ │ │ +725 #undef FILL_EL_QUAD_D3_WORLD │ │ │ │ +726#endif // FILL_EL_QUAD_D3_WORLD │ │ │ │ +727 │ │ │ │ +728#ifdef FILL_EL_QUAD_WALL_DET │ │ │ │ +729 #undef FILL_EL_QUAD_WALL_DET │ │ │ │ +730#endif // FILL_EL_QUAD_WALL_DET │ │ │ │ +731 │ │ │ │ +732#ifdef FILL_EL_QUAD_WALL_NORMAL │ │ │ │ +733 #undef FILL_EL_QUAD_WALL_NORMAL │ │ │ │ +734#endif // FILL_EL_QUAD_WALL_NORMAL │ │ │ │ +735 │ │ │ │ +736#ifdef FILL_EL_QUAD_GRD_NORMAL │ │ │ │ +737 #undef FILL_EL_QUAD_GRD_NORMAL │ │ │ │ +738#endif // FILL_EL_QUAD_GRD_NORMAL │ │ │ │ +739 │ │ │ │ +740#ifdef FILL_EL_QUAD_D2_NORMAL │ │ │ │ +741 #undef FILL_EL_QUAD_D2_NORMAL │ │ │ │ +742#endif // FILL_EL_QUAD_D2_NORMAL │ │ │ │ +743 │ │ │ │ +744#ifdef INIT_PHI │ │ │ │ +745 #undef INIT_PHI │ │ │ │ +746#endif // INIT_PHI │ │ │ │ +747 │ │ │ │ +748#ifdef INIT_GRD_PHI │ │ │ │ +749 #undef INIT_GRD_PHI │ │ │ │ +750#endif // INIT_GRD_PHI │ │ │ │ +751 │ │ │ │ +752#ifdef INIT_D2_PHI │ │ │ │ +753 #undef INIT_D2_PHI │ │ │ │ +754#endif // INIT_D2_PHI │ │ │ │ +755 │ │ │ │ +756#ifdef INIT_D3_PHI │ │ │ │ +757 #undef INIT_D3_PHI │ │ │ │ +758#endif // INIT_D3_PHI │ │ │ │ +759 │ │ │ │ +760#ifdef INIT_D4_PHI │ │ │ │ +761 #undef INIT_D4_PHI │ │ │ │ +762#endif // INIT_D4_PHI │ │ │ │ +763 │ │ │ │ +764#ifdef INIT_TANGENTIAL │ │ │ │ +765 #undef INIT_TANGENTIAL │ │ │ │ +766#endif // INIT_TANGENTIAL │ │ │ │ +767 │ │ │ │ +768#ifdef MESH_REFINED │ │ │ │ +769 #undef MESH_REFINED │ │ │ │ +770#endif // MESH_REFINED │ │ │ │ +771 │ │ │ │ +772#ifdef MESH_COARSENED │ │ │ │ +773 #undef MESH_COARSENED │ │ │ │ +774#endif // MESH_COARSENED │ │ │ │ +775 │ │ │ │ +776#ifdef GRAPH_MESH_BOUNDARY │ │ │ │ +777 #undef GRAPH_MESH_BOUNDARY │ │ │ │ +778#endif // GRAPH_MESH_BOUNDARY │ │ │ │ +779 │ │ │ │ +780#ifdef GRAPH_MESH_ELEMENT_MARK │ │ │ │ +781 #undef GRAPH_MESH_ELEMENT_MARK │ │ │ │ +782#endif // GRAPH_MESH_ELEMENT_MARK │ │ │ │ +783 │ │ │ │ +784#ifdef GRAPH_MESH_VERTEX_DOF │ │ │ │ +785 #undef GRAPH_MESH_VERTEX_DOF │ │ │ │ +786#endif // GRAPH_MESH_VERTEX_DOF │ │ │ │ +787 │ │ │ │ +788#ifdef GRAPH_MESH_ELEMENT_INDEX │ │ │ │ +789 #undef GRAPH_MESH_ELEMENT_INDEX │ │ │ │ +790#endif // GRAPH_MESH_ELEMENT_INDEX │ │ │ │ +791 │ │ │ │ +792#ifdef GET_MESH │ │ │ │ +793 #undef GET_MESH │ │ │ │ +794#endif // GET_MESH │ │ │ │ +795 │ │ │ │ +796#ifdef GET_DOF_VEC │ │ │ │ +797 #undef GET_DOF_VEC │ │ │ │ +798#endif // GET_DOF_VEC │ │ │ │ +799 │ │ │ │ +800#ifdef TRACE_DOF_VEC_PROTO │ │ │ │ +801 #undef TRACE_DOF_VEC_PROTO │ │ │ │ +802#endif // TRACE_DOF_VEC_PROTO │ │ │ │ +803 │ │ │ │ +804#ifdef INIT_UH │ │ │ │ +805 #undef INIT_UH │ │ │ │ +806#endif // INIT_UH │ │ │ │ +807 │ │ │ │ +808#ifdef INIT_GRD_UH │ │ │ │ +809 #undef INIT_GRD_UH │ │ │ │ +810#endif // INIT_GRD_UH │ │ │ │ +811 │ │ │ │ +812#ifdef ellipt_est_d_init │ │ │ │ +813 #undef ellipt_est_d_init │ │ │ │ +814#endif // ellipt_est_d_init │ │ │ │ +815 │ │ │ │ +816#ifdef head_est_d_init │ │ │ │ +817 #undef head_est_d_init │ │ │ │ +818#endif // head_est_d_init │ │ │ │ +819 │ │ │ │ +820#ifdef element_est_d │ │ │ │ +821 #undef element_est_d │ │ │ │ +822#endif // element_est_d │ │ │ │ +823 │ │ │ │ +824#ifdef element_est_d_finish │ │ │ │ +825 #undef element_est_d_finish │ │ │ │ +826#endif // element_est_d_finish │ │ │ │ +827 │ │ │ │ +828#ifdef element_est_uh_d │ │ │ │ +829 #undef element_est_uh_d │ │ │ │ +830#endif // element_est_uh_d │ │ │ │ +831 │ │ │ │ +832#ifdef element_est_grd_uh_d │ │ │ │ +833 #undef element_est_grd_uh_d │ │ │ │ +834#endif // element_est_grd_uh_d │ │ │ │ +835 │ │ │ │ +836#ifdef ellipt_est_d_finish │ │ │ │ +837 #undef ellipt_est_d_finish │ │ │ │ +838#endif // ellipt_est_d_finish │ │ │ │ +839 │ │ │ │ +840#ifdef heat_est_d_finish │ │ │ │ +841 #undef heat_est_d_finish │ │ │ │ +842#endif // heat_est_d_finish │ │ │ │ +843 │ │ │ │ +844#ifdef TRAVERSE_FIRST │ │ │ │ +845 #undef TRAVERSE_FIRST │ │ │ │ +846#endif // TRAVERSE_FIRST │ │ │ │ +847 │ │ │ │ +848#ifdef TRAVERSE_NEXT │ │ │ │ +849 #undef TRAVERSE_NEXT │ │ │ │ +850#endif // TRAVERSE_NEXT │ │ │ │ +851 │ │ │ │ +852#ifdef TRAVERSE_START │ │ │ │ +853 #undef TRAVERSE_START │ │ │ │ +854#endif // TRAVERSE_START │ │ │ │ +855 │ │ │ │ +856#ifdef TRAVERSE_STOP │ │ │ │ +857 #undef TRAVERSE_STOP │ │ │ │ +858#endif // TRAVERSE_STOP │ │ │ │ +859 │ │ │ │ +860#ifdef TRAVERSE_NEIGHBOUR │ │ │ │ +861 #undef TRAVERSE_NEIGHBOUR │ │ │ │ +862#endif // TRAVERSE_NEIGHBOUR │ │ │ │ +863 │ │ │ │ +864#ifdef IFF_TAG_ALBERTA │ │ │ │ +865 #undef IFF_TAG_ALBERTA │ │ │ │ +866#endif // IFF_TAG_ALBERTA │ │ │ │ +867 │ │ │ │ +868#ifdef IFF_TAG_MESH │ │ │ │ +869 #undef IFF_TAG_MESH │ │ │ │ +870#endif // IFF_TAG_MESH │ │ │ │ +871 │ │ │ │ +872#ifdef IFF_TAG_REAL_VEC │ │ │ │ +873 #undef IFF_TAG_REAL_VEC │ │ │ │ +874#endif // IFF_TAG_REAL_VEC │ │ │ │ +875 │ │ │ │ +876#ifdef IFF_TAG_REAL_D_VEC │ │ │ │ +877 #undef IFF_TAG_REAL_D_VEC │ │ │ │ +878#endif // IFF_TAG_REAL_D_VEC │ │ │ │ +879 │ │ │ │ +880#ifdef IFF_TAG_INT_VEC │ │ │ │ +881 #undef IFF_TAG_INT_VEC │ │ │ │ +882#endif // IFF_TAG_INT_VEC │ │ │ │ +883 │ │ │ │ +884#ifdef IFF_TAG_UCHAR_VEC │ │ │ │ +885 #undef IFF_TAG_UCHAR_VEC │ │ │ │ +886#endif // IFF_TAG_UCHAR_VEC │ │ │ │ +887 │ │ │ │ +888#ifdef IFF_TAG_SCHAR_VEC │ │ │ │ +889 #undef IFF_TAG_SCHAR_VEC │ │ │ │ +890#endif // IFF_TAG_SCHAR_VEC │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00710.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: albertareader.hh File Reference │ │ │ +dune-grid: hierarchiciterator.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,27 +72,25 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
albertareader.hh File Reference
│ │ │ +
hierarchiciterator.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>
│ │ │ +
#include <dune/grid/albertagrid/elementinfo.hh>
│ │ │ +#include <dune/grid/common/entityiterator.hh>
│ │ │
│ │ │

Go to the source code of this file.

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

│ │ │ Classes

class  Dune::AlbertaReader< Grid >
class  Dune::AlbertaGridHierarchicIterator< GridImp >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -2,22 +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 │ │ │ │ -albertareader.hh File Reference │ │ │ │ -#include │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_._h_h> │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_f_a_c_t_o_r_y_._h_h> │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_m_a_c_r_o_d_a_t_a_._h_h> │ │ │ │ +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_R_e_a_d_e_r_<_ _G_r_i_d_ _> │ │ │ │ +class   _D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_ _G_r_i_d_I_m_p_ _> │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │   Include standard header files. │ │ │ │   │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00710_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: albertareader.hh Source File │ │ │ +dune-grid: hierarchiciterator.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,134 +74,210 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
albertareader.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_ALBERTAREADER_HH
│ │ │ -
6#define DUNE_ALBERTA_ALBERTAREADER_HH
│ │ │ +
5#ifndef DUNE_ALBERTA_HIERARCHICITERATOR_HH
│ │ │ +
6#define DUNE_ALBERTA_HIERARCHICITERATOR_HH
│ │ │
7
│ │ │ -
8#include <dune/geometry/type.hh>
│ │ │ -
9
│ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ +
10
│ │ │ +
11#if HAVE_ALBERTA
│ │ │
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
│ │ │ - │ │ │ +
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 MacroData macroData_;
│ │ │ +
39 typedef typename EntityImp::ElementInfo ElementInfo;
│ │ │
40
│ │ │ -
41 AlbertaReader ( const This & );
│ │ │ -
42 This &operator= ( const This & );
│ │ │ +
│ │ │ + │ │ │ +
42 {}
│ │ │ +
│ │ │
43
│ │ │ -
44 public:
│ │ │ -
│ │ │ - │ │ │ -
46 {}
│ │ │ -
│ │ │ -
47
│ │ │ -
│ │ │ -
48 void readGrid ( const std::string &fileName, GridFactory &factory )
│ │ │ -
49 {
│ │ │ -
50 // read ALBERTA macro triangulation
│ │ │ -
51 macroData_.read( fileName, false );
│ │ │ -
52
│ │ │ -
53 // insert all vertices into the factory
│ │ │ -
54 const int numVertices = macroData_.vertexCount();
│ │ │ -
55 for( int i = 0; i < numVertices; ++i )
│ │ │ -
56 {
│ │ │ -
57 FieldVector< ctype, dimensionworld > v;
│ │ │ -
58 const Alberta::GlobalVector &coords = macroData_.vertex( i );
│ │ │ -
59 for( int j = 0; j < dimensionworld; ++j )
│ │ │ -
60 v[ j ] = coords[ j ];
│ │ │ -
61 factory.insertVertex( v );
│ │ │ -
62 }
│ │ │ -
63
│ │ │ -
64 // insert all elements into the factory
│ │ │ -
65 std::vector< unsigned int > vertices( dimension+1 );
│ │ │ -
66 const int numElements = macroData_.elementCount();
│ │ │ -
67 for( int i = 0; i < numElements; ++i )
│ │ │ -
68 {
│ │ │ -
69 const typename MacroData::ElementId &id = macroData_.element( i );
│ │ │ -
70 for( int j = 0; j <= dimension; ++j )
│ │ │ -
71 vertices[ j ] = id[ j ];
│ │ │ -
72 factory.insertElement( GeometryTypes::simplex( dimension ), vertices );
│ │ │ -
73 }
│ │ │ -
74
│ │ │ -
75 // release ALBERTA macro data
│ │ │ -
76 macroData_.release();
│ │ │ +
45 AlbertaGridHierarchicIterator ( const GridImp &grid,
│ │ │ +
46 const ElementInfo &elementInfo,
│ │ │ +
47 int maxLevel );
│ │ │ +
48
│ │ │ +
50 AlbertaGridHierarchicIterator ( const GridImp &grid, int actLevel, int maxLevel );
│ │ │ +
51
│ │ │ +
53 AlbertaGridHierarchicIterator ( const This &other );
│ │ │ +
54
│ │ │ +
56 This &operator= ( const This &other );
│ │ │ +
57
│ │ │ +
59 void increment();
│ │ │ +
60
│ │ │ +
│ │ │ +
62 bool 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 };
│ │ │ +
78
│ │ │ +
79 protected:
│ │ │ +
│ │ │ +
81 const GridImp &grid () const
│ │ │ +
82 {
│ │ │ +
83 return entity_.impl().grid();
│ │ │ +
84 }
│ │ │ +
│ │ │ +
85
│ │ │ +
86 private:
│ │ │ +
87 void increment ( ElementInfo elementInfo );
│ │ │ +
88
│ │ │ +
89 mutable Entity entity_;
│ │ │ +
90
│ │ │ +
91 // level on which the iterator was started
│ │ │ +
92 int startLevel_;
│ │ │ +
93
│ │ │ +
94 // maximal level to go down to
│ │ │ +
95 int maxlevel_;
│ │ │ +
96 };
│ │ │ +
│ │ │ +
97
│ │ │ +
98
│ │ │ +
99 template< class GridImp >
│ │ │ +
100 inline AlbertaGridHierarchicIterator< GridImp >
│ │ │ +
│ │ │ +
101 ::AlbertaGridHierarchicIterator( const GridImp &grid, int actLevel, int maxLevel )
│ │ │ +
102 : entity_( EntityImp( grid ) ),
│ │ │ +
103 startLevel_( actLevel ),
│ │ │ +
104 maxlevel_( maxLevel )
│ │ │ +
105 {}
│ │ │ +
│ │ │ +
106
│ │ │ +
107
│ │ │ +
108 template< class GridImp >
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
111 const ElementInfo &elementInfo,
│ │ │ +
112 int maxLevel )
│ │ │ +
113 : entity_( EntityImp( grid ) ),
│ │ │ +
114 startLevel_( elementInfo.level() ),
│ │ │ +
115 maxlevel_( maxLevel )
│ │ │ +
116 {
│ │ │ +
117 increment( elementInfo );
│ │ │ +
118 }
│ │ │ +
│ │ │ +
119
│ │ │ +
120
│ │ │ +
121 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 }
│ │ │
│ │ │ -
79
│ │ │ -
80}
│ │ │ -
81
│ │ │ -
82#endif // #if HAVE_ALBERTA
│ │ │ -
83
│ │ │ -
84#endif
│ │ │ -
provides a wrapper for ALBERTA's macro_data structure
│ │ │ +
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
│ │ │ -
static const int dimWorld
Definition misc.hh:46
│ │ │ -
ALBERTA REAL_D GlobalVector
Definition misc.hh:50
│ │ │ -
Definition albertareader.hh:22
│ │ │ -
Grid::ctype ctype
Definition albertareader.hh:28
│ │ │ -
static const int dimensionworld
Definition albertareader.hh:31
│ │ │ -
static const int dimension
Definition albertareader.hh:30
│ │ │ -
Dune::GridFactory< Grid > GridFactory
Definition albertareader.hh:26
│ │ │ -
AlbertaReader()
Definition albertareader.hh:45
│ │ │ -
void readGrid(const std::string &fileName, GridFactory &factory)
Definition albertareader.hh:48
│ │ │ - │ │ │ -
int ElementId[numVertices]
Definition macrodata.hh:48
│ │ │ -
void release()
release the macro data structure
Definition macrodata.hh:127
│ │ │ -
int elementCount() const
Definition macrodata.hh:68
│ │ │ -
GlobalVector & vertex(int i) const
Definition macrodata.hh:255
│ │ │ -
int vertexCount() const
Definition macrodata.hh:63
│ │ │ -
ElementId & element(int i) const
Definition macrodata.hh:246
│ │ │ -
void read(const std::string &filename, bool binary=false)
Definition macrodata.hh:413
│ │ │ -
static constexpr int dimension
The dimension of the grid.
Definition common/grid.hh:387
│ │ │ -
static constexpr int dimensionworld
The dimension of the world the grid lives in.
Definition common/grid.hh:390
│ │ │ -
ct ctype
Define type used for coordinates in grid module.
Definition common/grid.hh: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 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,176 +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 │ │ │ │ -albertareader.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_ALBERTAREADER_HH │ │ │ │ -6#define DUNE_ALBERTA_ALBERTAREADER_HH │ │ │ │ +5#ifndef DUNE_ALBERTA_HIERARCHICITERATOR_HH │ │ │ │ +6#define DUNE_ALBERTA_HIERARCHICITERATOR_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> │ │ │ │ +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 │ │ │ │ -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; │ │ │ │ +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 _M_a_c_r_o_D_a_t_a macroData_; │ │ │ │ +_3_9 typedef typename EntityImp::ElementInfo _E_l_e_m_e_n_t_I_n_f_o; │ │ │ │ 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 & ); │ │ │ │ +_4_1 _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r () │ │ │ │ +42 {} │ │ │ │ 43 │ │ │ │ -44 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(); │ │ │ │ +45 _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r ( const GridImp &_g_r_i_d, │ │ │ │ +46 const _E_l_e_m_e_n_t_I_n_f_o &elementInfo, │ │ │ │ +47 int maxLevel ); │ │ │ │ +48 │ │ │ │ +50 _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r ( const GridImp &_g_r_i_d, int actLevel, int │ │ │ │ +maxLevel ); │ │ │ │ +51 │ │ │ │ +53 _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r ( const This &other ); │ │ │ │ +54 │ │ │ │ +56 This &_o_p_e_r_a_t_o_r_=_ ( const This &other ); │ │ │ │ +57 │ │ │ │ +59 void _i_n_c_r_e_m_e_n_t(); │ │ │ │ +60 │ │ │ │ +_6_2 bool _e_q_u_a_l_s ( const _T_h_i_s &other ) const │ │ │ │ +63 { │ │ │ │ +64 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 │ │ │ │ -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 │ │ │ │ +78 │ │ │ │ +79 protected: │ │ │ │ +_8_1 const GridImp &_g_r_i_d () const │ │ │ │ +82 { │ │ │ │ +83 return entity_.impl().grid(); │ │ │ │ +84 } │ │ │ │ +85 │ │ │ │ +86 private: │ │ │ │ +87 void _i_n_c_r_e_m_e_n_t ( _E_l_e_m_e_n_t_I_n_f_o elementInfo ); │ │ │ │ +88 │ │ │ │ +89 mutable _E_n_t_i_t_y entity_; │ │ │ │ +90 │ │ │ │ +91 // level on which the iterator was started │ │ │ │ +92 int startLevel_; │ │ │ │ +93 │ │ │ │ +94 // maximal level to go down to │ │ │ │ +95 int maxlevel_; │ │ │ │ +96 }; │ │ │ │ +97 │ │ │ │ +98 │ │ │ │ +99 template< class GridImp > │ │ │ │ +100 inline AlbertaGridHierarchicIterator< GridImp > │ │ │ │ +_1_0_1 ::AlbertaGridHierarchicIterator( const GridImp &grid, int actLevel, int │ │ │ │ +maxLevel ) │ │ │ │ +102 : entity_( _E_n_t_i_t_y_I_m_p( grid ) ), │ │ │ │ +103 startLevel_( actLevel ), │ │ │ │ +104 maxlevel_( maxLevel ) │ │ │ │ +105 {} │ │ │ │ +106 │ │ │ │ +107 │ │ │ │ +108 template< class GridImp > │ │ │ │ +109 inline _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ +_1_1_0_ _:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r ( const GridImp &grid, │ │ │ │ +111 const _E_l_e_m_e_n_t_I_n_f_o &elementInfo, │ │ │ │ +112 int maxLevel ) │ │ │ │ +113 : entity_( _E_n_t_i_t_y_I_m_p( grid ) ), │ │ │ │ +114 startLevel_( elementInfo.level() ), │ │ │ │ +115 maxlevel_( maxLevel ) │ │ │ │ +116 { │ │ │ │ +117 _i_n_c_r_e_m_e_n_t( elementInfo ); │ │ │ │ +118 } │ │ │ │ +119 │ │ │ │ +120 │ │ │ │ +121 template< class GridImp > │ │ │ │ +122 inline _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ +_1_2_3_ _:_:_A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r( const _T_h_i_s &other ) │ │ │ │ +124 : entity_( other.entity_ ), │ │ │ │ +125 startLevel_( other.startLevel_ ), │ │ │ │ +126 maxlevel_( other.maxlevel_ ) │ │ │ │ +127 {} │ │ │ │ +128 │ │ │ │ +129 │ │ │ │ +130 template< class GridImp > │ │ │ │ +131 inline typename _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_ _G_r_i_d_I_m_p_ _>_:_:_T_h_i_s & │ │ │ │ +_1_3_2 _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_ _G_r_i_d_I_m_p_ _>_:_:_o_p_e_r_a_t_o_r_=_ ( const _T_h_i_s &other ) │ │ │ │ +133 { │ │ │ │ +134 entity_ = other.entity_; │ │ │ │ +135 startLevel_ = other.startLevel_; │ │ │ │ +136 maxlevel_ = other.maxlevel_; │ │ │ │ +137 return *this; │ │ │ │ +138 } │ │ │ │ +139 │ │ │ │ +140 │ │ │ │ +141 template< class GridImp > │ │ │ │ +_1_4_2 inline void _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_ _G_r_i_d_I_m_p_ _>_:_:_i_n_c_r_e_m_e_n_t () │ │ │ │ +143 { │ │ │ │ +144 increment( entity_.impl().elementInfo() ); │ │ │ │ +145 } │ │ │ │ +146 │ │ │ │ +147 template< class GridImp > │ │ │ │ +148 inline void _A_l_b_e_r_t_a_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ +149_ _:_:_i_n_c_r_e_m_e_n_t ( ElementInfo elementInfo ) │ │ │ │ +150 { │ │ │ │ +151 assert( !elementInfo == false ); │ │ │ │ +152 if( (elementInfo.level() >= maxlevel_) || elementInfo.isLeaf() ) │ │ │ │ +153 { │ │ │ │ +154 while( (elementInfo.level() > startLevel_) && (elementInfo.indexInFather() │ │ │ │ +== 1) ) │ │ │ │ +155 elementInfo = elementInfo.father(); │ │ │ │ +156 if( elementInfo.level() > startLevel_ ) │ │ │ │ +157 entity_.impl().setElement( elementInfo.father().child( 1 ), 0 ); │ │ │ │ +158 else │ │ │ │ +159 entity_.impl().clearElement(); │ │ │ │ +160 } │ │ │ │ +161 else │ │ │ │ +162 entity_.impl().setElement( elementInfo.child( 0 ), 0 ); │ │ │ │ +163 } │ │ │ │ +164 │ │ │ │ +165} │ │ │ │ +166 │ │ │ │ +167#endif // #if HAVE_ALBERTA │ │ │ │ +168 │ │ │ │ +169#endif // #ifndef DUNE_ALBERTA_HIERARCHICITERATOR_HH │ │ │ │ +_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_:_:_d_i_m_W_o_r_l_d │ │ │ │ -static const int dimWorld │ │ │ │ -DDeeffiinniittiioonn misc.hh:46 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r │ │ │ │ -ALBERTA REAL_D GlobalVector │ │ │ │ -DDeeffiinniittiioonn misc.hh:50 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_R_e_a_d_e_r │ │ │ │ -DDeeffiinniittiioonn albertareader.hh:22 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_R_e_a_d_e_r_:_:_c_t_y_p_e │ │ │ │ -Grid::ctype ctype │ │ │ │ -DDeeffiinniittiioonn albertareader.hh:28 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_R_e_a_d_e_r_:_:_d_i_m_e_n_s_i_o_n_w_o_r_l_d │ │ │ │ -static const int dimensionworld │ │ │ │ -DDeeffiinniittiioonn albertareader.hh:31 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_R_e_a_d_e_r_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ -static const int dimension │ │ │ │ -DDeeffiinniittiioonn albertareader.hh:30 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_R_e_a_d_e_r_:_:_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ -Dune::GridFactory< Grid > GridFactory │ │ │ │ -DDeeffiinniittiioonn albertareader.hh:26 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_R_e_a_d_e_r_:_:_A_l_b_e_r_t_a_R_e_a_d_e_r │ │ │ │ -AlbertaReader() │ │ │ │ -DDeeffiinniittiioonn albertareader.hh:45 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_R_e_a_d_e_r_:_:_r_e_a_d_G_r_i_d │ │ │ │ -void readGrid(const std::string &fileName, GridFactory &factory) │ │ │ │ -DDeeffiinniittiioonn albertareader.hh:48 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_<_ _d_i_m_e_n_s_i_o_n_ _> │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_<_ _d_i_m_e_n_s_i_o_n_ _>_:_:_E_l_e_m_e_n_t_I_d │ │ │ │ -int ElementId[numVertices] │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:48 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_r_e_l_e_a_s_e │ │ │ │ -void release() │ │ │ │ -release the macro data structure │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:127 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_e_l_e_m_e_n_t_C_o_u_n_t │ │ │ │ -int elementCount() const │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:68 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_v_e_r_t_e_x │ │ │ │ -GlobalVector & vertex(int i) const │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:255 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_v_e_r_t_e_x_C_o_u_n_t │ │ │ │ -int vertexCount() const │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:63 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_e_l_e_m_e_n_t │ │ │ │ -ElementId & element(int i) const │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:246 │ │ │ │ -_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_:_:_r_e_a_d │ │ │ │ -void read(const std::string &filename, bool binary=false) │ │ │ │ -DDeeffiinniittiioonn macrodata.hh:413 │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ -static constexpr int dimension │ │ │ │ -The dimension of the grid. │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:387 │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_:_:_d_i_m_e_n_s_i_o_n_w_o_r_l_d │ │ │ │ -static constexpr int dimensionworld │ │ │ │ -The dimension of the world the grid lives in. │ │ │ │ -DDeeffiinniittiioonn common/grid.hh:390 │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_:_:_c_t_y_p_e │ │ │ │ -ct ctype │ │ │ │ -Define type used for coordinates in grid module. │ │ │ │ -DDeeffiinniittiioonn common/grid.hh: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_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/a00713.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: albertaheader.hh File Reference │ │ │ +dune-grid: leveliterator.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,122 +70,37 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -Macros
│ │ │ -
albertaheader.hh File Reference
│ │ │ +Classes | │ │ │ +Namespaces
│ │ │ +
leveliterator.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <alberta/alberta.h>
│ │ │ +
#include <dune/grid/common/entityiterator.hh>
│ │ │ +#include <dune/grid/albertagrid/treeiterator.hh>
│ │ │
│ │ │

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_
 

│ │ │ +Classes

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

│ │ │ +Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │ -

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ _ABS_NOT_DEFINED_

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

◆ _MAX_NOT_DEFINED_

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

◆ _MIN_NOT_DEFINED_

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

◆ ALBERTA

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

◆ ALBERTA_DEBUG

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

◆ DIM_OF_WORLD

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
#define DIM_OF_WORLD   ALBERTA_DIM
│ │ │ -
│ │ │ - │ │ │ -
│ │ │ -
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,39 +1,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 │ │ │ │ -_M_a_c_r_o_s │ │ │ │ -albertaheader.hh File Reference │ │ │ │ -#include │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +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_. │ │ │ │ -MMaaccrrooss │ │ │ │ -#define  _D_I_M___O_F___W_O_R_L_D   ALBERTA_DIM │ │ │ │ +CCllaasssseess │ │ │ │ +class   _D_u_n_e_:_:_A_l_b_e_r_t_a_G_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_ _> │ │ │ │   │ │ │ │ -#define  _A_L_B_E_R_T_A   :: │ │ │ │ +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_ _> │ │ │ │   │ │ │ │ -#define  _A_L_B_E_R_T_A___D_E_B_U_G   0 │ │ │ │ +NNaammeessppaacceess │ │ │ │ +namespace   _D_u_n_e │ │ │ │ +  Include standard header files. │ │ │ │   │ │ │ │ -#define  ___M_A_X___N_O_T___D_E_F_I_N_E_D__ │ │ │ │ -  │ │ │ │ -#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/a00713_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: albertaheader.hh Source File │ │ │ +dune-grid: leveliterator.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,94 +74,145 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
albertaheader.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_ALBERTAHEADER_HH
│ │ │ -
6#define DUNE_ALBERTAHEADER_HH
│ │ │ +
5#ifndef DUNE_ALBERTA_LEVELITERATOR_HH
│ │ │ +
6#define DUNE_ALBERTA_LEVELITERATOR_HH
│ │ │
7
│ │ │ -
8#if HAVE_ALBERTA
│ │ │ + │ │ │
9
│ │ │ -
10#if not (ALBERTA_DIM > 0)
│ │ │ -
11 #if HEADERCHECK
│ │ │ -
12 #undef ALBERTA_DIM
│ │ │ -
13 #define ALBERTA_DIM 2
│ │ │ -
14 #else
│ │ │ -
15 #error ALBERTA_DIM should be 1, 2, or 3
│ │ │ -
16 #endif
│ │ │ -
17#endif
│ │ │ -
18
│ │ │ -
19// Set ALBERTA's DIM_OF_WORLD preprocessor variable
│ │ │ -
20#ifndef ALBERTA_DIM
│ │ │ -
21#error "ALBERTA_DIM needed to use AlbertaGrid."
│ │ │ -
22#endif
│ │ │ -
23#define DIM_OF_WORLD ALBERTA_DIM
│ │ │ -
24
│ │ │ -
25// if we have ALBERTA C++ lib define namespace for ALBERTA
│ │ │ -
26#ifdef __ALBERTApp__
│ │ │ -
27#define ALBERTA Alberta::
│ │ │ -
28#else
│ │ │ -
29#define ALBERTA ::
│ │ │ -
30#endif
│ │ │ -
31
│ │ │ -
32#ifndef ALBERTA_DEBUG
│ │ │ -
33#define ALBERTA_DEBUG 0
│ │ │ -
34#endif
│ │ │ -
35
│ │ │ -
36// MAX, MIN, and ABS are defined macros of ALBERTA
│ │ │ -
37// if they are not defined elsewhere, they are undefined here
│ │ │ -
38#ifndef MAX
│ │ │ -
39#define _MAX_NOT_DEFINED_
│ │ │ -
40#endif
│ │ │ -
41
│ │ │ -
42#ifndef MIN
│ │ │ -
43#define _MIN_NOT_DEFINED_
│ │ │ -
44#endif
│ │ │ + │ │ │ +
11
│ │ │ +
12#if HAVE_ALBERTA
│ │ │ +
13
│ │ │ +
14namespace Dune
│ │ │ +
15{
│ │ │ +
16
│ │ │ +
17 // AlbertaGridLevelIterator
│ │ │ +
18 // ------------------------
│ │ │ +
19
│ │ │ +
20 template< int codim, PartitionIteratorType pitype, class GridImp >
│ │ │ +
│ │ │ + │ │ │ +
22 : public AlbertaGridTreeIterator< codim, GridImp, false >
│ │ │ +
23 {
│ │ │ + │ │ │ + │ │ │ +
26
│ │ │ +
27 public:
│ │ │ +
28 typedef typename Base::Entity Entity;
│ │ │ + │ │ │ +
30
│ │ │ +
│ │ │ + │ │ │ +
32 {}
│ │ │ +
│ │ │ +
33
│ │ │ +
│ │ │ +
35 AlbertaGridLevelIterator ( const GridImp &grid, int level )
│ │ │ +
36 : Base( grid, level )
│ │ │ +
37 {}
│ │ │ +
│ │ │ +
38
│ │ │ +
│ │ │ + │ │ │ +
41 const MarkerVector *vec,
│ │ │ +
42 int level )
│ │ │ +
43 : Base( grid, vec, level )
│ │ │ +
44 {}
│ │ │ +
│ │ │
45
│ │ │ -
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
│ │ │ +
│ │ │ +
47 void increment ()
│ │ │ +
48 {
│ │ │ + │ │ │ +
50 }
│ │ │ +
│ │ │ +
51 };
│ │ │ +
│ │ │ +
52
│ │ │
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>
│ │ │ +
54 template< int codim, class GridImp >
│ │ │ +
│ │ │ + │ │ │ +
56 : public AlbertaGridTreeIterator< codim, GridImp, false >
│ │ │ +
57 {
│ │ │ + │ │ │ + │ │ │
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
│ │ │ +
61 public:
│ │ │ +
62 typedef typename Base::Entity Entity;
│ │ │ + │ │ │ +
64
│ │ │ +
│ │ │ + │ │ │ +
66 {}
│ │ │ +
│ │ │ +
67
│ │ │ +
│ │ │ +
69 AlbertaGridLevelIterator ( const GridImp &grid, int level )
│ │ │ +
70 : Base( grid, level )
│ │ │ +
71 {}
│ │ │ +
│ │ │ +
72
│ │ │ +
│ │ │ + │ │ │ +
75 const MarkerVector *,
│ │ │ +
76 int level )
│ │ │ +
77 : Base( grid, level )
│ │ │ +
78 {}
│ │ │ +
│ │ │ +
79
│ │ │ +
│ │ │ +
81 void increment ()
│ │ │ +
82 {
│ │ │ + │ │ │ +
84 }
│ │ │ +
│ │ │ +
85 };
│ │ │ +
│ │ │ +
86}
│ │ │ +
87
│ │ │ +
88#endif // #if HAVE_ALBERTA
│ │ │ +
89
│ │ │ +
90#endif // #ifndef DUNE_ALBERTA_LEVELITERATOR_HH
│ │ │ + │ │ │ +
@ Ghost_Partition
only ghost entities
Definition gridenums.hh:142
│ │ │ +
Include standard header files.
Definition agrid.hh:60
│ │ │ +
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,89 +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 │ │ │ │ -albertaheader.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_ALBERTAHEADER_HH │ │ │ │ -6#define DUNE_ALBERTAHEADER_HH │ │ │ │ +5#ifndef DUNE_ALBERTA_LEVELITERATOR_HH │ │ │ │ +6#define DUNE_ALBERTA_LEVELITERATOR_HH │ │ │ │ 7 │ │ │ │ -8#if HAVE_ALBERTA │ │ │ │ +8#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_e_n_t_i_t_y_i_t_e_r_a_t_o_r_._h_h> │ │ │ │ 9 │ │ │ │ -10#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 │ │ │ │ -42#ifndef MIN │ │ │ │ -_4_3#define _MIN_NOT_DEFINED_ │ │ │ │ -44#endif │ │ │ │ +10#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_t_r_e_e_i_t_e_r_a_t_o_r_._h_h> │ │ │ │ +11 │ │ │ │ +12#if HAVE_ALBERTA │ │ │ │ +13 │ │ │ │ +14namespace _D_u_n_e │ │ │ │ +15{ │ │ │ │ +16 │ │ │ │ +17 // AlbertaGridLevelIterator │ │ │ │ +18 // ------------------------ │ │ │ │ +19 │ │ │ │ +20 template< int codim, PartitionIteratorType pitype, class GridImp > │ │ │ │ +_2_1 class _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ +22 : public _A_l_b_e_r_t_a_G_r_i_d_T_r_e_e_I_t_e_r_a_t_o_r< codim, GridImp, false > │ │ │ │ +23 { │ │ │ │ +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#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 │ │ │ │ +_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#ifdef HAVE_CONFIG_H │ │ │ │ -55#define ALBERTASAVE_HAVE_CONFIG_H HAVE_CONFIG_H │ │ │ │ -56#undef HAVE_CONFIG_H │ │ │ │ -57#endif │ │ │ │ -58 │ │ │ │ -59#include │ │ │ │ +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#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 │ │ │ │ +61 public: │ │ │ │ +_6_2 typedef typename _B_a_s_e_:_:_E_n_t_i_t_y _E_n_t_i_t_y; │ │ │ │ +_6_3 typedef typename _B_a_s_e_:_:_M_a_r_k_e_r_V_e_c_t_o_r _M_a_r_k_e_r_V_e_c_t_o_r; │ │ │ │ +64 │ │ │ │ +_6_5 _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r () │ │ │ │ +66 {} │ │ │ │ +67 │ │ │ │ +_6_9 _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r ( const GridImp &_g_r_i_d, int _l_e_v_e_l ) │ │ │ │ +70 : _B_a_s_e( _g_r_i_d, _l_e_v_e_l ) │ │ │ │ +71 {} │ │ │ │ +72 │ │ │ │ +_7_4 _A_l_b_e_r_t_a_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r ( const GridImp &_g_r_i_d, │ │ │ │ +75 const _M_a_r_k_e_r_V_e_c_t_o_r *, │ │ │ │ +76 int _l_e_v_e_l ) │ │ │ │ +77 : _B_a_s_e( _g_r_i_d, _l_e_v_e_l ) │ │ │ │ +78 {} │ │ │ │ +79 │ │ │ │ +_8_1 void _i_n_c_r_e_m_e_n_t () │ │ │ │ +82 { │ │ │ │ +83 _B_a_s_e_:_:_i_n_c_r_e_m_e_n_t(); │ │ │ │ +84 } │ │ │ │ +85 }; │ │ │ │ +86} │ │ │ │ +87 │ │ │ │ +88#endif // #if HAVE_ALBERTA │ │ │ │ +89 │ │ │ │ +90#endif // #ifndef DUNE_ALBERTA_LEVELITERATOR_HH │ │ │ │ +_t_r_e_e_i_t_e_r_a_t_o_r_._h_h │ │ │ │ +_D_u_n_e_:_:_G_h_o_s_t___P_a_r_t_i_t_i_o_n │ │ │ │ +@ Ghost_Partition │ │ │ │ +only ghost entities │ │ │ │ +DDeeffiinniittiioonn gridenums.hh:142 │ │ │ │ +_D_u_n_e │ │ │ │ +Include standard header files. │ │ │ │ +DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_G_r_i_d_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/a00719.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: agrid.hh File Reference │ │ │ +dune-grid: macrodata.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,95 +71,47 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces | │ │ │ -Macros
│ │ │ -
agrid.hh File Reference
│ │ │ +Namespaces
│ │ │ +
macrodata.hh File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

provides the AlbertaGrid class │ │ │ +

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

│ │ │ -
#include <cassert>
│ │ │ -#include <cstddef>
│ │ │ -#include <algorithm>
│ │ │ -#include <iostream>
│ │ │ -#include <fstream>
│ │ │ -#include <memory>
│ │ │ -#include <vector>
│ │ │ -#include <dune/common/fvector.hh>
│ │ │ +
#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>
│ │ │ +#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

class  Dune::AlbertaGrid< dim, dimworld >
 [ provides Dune::Grid ] More...
class  Dune::Alberta::MacroData< dim >
 
struct  Dune::Alberta::MacroData< dim >::Library< int >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ Namespaces

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

│ │ │ -Macros

#define _ALBERTA_H_
 
namespace  Dune::Alberta
 
│ │ │

Detailed Description

│ │ │ -

provides the AlbertaGrid class

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

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ _ALBERTA_H_

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

provides a wrapper for ALBERTA's macro_data structure

│ │ │ +
Author
Martin Nolte
│ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,66 +1,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 │ │ │ │ -agrid.hh File Reference │ │ │ │ -provides the AlbertaGrid class _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 │ │ │ │ +macrodata.hh File Reference │ │ │ │ +provides a wrapper for ALBERTA's macro_data structure _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_._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_/_a_l_g_e_b_r_a_._h_h> │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_a_l_b_e_r_t_a_g_r_i_d_/_a_l_b_e_r_t_a_h_e_a_d_e_r_._h_h> │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -class   _D_u_n_e_:_:_A_l_b_e_r_t_a_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_:_:_M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _> │ │ │ │ +  │ │ │ │ +struct   _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_M_a_c_r_o_D_a_t_a_<_ _d_i_m_ _>_:_:_L_i_b_r_a_r_y_<_ _i_n_t_ _> │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │   Include standard header files. │ │ │ │   │ │ │ │ -MMaaccrrooss │ │ │ │ -#define  ___A_L_B_E_R_T_A___H__ │ │ │ │ +namespace   _D_u_n_e_:_:_A_l_b_e_r_t_a │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -provides the AlbertaGrid class │ │ │ │ +provides a wrapper for ALBERTA's macro_data structure │ │ │ │ Author │ │ │ │ - Robert Kloefkorn and Martin Nolte │ │ │ │ -********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ -********** _?◆_? __AALLBBEERRTTAA__HH__ ********** │ │ │ │ -#define _ALBERTA_H_ │ │ │ │ + Martin Nolte │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00719_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: agrid.hh Source File │ │ │ +dune-grid: macrodata.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,845 +74,518 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
agrid.hh
│ │ │ +
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_ALBERTAGRID_IMP_HH
│ │ │ -
6#define DUNE_ALBERTAGRID_IMP_HH
│ │ │ +
5#ifndef DUNE_ALBERTA_MACRODATA_HH
│ │ │ +
6#define DUNE_ALBERTA_MACRODATA_HH
│ │ │
7
│ │ │ -
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
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ +
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//- Local includes
│ │ │ -
36// some cpp defines and include of alberta.h
│ │ │ -
37#include "albertaheader.hh"
│ │ │ +
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
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
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;
│ │ │ +
39 static const int initialSize = 4096;
│ │ │ +
40
│ │ │ +
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
│ │ │ +
│ │ │ + │ │ │ +
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
│ │ │ -
69
│ │ │ -
70 // AlbertaGrid
│ │ │ -
71 // -----------
│ │ │ +
│ │ │ +
68 int elementCount () const
│ │ │ +
69 {
│ │ │ +
70 return (elementCount_ < 0 ? data_->n_macro_elements : elementCount_);
│ │ │ +
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 }
│ │ │ +
│ │ │ +
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 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 int refineMarked () const
│ │ │ -
213 {
│ │ │ -
214 return refineMarked_;
│ │ │ -
215 }
│ │ │ +
212
│ │ │ +
213
│ │ │ +
214 // MacroData::Library
│ │ │ +
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 }
│ │ │ +
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 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;
│ │ │ +
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 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 );
│ │ │ +
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
│ │ │ -
283 AlbertaGrid ( const std::string &macroGridFileName );
│ │ │ -
284
│ │ │ -
286 ~AlbertaGrid ();
│ │ │ -
287
│ │ │ -
290 int maxLevel () const;
│ │ │ +
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
│ │ │ -
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;
│ │ │ +
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
│ │ │ -
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;
│ │ │ +
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
│ │ │ -
319 template< int codim, PartitionIteratorType pitype >
│ │ │ -
320 typename Traits
│ │ │ -
321 ::template Codim< codim >::template Partition< pitype >::LeafIterator
│ │ │ -
322 leafend () const;
│ │ │ +
318 vertexCount_ = elementCount_ = -1;
│ │ │ +
319 }
│ │ │ +
320 assert( (vertexCount_ < 0) && (elementCount_ < 0) );
│ │ │ +
321 }
│ │ │ +
│ │ │ +
322
│ │ │
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();
│ │ │ +
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
│ │ │ -
│ │ │ -
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 );
│ │ │ +
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 // return hierarchic index set
│ │ │ -
436 const HierarchicIndexSet & hierarchicIndexSet () const { return hIndexSet_; }
│ │ │ -
437
│ │ │ -
439 const typename Traits :: LevelIndexSet & levelIndexSet (int level) const;
│ │ │ +
435 }
│ │ │ +
436
│ │ │ +
437}
│ │ │ +
438
│ │ │ +
439#endif // #if HAVE_ALBERTA
│ │ │
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
│ │ │ - │ │ │ +
441#endif
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ +
#define ALBERTA
Definition albertaheader.hh:29
│ │ │ + │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ +
ALBERTA REAL_DD GlobalMatrix
Definition misc.hh:51
│ │ │ +
ALBERTA AFF_TRAFO AffineTransformation
Definition misc.hh:52
│ │ │ +
ALBERTA BNDRY_TYPE BoundaryId
Definition misc.hh:61
│ │ │ +
static const int InteriorBoundary
Definition misc.hh:59
│ │ │
ALBERTA REAL Real
Definition misc.hh:48
│ │ │ +
Data * memReAlloc(Data *ptr, size_t oldSize, size_t newSize)
Definition misc.hh:85
│ │ │ +
static const int DirichletBoundary
Definition misc.hh:60
│ │ │ +
static const int dimWorld
Definition misc.hh:46
│ │ │
ALBERTA REAL_D GlobalVector
Definition misc.hh:50
│ │ │ -
Definition 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
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
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
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
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.
│ │ │ +
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,1036 +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 │ │ │ │ -agrid.hh │ │ │ │ +macrodata.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ 3// -*- 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_MACRODATA_HH │ │ │ │ +6#define DUNE_ALBERTA_MACRODATA_HH │ │ │ │ 7 │ │ │ │ -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> │ │ │ │ +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//- 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" │ │ │ │ +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#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; │ │ │ │ +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; │ │ │ │ +46 │ │ │ │ +47 public: │ │ │ │ +_4_8 typedef int _E_l_e_m_e_n_t_I_d[ numVertices ]; │ │ │ │ +49 │ │ │ │ +_5_0 static const int _s_u_p_p_o_r_t_P_e_r_i_o_d_i_c_i_t_y = 1; │ │ │ │ +51 │ │ │ │ +_5_2 _M_a_c_r_o_D_a_t_a () │ │ │ │ +53 : data_( NULL ), │ │ │ │ +54 vertexCount_( -1 ), │ │ │ │ +55 elementCount_( -1 ) │ │ │ │ +56 {} │ │ │ │ +57 │ │ │ │ +_5_8 operator Data * () const │ │ │ │ +59 { │ │ │ │ +60 return data_; │ │ │ │ +61 } │ │ │ │ +62 │ │ │ │ +_6_3 int _v_e_r_t_e_x_C_o_u_n_t () const │ │ │ │ +64 { │ │ │ │ +65 return (vertexCount_ < 0 ? data_->n_total_vertices : vertexCount_); │ │ │ │ +66 } │ │ │ │ 67 │ │ │ │ -68 │ │ │ │ -69 │ │ │ │ -70 // AlbertaGrid │ │ │ │ -71 // ----------- │ │ │ │ +_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 │ │ │ │ -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 } │ │ │ │ +_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 │ │ │ │ +_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 int refineMarked () const │ │ │ │ -213 { │ │ │ │ -214 return refineMarked_; │ │ │ │ -215 } │ │ │ │ +212 │ │ │ │ +213 │ │ │ │ +214 // MacroData::Library │ │ │ │ +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 } │ │ │ │ +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 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; │ │ │ │ +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 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 │ │ │ │ -); │ │ │ │ +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 │ │ │ │ -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; │ │ │ │ +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 │ │ │ │ -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; │ │ │ │ +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 │ │ │ │ -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; │ │ │ │ +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 │ │ │ │ -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; │ │ │ │ +318 vertexCount_ = elementCount_ = -1; │ │ │ │ +319 } │ │ │ │ +320 assert( (vertexCount_ < 0) && (elementCount_ < 0) ); │ │ │ │ +321 } │ │ │ │ +322 │ │ │ │ 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(); │ │ │ │ +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 │ │ │ │ -_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 ); │ │ │ │ +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 // 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; │ │ │ │ +435 } │ │ │ │ +436 │ │ │ │ +437} │ │ │ │ +438 │ │ │ │ +439#endif // #if HAVE_ALBERTA │ │ │ │ 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 │ │ │ │ -_u_n_d_e_f_i_n_e_-_3_._0_._h_h │ │ │ │ -Contains #undefs for all preprocessor macros defined by alberta. │ │ │ │ -_t_r_e_e_i_t_e_r_a_t_o_r_._h_h │ │ │ │ -_m_i_s_c_._h_h │ │ │ │ -_l_e_v_e_l_i_t_e_r_a_t_o_r_._h_h │ │ │ │ -_l_e_v_e_l_._h_h │ │ │ │ -_l_e_a_f_i_t_e_r_a_t_o_r_._h_h │ │ │ │ -_h_i_e_r_a_r_c_h_i_c_i_t_e_r_a_t_o_r_._h_h │ │ │ │ -_c_o_o_r_d_c_a_c_h_e_._h_h │ │ │ │ +441#endif │ │ │ │ +_a_l_g_e_b_r_a_._h_h │ │ │ │ _a_l_b_e_r_t_a_h_e_a_d_e_r_._h_h │ │ │ │ _A_L_B_E_R_T_A │ │ │ │ #define ALBERTA │ │ │ │ DDeeffiinniittiioonn albertaheader.hh:29 │ │ │ │ -_a_l_b_e_r_t_a_g_r_i_d_._c_c │ │ │ │ +_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_:_:_G_l_o_b_a_l_M_a_t_r_i_x │ │ │ │ +ALBERTA REAL_DD GlobalMatrix │ │ │ │ +DDeeffiinniittiioonn misc.hh:51 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_A_f_f_i_n_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ +ALBERTA AFF_TRAFO AffineTransformation │ │ │ │ +DDeeffiinniittiioonn misc.hh:52 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_B_o_u_n_d_a_r_y_I_d │ │ │ │ +ALBERTA BNDRY_TYPE BoundaryId │ │ │ │ +DDeeffiinniittiioonn misc.hh:61 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_I_n_t_e_r_i_o_r_B_o_u_n_d_a_r_y │ │ │ │ +static const int InteriorBoundary │ │ │ │ +DDeeffiinniittiioonn misc.hh:59 │ │ │ │ _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_R_e_a_l │ │ │ │ ALBERTA REAL Real │ │ │ │ DDeeffiinniittiioonn misc.hh:48 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_m_e_m_R_e_A_l_l_o_c │ │ │ │ +Data * memReAlloc(Data *ptr, size_t oldSize, size_t newSize) │ │ │ │ +DDeeffiinniittiioonn misc.hh:85 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_D_i_r_i_c_h_l_e_t_B_o_u_n_d_a_r_y │ │ │ │ +static const int DirichletBoundary │ │ │ │ +DDeeffiinniittiioonn misc.hh:60 │ │ │ │ +_D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_d_i_m_W_o_r_l_d │ │ │ │ +static const int dimWorld │ │ │ │ +DDeeffiinniittiioonn misc.hh:46 │ │ │ │ _D_u_n_e_:_:_A_l_b_e_r_t_a_:_:_G_l_o_b_a_l_V_e_c_t_o_r │ │ │ │ ALBERTA REAL_D GlobalVector │ │ │ │ DDeeffiinniittiioonn misc.hh:50 │ │ │ │ -_D_u_n_e_:_:_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_:_:_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 │ │ │ │ -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_ _> │ │ │ │ -_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 │ │ │ │ -_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. │ │ │ │ +_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/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
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -
identitygridleveliterator.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_IDENTITYGRIDLEVELITERATOR_HH
│ │ │ -
6#define DUNE_IDENTITYGRIDLEVELITERATOR_HH
│ │ │ +
5#ifndef DUNE_IDENTITYGRID_INDEXSETS_HH
│ │ │ +
6#define DUNE_IDENTITYGRID_INDEXSETS_HH
│ │ │
7
│ │ │ - │ │ │ -
9
│ │ │ -
14namespace Dune {
│ │ │ + │ │ │ +
13
│ │ │ +
14#include <vector>
│ │ │
15
│ │ │ -
19 template<int codim, PartitionIteratorType pitype, class GridImp>
│ │ │ +
16namespace Dune {
│ │ │ +
17
│ │ │ +
19 template<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;
│ │ │ + │ │ │ +
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 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
│ │ │ -
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 {}
│ │ │ +
29 typedef typename std::remove_const<GridImp>::type::HostGridType HostGrid;
│ │ │ +
30 typedef typename HostGrid::LevelGridView::IndexSet::Types Types;
│ │ │ +
31
│ │ │ +
32 constexpr static int dim = GridImp::dimension;
│ │ │ +
33
│ │ │ +
35 template<int codim>
│ │ │ +
│ │ │ +
36 int index (const typename GridImp::Traits::template Codim<codim>::Entity& e) const
│ │ │ +
37 {
│ │ │ +
38 return grid_->hostgrid_->levelIndexSet(level_).template index<codim>(grid_->template getHostEntity<codim>(e));
│ │ │ +
39 }
│ │ │ +
│ │ │ +
40
│ │ │ +
41
│ │ │ +
43 template<int cc>
│ │ │ +
│ │ │ +
44 int subIndex (const typename GridImp::Traits::template Codim<cc>::Entity& e, int i, int codim) const
│ │ │ +
45 {
│ │ │ +
46 return grid_->hostgrid_->levelIndexSet(level_).subIndex(grid_->template getHostEntity<cc>(e), i, codim);
│ │ │ +
47 }
│ │ │
│ │ │ -
47
│ │ │
48
│ │ │ -
│ │ │ -
50 void increment() {
│ │ │ -
51 ++hostLevelIterator_;
│ │ │ -
52 }
│ │ │ -
│ │ │ -
53
│ │ │ -
│ │ │ - │ │ │ -
56 return Entity{{identityGrid_,*hostLevelIterator_}};
│ │ │ -
57 }
│ │ │ -
│ │ │ -
58
│ │ │ -
│ │ │ -
60 bool equals(const IdentityGridLevelIterator& i) const {
│ │ │ -
61 return hostLevelIterator_ == i.hostLevelIterator_;
│ │ │ -
62 }
│ │ │ -
│ │ │ -
63
│ │ │ -
64 private:
│ │ │ -
65 const GridImp* identityGrid_;
│ │ │ -
66
│ │ │ -
67 HostGridLevelIterator hostLevelIterator_;
│ │ │ -
68 };
│ │ │ -
│ │ │ -
69
│ │ │ -
70
│ │ │ -
71} // 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
│ │ │ +
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 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
│ │ │
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
│ │ │ +
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.
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,112 +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 │ │ │ │ -identitygridleveliterator.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_IDENTITYGRIDLEVELITERATOR_HH │ │ │ │ -6#define DUNE_IDENTITYGRIDLEVELITERATOR_HH │ │ │ │ +5#ifndef DUNE_IDENTITYGRID_INDEXSETS_HH │ │ │ │ +6#define DUNE_IDENTITYGRID_INDEXSETS_HH │ │ │ │ 7 │ │ │ │ -8#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_e_n_u_m_s_._h_h> │ │ │ │ -9 │ │ │ │ -14namespace _D_u_n_e { │ │ │ │ +12#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_i_n_d_e_x_i_d_s_e_t_._h_h> │ │ │ │ +13 │ │ │ │ +14#include │ │ │ │ 15 │ │ │ │ -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; │ │ │ │ +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 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 │ │ │ │ -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 │ │ │ │ +_2_9 typedef typename std::remove_const::type::HostGridType _H_o_s_t_G_r_i_d; │ │ │ │ +_3_0 typedef typename HostGrid::LevelGridView::IndexSet::Types _T_y_p_e_s; │ │ │ │ +31 │ │ │ │ +_3_2 constexpr static int _d_i_m = GridImp::dimension; │ │ │ │ +33 │ │ │ │ +35 template │ │ │ │ +_3_6 int _i_n_d_e_x (const typename GridImp::Traits::template Codim::Entity& e) │ │ │ │ +const │ │ │ │ +37 { │ │ │ │ +38 return _g_r_i_d__->hostgrid_->levelIndexSet(_l_e_v_e_l__).template index(_g_r_i_d__- │ │ │ │ +>template getHostEntity(e)); │ │ │ │ +39 } │ │ │ │ +40 │ │ │ │ +41 │ │ │ │ +43 template │ │ │ │ +_4_4 int _s_u_b_I_n_d_e_x (const typename GridImp::Traits::template Codim::Entity& e, │ │ │ │ +int i, int codim) const │ │ │ │ +45 { │ │ │ │ +46 return _g_r_i_d__->hostgrid_->levelIndexSet(_l_e_v_e_l__).subIndex(_g_r_i_d__->template │ │ │ │ +getHostEntity(e), i, codim); │ │ │ │ +47 } │ │ │ │ 48 │ │ │ │ -_5_0 void _i_n_c_r_e_m_e_n_t() { │ │ │ │ -51 ++hostLevelIterator_; │ │ │ │ -52 } │ │ │ │ -53 │ │ │ │ -_5_5 _E_n_t_i_t_y _d_e_r_e_f_e_r_e_n_c_e() const { │ │ │ │ -56 return _E_n_t_i_t_y{{identityGrid_,*hostLevelIterator_}}; │ │ │ │ -57 } │ │ │ │ -58 │ │ │ │ -_6_0 bool _e_q_u_a_l_s(const _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r& i) const { │ │ │ │ -61 return hostLevelIterator_ == i.hostLevelIterator_; │ │ │ │ -62 } │ │ │ │ -63 │ │ │ │ -64 private: │ │ │ │ -65 const GridImp* identityGrid_; │ │ │ │ -66 │ │ │ │ -67 HostGridLevelIterator hostLevelIterator_; │ │ │ │ -68 }; │ │ │ │ -69 │ │ │ │ -70 │ │ │ │ -71} // 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 │ │ │ │ +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 │ │ │ │ +_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 │ │ │ │ _D_u_n_e │ │ │ │ Include standard header files. │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ -Iterator over all entities of a given codimension and level of a grid. │ │ │ │ -DDeeffiinniittiioonn identitygridleveliterator.hh:21 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ -void increment() │ │ │ │ -prefix increment │ │ │ │ -DDeeffiinniittiioonn identitygridleveliterator.hh:50 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_E_n_t_i_t_y │ │ │ │ -GridImp::template Codim< codim >::Entity Entity │ │ │ │ -DDeeffiinniittiioonn identitygridleveliterator.hh:29 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ -IdentityGridLevelIterator(const GridImp *identityGrid, int level) │ │ │ │ -Constructor. │ │ │ │ -DDeeffiinniittiioonn identitygridleveliterator.hh:32 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r │ │ │ │ -IdentityGridLevelIterator(const GridImp *identityGrid, int level, bool │ │ │ │ -endDummy) │ │ │ │ -Constructor which create the end iterator. │ │ │ │ -DDeeffiinniittiioonn identitygridleveliterator.hh:43 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_c_o_d_i_m_e_n_s_i_o_n │ │ │ │ -static constexpr int codimension │ │ │ │ -DDeeffiinniittiioonn identitygridleveliterator.hh:27 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_e_q_u_a_l_s │ │ │ │ -bool equals(const IdentityGridLevelIterator &i) const │ │ │ │ -equality │ │ │ │ -DDeeffiinniittiioonn identitygridleveliterator.hh:60 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_:_:_d_e_r_e_f_e_r_e_n_c_e │ │ │ │ -Entity dereference() const │ │ │ │ -dereferencing │ │ │ │ -DDeeffiinniittiioonn identitygridleveliterator.hh:55 │ │ │ │ +_D_u_n_e_:_:_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. │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00737.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: identitygridleafiterator.hh File Reference │ │ │ +dune-grid: identitygridintersectioniterator.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,38 +72,42 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
identitygridleafiterator.hh File Reference
│ │ │ +
identitygridintersectioniterator.hh File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

The IdentityGridLeafIterator 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::IdentityGridLeafIterator< 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 IdentityGridLeafIterator 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 │ │ │ │ -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> │ │ │ │ +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_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_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 IdentityGridLeafIterator 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/a00737_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: identitygridleafiterator.hh Source File │ │ │ +dune-grid: identitygridintersectioniterator.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,100 +74,177 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
identitygridleafiterator.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_IDENTITYGRIDLEAFITERATOR_HH
│ │ │ -
6#define DUNE_IDENTITYGRIDLEAFITERATOR_HH
│ │ │ +
5#ifndef DUNE_IDENTITYGRID_INTERSECTIONITERATOR_HH
│ │ │ +
6#define DUNE_IDENTITYGRID_INTERSECTIONITERATOR_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:
│ │ │ -
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 {}
│ │ │ -
│ │ │ + │ │ │ + │ │ │ +
10
│ │ │ + │ │ │ +
12
│ │ │ +
17namespace Dune {
│ │ │ +
18
│ │ │ +
27 template<class GridImp>
│ │ │ +
│ │ │ + │ │ │ +
29 {
│ │ │ +
30
│ │ │ +
31 constexpr static int dim = GridImp::dimension;
│ │ │ +
32
│ │ │ +
33 constexpr static int dimworld = GridImp::dimensionworld;
│ │ │ +
34
│ │ │ +
35 // The type used to store coordinates
│ │ │ +
36 typedef typename GridImp::ctype ctype;
│ │ │ +
37
│ │ │ +
38 typedef typename GridImp::HostGridType::LeafGridView::IntersectionIterator HostLeafIntersectionIterator;
│ │ │
39
│ │ │ +
40 public:
│ │ │ +
41
│ │ │ + │ │ │ +
43
│ │ │
│ │ │ -
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 }
│ │ │ -
│ │ │ -
54
│ │ │ -
│ │ │ - │ │ │ -
57 return Entity{{identityGrid_,*hostLeafIterator_}};
│ │ │ -
58 }
│ │ │ -
│ │ │ -
59
│ │ │ -
│ │ │ -
61 bool equals(const IdentityGridLeafIterator& i) const {
│ │ │ -
62 return hostLeafIterator_ == i.hostLeafIterator_;
│ │ │ -
63 }
│ │ │ -
│ │ │ -
64
│ │ │ -
65 private:
│ │ │ -
66 const GridImp* identityGrid_;
│ │ │ -
67
│ │ │ -
68 HostGridLeafIterator hostLeafIterator_;
│ │ │ -
69
│ │ │ -
70 };
│ │ │ -
│ │ │ -
71
│ │ │ -
72
│ │ │ -
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
│ │ │ + │ │ │ +
45 {}
│ │ │ +
│ │ │ +
46
│ │ │ +
│ │ │ +
47 IdentityGridLeafIntersectionIterator(const GridImp* identityGrid,
│ │ │ +
48 const HostLeafIntersectionIterator& hostIterator)
│ │ │ +
49 : identityGrid_(identityGrid)
│ │ │ +
50 , hostIterator_(hostIterator)
│ │ │ +
51 {}
│ │ │ +
│ │ │ +
52
│ │ │ +
│ │ │ + │ │ │ +
55 return hostIterator_ == other.hostIterator_;
│ │ │ +
56 }
│ │ │ +
│ │ │ +
57
│ │ │ +
58
│ │ │ +
│ │ │ +
60 void increment() {
│ │ │ +
61 ++hostIterator_;
│ │ │ +
62 }
│ │ │ +
│ │ │ +
63
│ │ │ +
│ │ │ + │ │ │ +
66 return IdentityGridLeafIntersection<GridImp>(identityGrid_,*hostIterator_);
│ │ │ +
67 }
│ │ │ +
│ │ │ +
68
│ │ │ +
69 private:
│ │ │ +
70 //**********************************************************
│ │ │ +
71 // private data
│ │ │ +
72 //**********************************************************
│ │ │ +
73
│ │ │ +
74 const GridImp* identityGrid_ = nullptr;
│ │ │ +
75 HostLeafIntersectionIterator hostIterator_ = {};
│ │ │ +
76 };
│ │ │ +
│ │ │ +
77
│ │ │ +
78
│ │ │ +
79
│ │ │ +
80
│ │ │ +
82 template<class GridImp>
│ │ │ +
│ │ │ + │ │ │ +
84 {
│ │ │ +
85 constexpr static int dim = GridImp::dimension;
│ │ │ +
86
│ │ │ +
87 constexpr static int dimworld = GridImp::dimensionworld;
│ │ │ +
88
│ │ │ +
89 // The type used to store coordinates
│ │ │ +
90 typedef typename GridImp::ctype ctype;
│ │ │ +
91
│ │ │ +
92 typedef typename GridImp::HostGridType::LevelGridView::IntersectionIterator HostLevelIntersectionIterator;
│ │ │ +
93
│ │ │ +
94 public:
│ │ │ +
95
│ │ │ + │ │ │ +
97
│ │ │ +
│ │ │ + │ │ │ +
99 {}
│ │ │ +
│ │ │ +
100
│ │ │ +
│ │ │ +
101 IdentityGridLevelIntersectionIterator(const GridImp* identityGrid,
│ │ │ +
102 const HostLevelIntersectionIterator& hostIterator)
│ │ │ +
103 : identityGrid_(identityGrid)
│ │ │ +
104 , hostIterator_(hostIterator)
│ │ │ +
105 {}
│ │ │ +
│ │ │ +
106
│ │ │ +
│ │ │ + │ │ │ +
109 return hostIterator_ == other.hostIterator_;
│ │ │ +
110 }
│ │ │ +
│ │ │ +
111
│ │ │ +
112
│ │ │ +
│ │ │ +
114 void increment() {
│ │ │ +
115 ++hostIterator_;
│ │ │ +
116 }
│ │ │ +
│ │ │ +
117
│ │ │ +
│ │ │ + │ │ │ +
120 return IdentityGridLevelIntersection<GridImp>(identityGrid_,*hostIterator_);
│ │ │ +
121 }
│ │ │ +
│ │ │ +
122
│ │ │ +
123 private:
│ │ │ +
124
│ │ │ +
125
│ │ │ +
126 const GridImp* identityGrid_ = nullptr;
│ │ │ +
127 HostLevelIntersectionIterator hostIterator_ = {};
│ │ │ +
128
│ │ │ +
129 };
│ │ │ +
│ │ │ +
130
│ │ │ +
131
│ │ │ +
132} // namespace Dune
│ │ │ +
133
│ │ │ +
134#endif
│ │ │ +
The IdentityGridLeafIntersection and IdentityGridLevelIntersection classes.
│ │ │ +
The IdentityGridEntity class.
│ │ │
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
│ │ │ +
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,113 +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 │ │ │ │ -identitygridleafiterator.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_IDENTITYGRIDLEAFITERATOR_HH │ │ │ │ -6#define DUNE_IDENTITYGRIDLEAFITERATOR_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 │ │ │ │ -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 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 {} │ │ │ │ +8#include "_i_d_e_n_t_i_t_y_g_r_i_d_i_n_t_e_r_s_e_c_t_i_o_n_s_._h_h" │ │ │ │ +9#include "_i_d_e_n_t_i_t_y_g_r_i_d_e_n_t_i_t_y_._h_h" │ │ │ │ +10 │ │ │ │ +11#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_i_n_t_e_r_s_e_c_t_i_o_n_._h_h> │ │ │ │ +12 │ │ │ │ +17namespace _D_u_n_e { │ │ │ │ +18 │ │ │ │ +27 template │ │ │ │ +_2_8 class _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ +29 { │ │ │ │ +30 │ │ │ │ +31 constexpr static int dim = GridImp::dimension; │ │ │ │ +32 │ │ │ │ +33 constexpr static int dimworld = GridImp::dimensionworld; │ │ │ │ +34 │ │ │ │ +35 // The type used to store coordinates │ │ │ │ +36 typedef typename GridImp::ctype ctype; │ │ │ │ +37 │ │ │ │ +38 typedef typename GridImp::HostGridType::LeafGridView::IntersectionIterator │ │ │ │ +HostLeafIntersectionIterator; │ │ │ │ 39 │ │ │ │ -_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_; │ │ │ │ -69 │ │ │ │ -70 }; │ │ │ │ -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 │ │ │ │ +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 void _i_n_c_r_e_m_e_n_t() { │ │ │ │ +61 ++hostIterator_; │ │ │ │ +62 } │ │ │ │ +63 │ │ │ │ +_6_5 _I_n_t_e_r_s_e_c_t_i_o_n _d_e_r_e_f_e_r_e_n_c_e() const { │ │ │ │ +66 return _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_<_G_r_i_d_I_m_p_>(identityGrid_,*hostIterator_); │ │ │ │ +67 } │ │ │ │ +68 │ │ │ │ +69 private: │ │ │ │ +70 //********************************************************** │ │ │ │ +71 // private data │ │ │ │ +72 //********************************************************** │ │ │ │ +73 │ │ │ │ +74 const GridImp* identityGrid_ = nullptr; │ │ │ │ +75 HostLeafIntersectionIterator hostIterator_ = {}; │ │ │ │ +76 }; │ │ │ │ +77 │ │ │ │ +78 │ │ │ │ +79 │ │ │ │ +80 │ │ │ │ +82 template │ │ │ │ +_8_3 class _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ +84 { │ │ │ │ +85 constexpr static int dim = GridImp::dimension; │ │ │ │ +86 │ │ │ │ +87 constexpr static int dimworld = GridImp::dimensionworld; │ │ │ │ +88 │ │ │ │ +89 // The type used to store coordinates │ │ │ │ +90 typedef typename GridImp::ctype ctype; │ │ │ │ +91 │ │ │ │ +92 typedef typename GridImp::HostGridType::LevelGridView::IntersectionIterator │ │ │ │ +HostLevelIntersectionIterator; │ │ │ │ +93 │ │ │ │ +94 public: │ │ │ │ +95 │ │ │ │ +_9_6 typedef _D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n_<_c_o_n_s_t_ _G_r_i_d_I_m_p_,_ _D_u_n_e_:_: │ │ │ │ +_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_<_G_r_i_d_I_m_p_> > _I_n_t_e_r_s_e_c_t_i_o_n; │ │ │ │ +97 │ │ │ │ +_9_8 _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r() │ │ │ │ +99 {} │ │ │ │ +100 │ │ │ │ +_1_0_1 _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r(const GridImp* identityGrid, │ │ │ │ +102 const HostLevelIntersectionIterator& hostIterator) │ │ │ │ +103 : identityGrid_(identityGrid) │ │ │ │ +104 , hostIterator_(hostIterator) │ │ │ │ +105 {} │ │ │ │ +106 │ │ │ │ +_1_0_8 bool _e_q_u_a_l_s(const _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_<_G_r_i_d_I_m_p_>& other) │ │ │ │ +const { │ │ │ │ +109 return hostIterator_ == other.hostIterator_; │ │ │ │ +110 } │ │ │ │ +111 │ │ │ │ +112 │ │ │ │ +_1_1_4 void _i_n_c_r_e_m_e_n_t() { │ │ │ │ +115 ++hostIterator_; │ │ │ │ +116 } │ │ │ │ +117 │ │ │ │ +_1_1_9 _I_n_t_e_r_s_e_c_t_i_o_n _d_e_r_e_f_e_r_e_n_c_e() const { │ │ │ │ +120 return _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_<_G_r_i_d_I_m_p_> │ │ │ │ +(identityGrid_,*hostIterator_); │ │ │ │ +121 } │ │ │ │ +122 │ │ │ │ +123 private: │ │ │ │ +124 │ │ │ │ +125 │ │ │ │ +126 const GridImp* identityGrid_ = nullptr; │ │ │ │ +127 HostLevelIntersectionIterator hostIterator_ = {}; │ │ │ │ +128 │ │ │ │ +129 }; │ │ │ │ +130 │ │ │ │ +131 │ │ │ │ +132} // namespace Dune │ │ │ │ +133 │ │ │ │ +134#endif │ │ │ │ +_i_d_e_n_t_i_t_y_g_r_i_d_i_n_t_e_r_s_e_c_t_i_o_n_s_._h_h │ │ │ │ +The IdentityGridLeafIntersection and IdentityGridLevelIntersection classes. │ │ │ │ +_i_d_e_n_t_i_t_y_g_r_i_d_e_n_t_i_t_y_._h_h │ │ │ │ +The IdentityGridEntity class. │ │ │ │ _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 │ │ │ │ +_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 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 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 │ │ │ │ +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 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 │ │ │ │ +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 identitygridleafiterator.hh:51 │ │ │ │ +DDeeffiinniittiioonn identitygridintersectioniterator.hh:60 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_: │ │ │ │ +_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ +IdentityGridLeafIntersectionIterator(const GridImp *identityGrid, const │ │ │ │ +HostLeafIntersectionIterator &hostIterator) │ │ │ │ +DDeeffiinniittiioonn identitygridintersectioniterator.hh:47 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_:_d_e_r_e_f_e_r_e_n_c_e │ │ │ │ +Intersection dereference() const │ │ │ │ +dereferencing │ │ │ │ +DDeeffiinniittiioonn identitygridintersectioniterator.hh:65 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_:_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ +Dune::Intersection< const GridImp, Dune::IdentityGridLeafIntersection< GridImp │ │ │ │ +> > Intersection │ │ │ │ +DDeeffiinniittiioonn identitygridintersectioniterator.hh:42 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_: │ │ │ │ +_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ +IdentityGridLeafIntersectionIterator() │ │ │ │ +DDeeffiinniittiioonn identitygridintersectioniterator.hh:44 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ +An intersection with a leaf neighbor elementMesh entities of codimension 0 │ │ │ │ +("elements") allow to visi... │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:33 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:192 │ │ │ │ +_i_n_t_e_r_s_e_c_t_i_o_n_._h_h │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00740.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: identitygridintersections.hh File Reference │ │ │ +dune-grid: identitygridleafiterator.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,41 +72,38 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
identitygridintersections.hh File Reference
│ │ │ +
identitygridleafiterator.hh File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

The IdentityGridLeafIntersection and IdentityGridLevelIntersection classes. │ │ │ +

The IdentityGridLeafIterator class. │ │ │ More...

│ │ │ -
#include "identitygridleafiterator.hh"
│ │ │ -#include <dune/grid/identitygrid/identitygridentity.hh>
│ │ │ +
#include <dune/grid/common/gridenums.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::IdentityGridLevelIntersection< 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 IdentityGridLeafIntersection and IdentityGridLevelIntersection classes.

│ │ │ +

The IdentityGridLeafIterator class.

│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -2,32 +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 │ │ │ │ -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> │ │ │ │ +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_a_f_I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ - An intersection with a leaf neighbor elementMesh entities of │ │ │ │ - codimension 0 ("elements") allow to visit all neighbors, where a │ │ │ │ -  neighbor is an entity of codimension 0 which has a common entity of │ │ │ │ - codimension 1 These neighbors are accessed via a _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r. │ │ │ │ - This allows the implement non-matching meshes. The number of neighbors │ │ │ │ - may be different from the number of an element! _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -class   _D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ +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 IdentityGridLeafIntersection and IdentityGridLevelIntersection classes. │ │ │ │ +The IdentityGridLeafIterator class. │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00740_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: identitygridintersections.hh Source File │ │ │ +dune-grid: identitygridleafiterator.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,435 +74,100 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
identitygridintersections.hh
│ │ │ +
identitygridleafiterator.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_IDENTITYGRIDLEAFITERATOR_HH
│ │ │ +
6#define DUNE_IDENTITYGRIDLEAFITERATOR_HH
│ │ │
7
│ │ │ - │ │ │ - │ │ │ -
10
│ │ │ -
15namespace Dune {
│ │ │ + │ │ │ +
9
│ │ │ +
14namespace Dune {
│ │ │ +
15
│ │ │
16
│ │ │ -
17
│ │ │ -
18 // External forward declarations
│ │ │ -
19 template< class Grid >
│ │ │ -
20 struct HostGridAccess;
│ │ │ -
21
│ │ │ -
22
│ │ │ -
31 template<class GridImp>
│ │ │ -
│ │ │ - │ │ │ -
33 {
│ │ │ -
34
│ │ │ -
35 friend class IdentityGridLeafIntersectionIterator<GridImp>;
│ │ │ -
36
│ │ │ -
37 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:
│ │ │ +
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 typedef typename GridImp::template Codim<codim>::Entity Entity;
│ │ │ +
33
│ │ │ +
│ │ │ +
35 explicit IdentityGridLeafIterator(const GridImp* identityGrid) :
│ │ │ +
36 identityGrid_(identityGrid),
│ │ │ +
37 hostLeafIterator_(identityGrid->hostgrid_->leafGridView().template begin<codim,pitype>())
│ │ │ +
38 {}
│ │ │ +
│ │ │ +
39
│ │ │ +
│ │ │ +
44 explicit IdentityGridLeafIterator(const GridImp* identityGrid, [[maybe_unused]] bool endDummy) :
│ │ │ +
45 identityGrid_(identityGrid),
│ │ │ +
46 hostLeafIterator_(identityGrid->hostgrid_->leafGridView().template end<codim,pitype>())
│ │ │ +
47 {}
│ │ │ +
│ │ │ +
48
│ │ │
49
│ │ │ -
50 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 {}
│ │ │ +
│ │ │ +
51 void increment() {
│ │ │ +
52 ++hostLeafIterator_;
│ │ │ +
53 }
│ │ │
│ │ │ +
54
│ │ │ +
│ │ │ + │ │ │ +
57 return Entity{{identityGrid_,*hostLeafIterator_}};
│ │ │ +
58 }
│ │ │ +
│ │ │ +
59
│ │ │ +
│ │ │ +
61 bool equals(const IdentityGridLeafIterator& i) const {
│ │ │ +
62 return hostLeafIterator_ == i.hostLeafIterator_;
│ │ │ +
63 }
│ │ │ +
│ │ │ +
64
│ │ │ +
65 private:
│ │ │ +
66 const GridImp* identityGrid_;
│ │ │ +
67
│ │ │ +
68 HostGridLeafIterator hostLeafIterator_;
│ │ │
69
│ │ │ -
│ │ │ -
70 bool equals(const IdentityGridLeafIntersection& other) const
│ │ │ -
71 {
│ │ │ -
72 return hostIntersection_ == other.hostIntersection_;
│ │ │ -
73 }
│ │ │ +
70 };
│ │ │
│ │ │ +
71
│ │ │ +
72
│ │ │ +
73} // namespace Dune
│ │ │
74
│ │ │ -
│ │ │ -
77 Entity inside() const {
│ │ │ -
78 return IdentityGridEntity<0,dim,GridImp>(identityGrid_,hostIntersection_.inside());
│ │ │ -
79 }
│ │ │ -
│ │ │ -
80
│ │ │ -
81
│ │ │ -
│ │ │ -
84 Entity outside() const {
│ │ │ -
85 return IdentityGridEntity<0,dim,GridImp>(identityGrid_,hostIntersection_.outside());
│ │ │ -
86 }
│ │ │ -
│ │ │ -
87
│ │ │ -
88
│ │ │ -
│ │ │ -
90 bool boundary () const {
│ │ │ -
91 return hostIntersection_.boundary();
│ │ │ -
92 }
│ │ │ -
│ │ │ -
93
│ │ │ -
│ │ │ - │ │ │ -
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() );
│ │ │ -
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 IdentityGridLeafIterator class.
│ │ │ -
The IdentityGridEntity class.
│ │ │ -
STL namespace.
│ │ │ +
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
│ │ │ -
provides access to host grid objects from GeometryGrid
Definition identitygrid.hh:37
│ │ │ -
The implementation of entities in a IdentityGrid.
Definition identitygridentity.hh:55
│ │ │ -
Definition identitygridintersectioniterator.hh:84
│ │ │ -
Iterator over all element neighborsMesh entities of codimension 0 ("elements") allow to visit all nei...
Definition identitygridintersectioniterator.hh:29
│ │ │ -
An intersection with a leaf neighbor elementMesh entities of codimension 0 ("elements") allow to visi...
Definition identitygridintersections.hh:33
│ │ │ -
Entity inside() const
Definition identitygridintersections.hh:77
│ │ │ -
IdentityGridLeafIntersection(const GridImp *identityGrid, HostLeafIntersection &&hostIntersection)
Definition identitygridintersections.hh:64
│ │ │ -
NormalVector centerUnitOuterNormal() const
Return unit outer normal (length == 1)
Definition identitygridintersections.hh:99
│ │ │ -
GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
Definition identitygridintersections.hh:51
│ │ │ -
Geometry geometry() const
Definition identitygridintersections.hh:142
│ │ │ -
Entity outside() const
Definition identitygridintersections.hh:84
│ │ │ -
LocalGeometry geometryInOutside() const
Definition identitygridintersections.hh:135
│ │ │ -
bool boundary() const
return true if intersection is with boundary.
Definition identitygridintersections.hh:90
│ │ │ -
GeometryType type() const
Geometry type of an intersection.
Definition identitygridintersections.hh:119
│ │ │ -
FieldVector< ctype, dimworld > NormalVector
Definition identitygridintersections.hh:53
│ │ │ -
LocalGeometry geometryInInside() const
Definition identitygridintersections.hh:128
│ │ │ -
bool conforming() const
Return true if this is a conforming intersection.
Definition identitygridintersections.hh:114
│ │ │ -
IdentityGridLeafIntersection(const GridImp *identityGrid, const HostLeafIntersection &hostIntersection)
Definition identitygridintersections.hh:58
│ │ │ -
size_t boundarySegmentIndex() const
return the boundary segment index
Definition identitygridintersections.hh:109
│ │ │ -
bool equals(const IdentityGridLeafIntersection &other) const
Definition identitygridintersections.hh:70
│ │ │ -
FieldVector< ctype, GridImp::dimensionworld > outerNormal(const FieldVector< ctype, GridImp::dimension-1 > &local) const
return outer normal
Definition identitygridintersections.hh:161
│ │ │ -
int indexInOutside() const
local number of codim 1 entity in neighbor where intersection is contained
Definition identitygridintersections.hh:155
│ │ │ -
FieldVector< ctype, GridImp::dimensionworld > integrationOuterNormal(const FieldVector< ctype, GridImp::dimension-1 > &local) const
return outer normal multiplied by the integration element
Definition identitygridintersections.hh:166
│ │ │ -
bool neighbor() const
return true if across the edge an neighbor on this level exists
Definition identitygridintersections.hh:104
│ │ │ -
FieldVector< ctype, GridImp::dimensionworld > unitOuterNormal(const FieldVector< ctype, GridImp::dimension-1 > &local) const
return unit outer normal
Definition identitygridintersections.hh:171
│ │ │ -
int indexInInside() const
local number of codim 1 entity in self where intersection is contained in
Definition identitygridintersections.hh:149
│ │ │ -
GridImp::template Codim< 1 >::Geometry Geometry
Definition identitygridintersections.hh:50
│ │ │ -
GridImp::template Codim< 0 >::Entity Entity
Definition identitygridintersections.hh:52
│ │ │ -
Definition identitygridintersections.hh:192
│ │ │ -
Geometry geometry() const
Definition identitygridintersections.hh:302
│ │ │ -
GridImp::template Codim< 0 >::Entity Entity
Definition identitygridintersections.hh:211
│ │ │ -
IdentityGridLevelIntersection(const GridImp *identityGrid, const HostLevelIntersection &hostIntersection)
Definition identitygridintersections.hh:217
│ │ │ -
GridImp::template Codim< 1 >::Geometry Geometry
Definition identitygridintersections.hh:209
│ │ │ -
bool equals(const IdentityGridLevelIntersection &other) const
Definition identitygridintersections.hh:229
│ │ │ -
bool neighbor() const
return true if across the edge an neighbor on this level exists
Definition identitygridintersections.hh:264
│ │ │ -
NormalVector centerUnitOuterNormal() const
Return unit outer normal (length == 1)
Definition identitygridintersections.hh:259
│ │ │ -
bool conforming() const
Return true if this is a conforming intersection.
Definition identitygridintersections.hh:274
│ │ │ -
int indexInInside() const
local number of codim 1 entity in self where intersection is contained in
Definition identitygridintersections.hh:309
│ │ │ -
FieldVector< ctype, dimworld > outerNormal(const FieldVector< ctype, dim-1 > &local) const
return outer normal
Definition identitygridintersections.hh:321
│ │ │ -
GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
Definition identitygridintersections.hh:210
│ │ │ -
FieldVector< ctype, dimworld > NormalVector
Definition identitygridintersections.hh:212
│ │ │ -
bool boundary() const
return true if intersection is with boundary.
Definition identitygridintersections.hh:250
│ │ │ -
FieldVector< ctype, dimworld > integrationOuterNormal(const FieldVector< ctype, dim-1 > &local) const
return outer normal multiplied by the integration element
Definition identitygridintersections.hh:326
│ │ │ -
LocalGeometry geometryInOutside() const
Definition identitygridintersections.hh:295
│ │ │ -
LocalGeometry geometryInInside() const
Definition identitygridintersections.hh:288
│ │ │ -
int indexInOutside() const
local number of codim 1 entity in neighbor where intersection is contained
Definition identitygridintersections.hh:315
│ │ │ -
FieldVector< ctype, dimworld > unitOuterNormal(const FieldVector< ctype, dim-1 > &local) const
return unit outer normal
Definition identitygridintersections.hh:331
│ │ │ -
size_t boundarySegmentIndex() const
return the boundary segment index
Definition identitygridintersections.hh:269
│ │ │ -
Entity outside() const
Definition identitygridintersections.hh:243
│ │ │ -
Entity inside() const
Definition identitygridintersections.hh:236
│ │ │ -
GeometryType type() const
Geometry type of an intersection.
Definition identitygridintersections.hh:279
│ │ │ -
IdentityGridLevelIntersection(const GridImp *identityGrid, HostLevelIntersection &&hostIntersection)
Definition identitygridintersections.hh:223
│ │ │ +
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,500 +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 │ │ │ │ -identitygridintersections.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 │ │ │ │ +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_IDENTITYGRIDLEAFITERATOR_HH │ │ │ │ +6#define DUNE_IDENTITYGRIDLEAFITERATOR_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 { │ │ │ │ +8#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_e_n_u_m_s_._h_h> │ │ │ │ +9 │ │ │ │ +14namespace _D_u_n_e { │ │ │ │ +15 │ │ │ │ 16 │ │ │ │ -17 │ │ │ │ -18 // External forward declarations │ │ │ │ -19 template< class Grid > │ │ │ │ -20 struct _H_o_s_t_G_r_i_d_A_c_c_e_s_s; │ │ │ │ -21 │ │ │ │ -22 │ │ │ │ -31 template │ │ │ │ -_3_2 class _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ -33 { │ │ │ │ -34 │ │ │ │ -35 friend class _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r; │ │ │ │ -36 │ │ │ │ -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: │ │ │ │ +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 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_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; │ │ │ │ +_5_1 void _i_n_c_r_e_m_e_n_t() { │ │ │ │ +52 ++hostLeafIterator_; │ │ │ │ +53 } │ │ │ │ 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 {} │ │ │ │ +_5_6 _E_n_t_i_t_y _d_e_r_e_f_e_r_e_n_c_e() const { │ │ │ │ +57 return _E_n_t_i_t_y{{identityGrid_,*hostLeafIterator_}}; │ │ │ │ +58 } │ │ │ │ +59 │ │ │ │ +_6_1 bool _e_q_u_a_l_s(const _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_t_e_r_a_t_o_r& i) const { │ │ │ │ +62 return hostLeafIterator_ == i.hostLeafIterator_; │ │ │ │ +63 } │ │ │ │ +64 │ │ │ │ +65 private: │ │ │ │ +66 const GridImp* identityGrid_; │ │ │ │ +67 │ │ │ │ +68 HostGridLeafIterator hostLeafIterator_; │ │ │ │ 69 │ │ │ │ -_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 } │ │ │ │ +70 }; │ │ │ │ +71 │ │ │ │ +72 │ │ │ │ +73} // namespace Dune │ │ │ │ 74 │ │ │ │ -_7_7 _E_n_t_i_t_y _i_n_s_i_d_e() const { │ │ │ │ -78 return _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_0_,_d_i_m_,_G_r_i_d_I_m_p_> │ │ │ │ -(identityGrid_,hostIntersection_.inside()); │ │ │ │ -79 } │ │ │ │ -80 │ │ │ │ -81 │ │ │ │ -_8_4 _E_n_t_i_t_y _o_u_t_s_i_d_e() const { │ │ │ │ -85 return _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_0_,_d_i_m_,_G_r_i_d_I_m_p_> │ │ │ │ -(identityGrid_,hostIntersection_.outside()); │ │ │ │ -86 } │ │ │ │ -87 │ │ │ │ -88 │ │ │ │ -_9_0 bool _b_o_u_n_d_a_r_y () const { │ │ │ │ -91 return hostIntersection_.boundary(); │ │ │ │ -92 } │ │ │ │ -93 │ │ │ │ -_9_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() ); │ │ │ │ -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_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. │ │ │ │ -_s_t_d │ │ │ │ -STL namespace. │ │ │ │ +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_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s │ │ │ │ -provides access to host grid objects from GeometryGrid │ │ │ │ -DDeeffiinniittiioonn identitygrid.hh:37 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y │ │ │ │ -The implementation of entities in a IdentityGrid. │ │ │ │ -DDeeffiinniittiioonn identitygridentity.hh:55 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ -DDeeffiinniittiioonn identitygridintersectioniterator.hh:84 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ -Iterator over all element neighborsMesh entities of codimension 0 ("elements") │ │ │ │ -allow to visit all nei... │ │ │ │ -DDeeffiinniittiioonn identitygridintersectioniterator.hh:29 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ -An intersection with a leaf neighbor elementMesh entities of codimension 0 │ │ │ │ -("elements") allow to visi... │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:33 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_i_n_s_i_d_e │ │ │ │ -Entity inside() const │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:77 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ -IdentityGridLeafIntersection(const GridImp *identityGrid, HostLeafIntersection │ │ │ │ -&&hostIntersection) │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:64 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_c_e_n_t_e_r_U_n_i_t_O_u_t_e_r_N_o_r_m_a_l │ │ │ │ -NormalVector centerUnitOuterNormal() const │ │ │ │ -Return unit outer normal (length == 1) │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:99 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y │ │ │ │ -GridImp::template Codim< 1 >::LocalGeometry LocalGeometry │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:51 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_g_e_o_m_e_t_r_y │ │ │ │ -Geometry geometry() const │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:142 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_o_u_t_s_i_d_e │ │ │ │ -Entity outside() const │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:84 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_g_e_o_m_e_t_r_y_I_n_O_u_t_s_i_d_e │ │ │ │ -LocalGeometry geometryInOutside() const │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:135 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_b_o_u_n_d_a_r_y │ │ │ │ -bool boundary() const │ │ │ │ -return true if intersection is with boundary. │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:90 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_t_y_p_e │ │ │ │ -GeometryType type() const │ │ │ │ -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 │ │ │ │ +_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/a00743.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: identitygridintersectioniterator.hh File Reference │ │ │ +dune-grid: identitygridentityseed.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,42 +72,37 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
identitygridintersectioniterator.hh File Reference
│ │ │ +
identitygridentityseed.hh File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

The IdentityGridLeafIntersectionIterator and IdentityGridLevelIntersectionIterator classes. │ │ │ +

The IdentityGridEntitySeed class. │ │ │ More...

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

Go to the source code of this file.

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

│ │ │ Classes

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

│ │ │ +

The IdentityGridEntitySeed class.

│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -2,34 +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 │ │ │ │ -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> │ │ │ │ +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_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ - Iterator over all element neighborsMesh entities of codimension 0 │ │ │ │ - ("elements") allow to visit all neighbors, where a neighbor is an │ │ │ │ -  entity of codimension 0 which has a common entity of codimension 1 │ │ │ │ - These neighbors are accessed via a _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r. This allows │ │ │ │ - the implement non-matching meshes. The number of neighbors may be │ │ │ │ - different from the number of an element! _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -class   _D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ +class   _D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_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 IdentityGridLeafIntersectionIterator and │ │ │ │ -IdentityGridLevelIntersectionIterator classes. │ │ │ │ +The IdentityGridEntitySeed 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: identitygridintersectioniterator.hh Source File │ │ │ +dune-grid: identitygridentityseed.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,177 +74,85 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
identitygridintersectioniterator.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_IDENTITYGRID_INTERSECTIONITERATOR_HH
│ │ │ -
6#define DUNE_IDENTITYGRID_INTERSECTIONITERATOR_HH
│ │ │ +
5#ifndef DUNE_IDENTITY_GRID_ENTITY_SEED_HH
│ │ │ +
6#define DUNE_IDENTITY_GRID_ENTITY_SEED_HH
│ │ │
7
│ │ │ - │ │ │ - │ │ │ -
10
│ │ │ - │ │ │ -
12
│ │ │ -
17namespace Dune {
│ │ │ -
18
│ │ │ -
27 template<class GridImp>
│ │ │ -
│ │ │ - │ │ │ -
29 {
│ │ │ -
30
│ │ │ -
31 constexpr static int dim = GridImp::dimension;
│ │ │ +
14namespace Dune {
│ │ │ +
15
│ │ │ +
16
│ │ │ +
22 template<int codim, class GridImp>
│ │ │ +
│ │ │ + │ │ │ +
24 {
│ │ │ +
25 protected:
│ │ │ +
26
│ │ │ +
27 // Entity type of the hostgrid
│ │ │ +
28 typedef typename GridImp::HostGridType::Traits::template Codim<codim>::Entity HostEntity;
│ │ │ +
29
│ │ │ +
30 // EntitySeed type of the hostgrid
│ │ │ +
31 typedef typename GridImp::HostGridType::Traits::template Codim<codim>::EntitySeed HostEntitySeed;
│ │ │
32
│ │ │ -
33 constexpr static int dimworld = GridImp::dimensionworld;
│ │ │ +
33 public:
│ │ │
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)
│ │ │ +
35 constexpr static int codimension = codim;
│ │ │ +
36
│ │ │ +
│ │ │ + │ │ │ +
41 {}
│ │ │ +
│ │ │ +
42
│ │ │ +
│ │ │ + │ │ │ +
50 hostEntitySeed_(hostEntity.seed())
│ │ │
51 {}
│ │ │
│ │ │
52
│ │ │ -
│ │ │ - │ │ │ -
55 return hostIterator_ == other.hostIterator_;
│ │ │ -
56 }
│ │ │ -
│ │ │ -
57
│ │ │ -
58
│ │ │ -
│ │ │ -
60 void increment() {
│ │ │ -
61 ++hostIterator_;
│ │ │ -
62 }
│ │ │ -
│ │ │ -
63
│ │ │ -
│ │ │ - │ │ │ -
66 return IdentityGridLeafIntersection<GridImp>(identityGrid_,*hostIterator_);
│ │ │ +
│ │ │ + │ │ │ +
57 {
│ │ │ +
58 return hostEntitySeed_;
│ │ │ +
59 }
│ │ │ +
│ │ │ +
60
│ │ │ +
│ │ │ +
64 bool isValid() const
│ │ │ +
65 {
│ │ │ +
66 return hostEntitySeed_.isValid();
│ │ │
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 IdentityGridLeafIntersection and IdentityGridLevelIntersection classes.
│ │ │ -
The IdentityGridEntity class.
│ │ │ +
68 private:
│ │ │ +
69
│ │ │ +
70 HostEntitySeed hostEntitySeed_;
│ │ │ +
71 };
│ │ │ +
│ │ │ +
72
│ │ │ +
73} // namespace Dune
│ │ │ +
74
│ │ │ +
75#endif // #define DUNE_IDENTITY_GRID_ENTITY_SEED_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
│ │ │ -
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
│ │ │ - │ │ │ +
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,208 +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 │ │ │ │ -identitygridintersectioniterator.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_IDENTITYGRID_INTERSECTIONITERATOR_HH │ │ │ │ -6#define DUNE_IDENTITYGRID_INTERSECTIONITERATOR_HH │ │ │ │ +5#ifndef DUNE_IDENTITY_GRID_ENTITY_SEED_HH │ │ │ │ +6#define DUNE_IDENTITY_GRID_ENTITY_SEED_HH │ │ │ │ 7 │ │ │ │ -8#include "_i_d_e_n_t_i_t_y_g_r_i_d_i_n_t_e_r_s_e_c_t_i_o_n_s_._h_h" │ │ │ │ -9#include "_i_d_e_n_t_i_t_y_g_r_i_d_e_n_t_i_t_y_._h_h" │ │ │ │ -10 │ │ │ │ -11#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_i_n_t_e_r_s_e_c_t_i_o_n_._h_h> │ │ │ │ -12 │ │ │ │ -17namespace _D_u_n_e { │ │ │ │ -18 │ │ │ │ -27 template │ │ │ │ -_2_8 class _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ -29 { │ │ │ │ -30 │ │ │ │ -31 constexpr static int dim = GridImp::dimension; │ │ │ │ +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: │ │ │ │ +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 constexpr static int dimworld = GridImp::dimensionworld; │ │ │ │ +33 public: │ │ │ │ 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) │ │ │ │ +_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_4 bool _e_q_u_a_l_s(const _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r& other) const { │ │ │ │ -55 return hostIterator_ == other.hostIterator_; │ │ │ │ -56 } │ │ │ │ -57 │ │ │ │ -58 │ │ │ │ -_6_0 void _i_n_c_r_e_m_e_n_t() { │ │ │ │ -61 ++hostIterator_; │ │ │ │ -62 } │ │ │ │ -63 │ │ │ │ -_6_5 _I_n_t_e_r_s_e_c_t_i_o_n _d_e_r_e_f_e_r_e_n_c_e() const { │ │ │ │ -66 return _I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_<_G_r_i_d_I_m_p_>(identityGrid_,*hostIterator_); │ │ │ │ +_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 │ │ │ │ -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_i_n_t_e_r_s_e_c_t_i_o_n_s_._h_h │ │ │ │ -The IdentityGridLeafIntersection and IdentityGridLevelIntersection classes. │ │ │ │ -_i_d_e_n_t_i_t_y_g_r_i_d_e_n_t_i_t_y_._h_h │ │ │ │ -The IdentityGridEntity class. │ │ │ │ +68 private: │ │ │ │ +69 │ │ │ │ +70 _H_o_s_t_E_n_t_i_t_y_S_e_e_d hostEntitySeed_; │ │ │ │ +71 }; │ │ │ │ +72 │ │ │ │ +73} // namespace Dune │ │ │ │ +74 │ │ │ │ +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_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 identitygridintersectioniterator.hh:114 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_: │ │ │ │ -_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ -IdentityGridLevelIntersectionIterator(const GridImp *identityGrid, const │ │ │ │ -HostLevelIntersectionIterator &hostIterator) │ │ │ │ -DDeeffiinniittiioonn identitygridintersectioniterator.hh:101 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_:_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ -Dune::Intersection< const GridImp, Dune::IdentityGridLevelIntersection< GridImp │ │ │ │ -> > Intersection │ │ │ │ -DDeeffiinniittiioonn identitygridintersectioniterator.hh:96 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_:_d_e_r_e_f_e_r_e_n_c_e │ │ │ │ -Intersection dereference() const │ │ │ │ -dereferencing │ │ │ │ -DDeeffiinniittiioonn identitygridintersectioniterator.hh:119 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_: │ │ │ │ -_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ -IdentityGridLevelIntersectionIterator() │ │ │ │ -DDeeffiinniittiioonn identitygridintersectioniterator.hh:98 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ -Iterator over all element neighborsMesh entities of codimension 0 ("elements") │ │ │ │ -allow to visit all nei... │ │ │ │ -DDeeffiinniittiioonn identitygridintersectioniterator.hh:29 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_:_e_q_u_a_l_s │ │ │ │ -bool equals(const IdentityGridLeafIntersectionIterator &other) const │ │ │ │ -equality │ │ │ │ -DDeeffiinniittiioonn identitygridintersectioniterator.hh:54 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ -void increment() │ │ │ │ -prefix increment │ │ │ │ -DDeeffiinniittiioonn identitygridintersectioniterator.hh:60 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_: │ │ │ │ -_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ -IdentityGridLeafIntersectionIterator(const GridImp *identityGrid, const │ │ │ │ -HostLeafIntersectionIterator &hostIterator) │ │ │ │ -DDeeffiinniittiioonn identitygridintersectioniterator.hh:47 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_:_d_e_r_e_f_e_r_e_n_c_e │ │ │ │ -Intersection dereference() const │ │ │ │ -dereferencing │ │ │ │ -DDeeffiinniittiioonn identitygridintersectioniterator.hh:65 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_:_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ -Dune::Intersection< const GridImp, Dune::IdentityGridLeafIntersection< GridImp │ │ │ │ -> > Intersection │ │ │ │ -DDeeffiinniittiioonn identitygridintersectioniterator.hh:42 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r_:_: │ │ │ │ -_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ -IdentityGridLeafIntersectionIterator() │ │ │ │ -DDeeffiinniittiioonn identitygridintersectioniterator.hh:44 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ -An intersection with a leaf neighbor elementMesh entities of codimension 0 │ │ │ │ -("elements") allow to visi... │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:33 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ -DDeeffiinniittiioonn identitygridintersections.hh:192 │ │ │ │ -_i_n_t_e_r_s_e_c_t_i_o_n_._h_h │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d │ │ │ │ +The EntitySeed class provides the minimal information needed to restore an │ │ │ │ +Entity using the grid. │ │ │ │ +DDeeffiinniittiioonn identitygridentityseed.hh:24 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d_:_:_c_o_d_i_m_e_n_s_i_o_n │ │ │ │ +static constexpr int codimension │ │ │ │ +DDeeffiinniittiioonn identitygridentityseed.hh:35 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d │ │ │ │ +IdentityGridEntitySeed() │ │ │ │ +Construct an empty (i.e. isValid() == false) seed. │ │ │ │ +DDeeffiinniittiioonn identitygridentityseed.hh:40 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d_:_:_i_s_V_a_l_i_d │ │ │ │ +bool isValid() const │ │ │ │ +Check whether it is safe to create an Entity from this Seed. │ │ │ │ +DDeeffiinniittiioonn identitygridentityseed.hh:64 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d_:_:_H_o_s_t_E_n_t_i_t_y │ │ │ │ +GridImp::HostGridType::Traits::template Codim< codim >::Entity HostEntity │ │ │ │ +DDeeffiinniittiioonn identitygridentityseed.hh:28 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d │ │ │ │ +IdentityGridEntitySeed(const HostEntity &hostEntity) │ │ │ │ +Create EntitySeed from hostgrid Entity. │ │ │ │ +DDeeffiinniittiioonn identitygridentityseed.hh:49 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d_:_:_h_o_s_t_E_n_t_i_t_y_S_e_e_d │ │ │ │ +const HostEntitySeed & hostEntitySeed() const │ │ │ │ +Get stored HostEntitySeed. │ │ │ │ +DDeeffiinniittiioonn identitygridentityseed.hh:56 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d_:_:_H_o_s_t_E_n_t_i_t_y_S_e_e_d │ │ │ │ +GridImp::HostGridType::Traits::template Codim< codim >::EntitySeed │ │ │ │ +HostEntitySeed │ │ │ │ +DDeeffiinniittiioonn identitygridentityseed.hh:31 │ │ │ │ =============================================================================== │ │ │ │ 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: identitygridindexsets.hh File Reference │ │ │ +dune-grid: identitygridhierarchiciterator.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,44 +72,37 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
identitygridindexsets.hh File Reference
│ │ │ +
identitygridhierarchiciterator.hh File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

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

The IdentityGridHierarchicIterator class. │ │ │ More...

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

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::IdentityGridHierarchicIterator< GridImp >
 Iterator over the descendants of an entity.Mesh entities of codimension 0 ("elements") allow to visit all entities of codimension 0 obtained through nested, hierarchic refinement of the entity. Iteration over this set of entities is provided by the HierarchicIterator, starting from a given entity. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │

Detailed Description

│ │ │ -

The index and id sets for the IdentityGrid class.

│ │ │ +

The IdentityGridHierarchicIterator class.

│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -2,29 +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 │ │ │ │ -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 │ │ │ │ +identitygridhierarchiciterator.hh File Reference │ │ │ │ +The IdentityGridHierarchicIterator class. _M_o_r_e_._._. │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -class   _D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_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_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ + Iterator over the descendants of an entity.Mesh entities of codimension │ │ │ │ + 0 ("elements") allow to visit all entities of codimension 0 obtained │ │ │ │ +  through nested, hierarchic refinement of the entity. Iteration over │ │ │ │ + this set of entities is provided by the HierarchicIterator, starting │ │ │ │ + from a given entity. _M_o_r_e_._._. │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │   Include standard header files. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -The index and id sets for the IdentityGrid class. │ │ │ │ +The IdentityGridHierarchicIterator class. │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00746_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: identitygridindexsets.hh Source File │ │ │ +dune-grid: identitygridhierarchiciterator.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,364 +74,99 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
identitygridindexsets.hh
│ │ │ +
identitygridhierarchiciterator.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_IDENTITYGRIDHIERITERATOR_HH
│ │ │ +
6#define DUNE_IDENTITYGRIDHIERITERATOR_HH
│ │ │
7
│ │ │ - │ │ │ +
12namespace Dune {
│ │ │
13
│ │ │ -
14#include <vector>
│ │ │ -
15
│ │ │ -
16namespace Dune {
│ │ │ -
17
│ │ │ -
19 template<class GridImp>
│ │ │ -
│ │ │ - │ │ │ -
21 public IndexSet<GridImp,
│ │ │ -
22 IdentityGridLevelIndexSet<GridImp>,
│ │ │ -
23 typename std::remove_const<GridImp>::type::HostGridType::LevelGridView::IndexSet::IndexType,
│ │ │ -
24 typename std::remove_const<GridImp>::type::HostGridType::LevelGridView::IndexSet::Types
│ │ │ -
25 >
│ │ │ +
14
│ │ │ +
15 //**********************************************************************
│ │ │ +
16 //
│ │ │ +
24 template<class GridImp>
│ │ │ +
│ │ │ + │ │ │
26 {
│ │ │ -
27 public:
│ │ │ -
28
│ │ │ -
29 typedef typename std::remove_const<GridImp>::type::HostGridType HostGrid;
│ │ │ -
30 typedef typename HostGrid::LevelGridView::IndexSet::Types Types;
│ │ │ -
31
│ │ │ -
32 constexpr static int dim = GridImp::dimension;
│ │ │ -
33
│ │ │ -
35 template<int codim>
│ │ │ -
│ │ │ -
36 int index (const typename GridImp::Traits::template Codim<codim>::Entity& e) const
│ │ │ -
37 {
│ │ │ -
38 return grid_->hostgrid_->levelIndexSet(level_).template index<codim>(grid_->template getHostEntity<codim>(e));
│ │ │ -
39 }
│ │ │ -
│ │ │ -
40
│ │ │ -
41
│ │ │ -
43 template<int cc>
│ │ │ -
│ │ │ -
44 int subIndex (const typename GridImp::Traits::template Codim<cc>::Entity& e, int i, int codim) const
│ │ │ -
45 {
│ │ │ -
46 return grid_->hostgrid_->levelIndexSet(level_).subIndex(grid_->template getHostEntity<cc>(e), i, codim);
│ │ │ -
47 }
│ │ │ +
27
│ │ │ +
28 // Type of the corresponding HierarchicIterator in the host grid
│ │ │ +
29 typedef typename GridImp::HostGridType::template Codim<0>::Entity::HierarchicIterator HostGridHierarchicIterator;
│ │ │ +
30
│ │ │ +
31 public:
│ │ │ +
32
│ │ │ +
33 constexpr static int codimension = 0;
│ │ │ +
34
│ │ │ +
35 typedef typename GridImp::template Codim<0>::Entity Entity;
│ │ │ +
36
│ │ │ +
│ │ │ +
38 explicit IdentityGridHierarchicIterator(const GridImp* identityGrid, const Entity& startEntity, int maxLevel) :
│ │ │ +
39 identityGrid_(identityGrid),
│ │ │ +
40 hostHierarchicIterator_(startEntity.impl().hostEntity_.hbegin(maxLevel))
│ │ │ +
41 {}
│ │ │ +
│ │ │ +
42
│ │ │ +
43
│ │ │ +
│ │ │ +
45 explicit IdentityGridHierarchicIterator(const GridImp* identityGrid, const Entity& startEntity, int maxLevel, [[maybe_unused]] bool endDummy) :
│ │ │ +
46 identityGrid_(identityGrid),
│ │ │ +
47 hostHierarchicIterator_(startEntity.impl().hostEntity_.hend(maxLevel))
│ │ │ +
48 {}
│ │ │
│ │ │ -
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);
│ │ │ +
50
│ │ │ +
│ │ │ +
52 void increment()
│ │ │ +
53 {
│ │ │ +
54 ++hostHierarchicIterator_;
│ │ │ +
55 }
│ │ │ +
│ │ │ +
56
│ │ │ +
│ │ │ + │ │ │ +
59 return Entity{{identityGrid_,*hostHierarchicIterator_}};
│ │ │
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 }
│ │ │ + │ │ │ +
64 return hostHierarchicIterator_ == i.hostHierarchicIterator_;
│ │ │ +
65 }
│ │ │ +
│ │ │ +
66
│ │ │ +
67 private:
│ │ │ +
68 const GridImp* identityGrid_;
│ │ │ +
69
│ │ │ +
70 HostGridHierarchicIterator hostHierarchicIterator_;
│ │ │ +
71
│ │ │ +
72 };
│ │ │
│ │ │ +
73
│ │ │
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} // end namespace Dune
│ │ │ +
76
│ │ │ +
77#endif
│ │ │
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 the descendants of an entity.Mesh entities of codimension 0 ("elements") allow to visit...
Definition identitygridhierarchiciterator.hh:26
│ │ │ +
void increment()
Definition identitygridhierarchiciterator.hh:52
│ │ │ +
GridImp::template Codim< 0 >::Entity Entity
Definition identitygridhierarchiciterator.hh:35
│ │ │ +
bool equals(const IdentityGridHierarchicIterator &i) const
equality
Definition identitygridhierarchiciterator.hh:63
│ │ │ +
static constexpr int codimension
Definition identitygridhierarchiciterator.hh:33
│ │ │ +
IdentityGridHierarchicIterator(const GridImp *identityGrid, const Entity &startEntity, int maxLevel, bool endDummy)
Definition identitygridhierarchiciterator.hh:45
│ │ │ +
Entity dereference() const
dereferencing
Definition identitygridhierarchiciterator.hh:58
│ │ │ +
IdentityGridHierarchicIterator(const GridImp *identityGrid, const Entity &startEntity, int maxLevel)
the default Constructor
Definition identitygridhierarchiciterator.hh:38
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,445 +1,109 @@ │ │ │ │ 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 │ │ │ │ +identitygridhierarchiciterator.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ 3// -*- 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_IDENTITYGRIDHIERITERATOR_HH │ │ │ │ +6#define DUNE_IDENTITYGRIDHIERITERATOR_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> │ │ │ │ +12namespace _D_u_n_e { │ │ │ │ 13 │ │ │ │ -14#include │ │ │ │ -15 │ │ │ │ -16namespace _D_u_n_e { │ │ │ │ -17 │ │ │ │ -19 template │ │ │ │ -_2_0 class _I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_d_e_x_S_e_t : │ │ │ │ -21 public _I_n_d_e_x_S_e_t, │ │ │ │ -23 typename std::remove_const::type::HostGridType::LevelGridView:: │ │ │ │ -IndexSet::IndexType, │ │ │ │ -24 typename std::remove_const::type::HostGridType::LevelGridView:: │ │ │ │ -IndexSet::Types │ │ │ │ -25 > │ │ │ │ +14 │ │ │ │ +15 //********************************************************************** │ │ │ │ +16 // │ │ │ │ +24 template │ │ │ │ +_2_5 class _I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ 26 { │ │ │ │ -27 public: │ │ │ │ -28 │ │ │ │ -_2_9 typedef typename std::remove_const::type::HostGridType _H_o_s_t_G_r_i_d; │ │ │ │ -_3_0 typedef typename HostGrid::LevelGridView::IndexSet::Types _T_y_p_e_s; │ │ │ │ -31 │ │ │ │ -_3_2 constexpr static int _d_i_m = GridImp::dimension; │ │ │ │ -33 │ │ │ │ -35 template │ │ │ │ -_3_6 int _i_n_d_e_x (const typename GridImp::Traits::template Codim::Entity& e) │ │ │ │ -const │ │ │ │ -37 { │ │ │ │ -38 return _g_r_i_d__->hostgrid_->levelIndexSet(_l_e_v_e_l__).template index(_g_r_i_d__- │ │ │ │ ->template getHostEntity(e)); │ │ │ │ -39 } │ │ │ │ -40 │ │ │ │ -41 │ │ │ │ -43 template │ │ │ │ -_4_4 int _s_u_b_I_n_d_e_x (const typename GridImp::Traits::template Codim::Entity& e, │ │ │ │ -int i, int codim) const │ │ │ │ -45 { │ │ │ │ -46 return _g_r_i_d__->hostgrid_->levelIndexSet(_l_e_v_e_l__).subIndex(_g_r_i_d__->template │ │ │ │ -getHostEntity(e), i, codim); │ │ │ │ -47 } │ │ │ │ -48 │ │ │ │ +27 │ │ │ │ +28 // Type of the corresponding HierarchicIterator in the host grid │ │ │ │ +29 typedef typename GridImp::HostGridType::template Codim<0>::Entity:: │ │ │ │ +HierarchicIterator HostGridHierarchicIterator; │ │ │ │ +30 │ │ │ │ +31 public: │ │ │ │ +32 │ │ │ │ +_3_3 constexpr static int _c_o_d_i_m_e_n_s_i_o_n = 0; │ │ │ │ +34 │ │ │ │ +_3_5 typedef typename GridImp::template Codim<0>::Entity _E_n_t_i_t_y; │ │ │ │ +36 │ │ │ │ +_3_8 explicit _I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r(const GridImp* identityGrid, const │ │ │ │ +_E_n_t_i_t_y& startEntity, int maxLevel) : │ │ │ │ +39 identityGrid_(identityGrid), │ │ │ │ +40 hostHierarchicIterator_(startEntity.impl().hostEntity_.hbegin(maxLevel)) │ │ │ │ +41 {} │ │ │ │ +42 │ │ │ │ +43 │ │ │ │ +_4_5 explicit _I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r(const GridImp* identityGrid, const │ │ │ │ +_E_n_t_i_t_y& startEntity, int maxLevel, [[maybe_unused]] bool endDummy) : │ │ │ │ +46 identityGrid_(identityGrid), │ │ │ │ +47 hostHierarchicIterator_(startEntity.impl().hostEntity_.hend(maxLevel)) │ │ │ │ +48 {} │ │ │ │ 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); │ │ │ │ +50 │ │ │ │ +_5_2 void _i_n_c_r_e_m_e_n_t() │ │ │ │ +53 { │ │ │ │ +54 ++hostHierarchicIterator_; │ │ │ │ +55 } │ │ │ │ +56 │ │ │ │ +_5_8 _E_n_t_i_t_y _d_e_r_e_f_e_r_e_n_c_e() const { │ │ │ │ +59 return _E_n_t_i_t_y{{identityGrid_,*hostHierarchicIterator_}}; │ │ │ │ 60 } │ │ │ │ 61 │ │ │ │ -_6_3 _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 } │ │ │ │ +_6_3 bool _e_q_u_a_l_s(const _I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r& i) const { │ │ │ │ +64 return hostHierarchicIterator_ == i.hostHierarchicIterator_; │ │ │ │ +65 } │ │ │ │ +66 │ │ │ │ +67 private: │ │ │ │ +68 const GridImp* identityGrid_; │ │ │ │ +69 │ │ │ │ +70 HostGridHierarchicIterator hostHierarchicIterator_; │ │ │ │ +71 │ │ │ │ +72 }; │ │ │ │ +73 │ │ │ │ 74 │ │ │ │ -_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} // end namespace Dune │ │ │ │ +76 │ │ │ │ +77#endif │ │ │ │ _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_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ +Iterator over the descendants of an entity.Mesh entities of codimension 0 │ │ │ │ +("elements") allow to visit... │ │ │ │ +DDeeffiinniittiioonn identitygridhierarchiciterator.hh:26 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ +void increment() │ │ │ │ +DDeeffiinniittiioonn identitygridhierarchiciterator.hh:52 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_E_n_t_i_t_y │ │ │ │ +GridImp::template Codim< 0 >::Entity Entity │ │ │ │ +DDeeffiinniittiioonn identitygridhierarchiciterator.hh:35 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_e_q_u_a_l_s │ │ │ │ +bool equals(const IdentityGridHierarchicIterator &i) const │ │ │ │ +equality │ │ │ │ +DDeeffiinniittiioonn identitygridhierarchiciterator.hh:63 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_c_o_d_i_m_e_n_s_i_o_n │ │ │ │ +static constexpr int codimension │ │ │ │ +DDeeffiinniittiioonn identitygridhierarchiciterator.hh:33 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ +IdentityGridHierarchicIterator(const GridImp *identityGrid, const Entity │ │ │ │ +&startEntity, int maxLevel, bool endDummy) │ │ │ │ +DDeeffiinniittiioonn identitygridhierarchiciterator.hh:45 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_d_e_r_e_f_e_r_e_n_c_e │ │ │ │ +Entity dereference() const │ │ │ │ +dereferencing │ │ │ │ +DDeeffiinniittiioonn identitygridhierarchiciterator.hh:58 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ +IdentityGridHierarchicIterator(const GridImp *identityGrid, const Entity │ │ │ │ +&startEntity, int maxLevel) │ │ │ │ +the default Constructor │ │ │ │ +DDeeffiinniittiioonn identitygridhierarchiciterator.hh:38 │ │ │ │ =============================================================================== │ │ │ │ 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: identitygridhierarchiciterator.hh File Reference │ │ │ +dune-grid: identitygridleveliterator.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,37 +72,38 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
identitygridhierarchiciterator.hh File Reference
│ │ │ +
identitygridleveliterator.hh File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

The IdentityGridHierarchicIterator class. │ │ │ +

The IdentityGridLevelIterator class. │ │ │ More...

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

Go to the source code of this file.

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

│ │ │ Classes

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

│ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │

Detailed Description

│ │ │ -

The IdentityGridHierarchicIterator class.

│ │ │ +

The IdentityGridLevelIterator class.

│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -2,26 +2,24 @@ │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_r_i_d │ │ │ │ * _i_d_e_n_t_i_t_y_g_r_i_d │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -identitygridhierarchiciterator.hh File Reference │ │ │ │ -The IdentityGridHierarchicIterator class. _M_o_r_e_._._. │ │ │ │ +identitygridleveliterator.hh File Reference │ │ │ │ +The IdentityGridLevelIterator class. _M_o_r_e_._._. │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_e_n_u_m_s_._h_h> │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -class   _D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ - Iterator over the descendants of an entity.Mesh entities of codimension │ │ │ │ - 0 ("elements") allow to visit all entities of codimension 0 obtained │ │ │ │ -  through nested, hierarchic refinement of the entity. Iteration over │ │ │ │ - this set of entities is provided by the HierarchicIterator, starting │ │ │ │ - from a given entity. _M_o_r_e_._._. │ │ │ │ +class   _D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_t_e_r_a_t_o_r_<_ _c_o_d_i_m_,_ _p_i_t_y_p_e_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ +  Iterator over all entities of a given codimension and level of a grid. │ │ │ │ + _M_o_r_e_._._. │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │   Include standard header files. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -The IdentityGridHierarchicIterator class. │ │ │ │ +The IdentityGridLevelIterator class. │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00749_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: identitygridhierarchiciterator.hh Source File │ │ │ +dune-grid: identitygridleveliterator.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,99 +74,97 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
identitygridhierarchiciterator.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_IDENTITYGRIDHIERITERATOR_HH
│ │ │ -
6#define DUNE_IDENTITYGRIDHIERITERATOR_HH
│ │ │ +
5#ifndef DUNE_IDENTITYGRIDLEVELITERATOR_HH
│ │ │ +
6#define DUNE_IDENTITYGRIDLEVELITERATOR_HH
│ │ │
7
│ │ │ -
12namespace Dune {
│ │ │ -
13
│ │ │ -
14
│ │ │ -
15 //**********************************************************************
│ │ │ -
16 //
│ │ │ -
24 template<class GridImp>
│ │ │ -
│ │ │ - │ │ │ -
26 {
│ │ │ -
27
│ │ │ -
28 // Type of the corresponding HierarchicIterator in the host grid
│ │ │ -
29 typedef typename GridImp::HostGridType::template Codim<0>::Entity::HierarchicIterator HostGridHierarchicIterator;
│ │ │ + │ │ │ +
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;
│ │ │
30
│ │ │ -
31 public:
│ │ │ -
32
│ │ │ -
33 constexpr static int codimension = 0;
│ │ │ -
34
│ │ │ -
35 typedef typename GridImp::template Codim<0>::Entity Entity;
│ │ │ -
36
│ │ │ -
│ │ │ -
38 explicit IdentityGridHierarchicIterator(const GridImp* identityGrid, const Entity& startEntity, int maxLevel) :
│ │ │ -
39 identityGrid_(identityGrid),
│ │ │ -
40 hostHierarchicIterator_(startEntity.impl().hostEntity_.hbegin(maxLevel))
│ │ │ -
41 {}
│ │ │ -
│ │ │ -
42
│ │ │ -
43
│ │ │ -
│ │ │ -
45 explicit IdentityGridHierarchicIterator(const GridImp* identityGrid, const Entity& startEntity, int maxLevel, [[maybe_unused]] bool endDummy) :
│ │ │ -
46 identityGrid_(identityGrid),
│ │ │ -
47 hostHierarchicIterator_(startEntity.impl().hostEntity_.hend(maxLevel))
│ │ │ -
48 {}
│ │ │ -
│ │ │ -
49
│ │ │ -
50
│ │ │ -
│ │ │ -
52 void increment()
│ │ │ -
53 {
│ │ │ -
54 ++hostHierarchicIterator_;
│ │ │ -
55 }
│ │ │ -
│ │ │ -
56
│ │ │ -
│ │ │ - │ │ │ -
59 return Entity{{identityGrid_,*hostHierarchicIterator_}};
│ │ │ -
60 }
│ │ │ -
│ │ │ -
61
│ │ │ -
│ │ │ - │ │ │ -
64 return hostHierarchicIterator_ == i.hostHierarchicIterator_;
│ │ │ -
65 }
│ │ │ +
│ │ │ +
32 explicit IdentityGridLevelIterator(const GridImp* identityGrid, int level)
│ │ │ +
33 : identityGrid_(identityGrid),
│ │ │ +
34 hostLevelIterator_(identityGrid->hostgrid_->levelGridView(level).template begin<codim,pitype>())
│ │ │ +
35 {}
│ │ │
│ │ │ +
36
│ │ │ +
37
│ │ │ +
│ │ │ +
43 explicit IdentityGridLevelIterator(const GridImp* identityGrid, int level, [[maybe_unused]] bool endDummy)
│ │ │ +
44 : identityGrid_(identityGrid),
│ │ │ +
45 hostLevelIterator_(identityGrid->hostgrid_->levelGridView(level).template end<codim,pitype>())
│ │ │ +
46 {}
│ │ │ +
│ │ │ +
47
│ │ │ +
48
│ │ │ +
│ │ │ +
50 void increment() {
│ │ │ +
51 ++hostLevelIterator_;
│ │ │ +
52 }
│ │ │ +
│ │ │ +
53
│ │ │ +
│ │ │ + │ │ │ +
56 return Entity{{identityGrid_,*hostLevelIterator_}};
│ │ │ +
57 }
│ │ │ +
│ │ │ +
58
│ │ │ +
│ │ │ +
60 bool equals(const IdentityGridLevelIterator& i) const {
│ │ │ +
61 return hostLevelIterator_ == i.hostLevelIterator_;
│ │ │ +
62 }
│ │ │ +
│ │ │ +
63
│ │ │ +
64 private:
│ │ │ +
65 const GridImp* identityGrid_;
│ │ │
66
│ │ │ -
67 private:
│ │ │ -
68 const GridImp* identityGrid_;
│ │ │ +
67 HostGridLevelIterator hostLevelIterator_;
│ │ │ +
68 };
│ │ │ +
│ │ │
69
│ │ │ -
70 HostGridHierarchicIterator hostHierarchicIterator_;
│ │ │ -
71
│ │ │ -
72 };
│ │ │ -
│ │ │ -
73
│ │ │ -
74
│ │ │ -
75} // end namespace Dune
│ │ │ -
76
│ │ │ -
77#endif
│ │ │ +
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
│ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ -
Iterator over the descendants of an entity.Mesh entities of codimension 0 ("elements") allow to visit...
Definition identitygridhierarchiciterator.hh:26
│ │ │ -
void increment()
Definition identitygridhierarchiciterator.hh:52
│ │ │ -
GridImp::template Codim< 0 >::Entity Entity
Definition identitygridhierarchiciterator.hh:35
│ │ │ -
bool equals(const IdentityGridHierarchicIterator &i) const
equality
Definition identitygridhierarchiciterator.hh:63
│ │ │ -
static constexpr int codimension
Definition identitygridhierarchiciterator.hh:33
│ │ │ -
IdentityGridHierarchicIterator(const GridImp *identityGrid, const Entity &startEntity, int maxLevel, bool endDummy)
Definition identitygridhierarchiciterator.hh:45
│ │ │ -
Entity dereference() const
dereferencing
Definition identitygridhierarchiciterator.hh:58
│ │ │ -
IdentityGridHierarchicIterator(const GridImp *identityGrid, const Entity &startEntity, int maxLevel)
the default Constructor
Definition identitygridhierarchiciterator.hh:38
│ │ │ +
Iterator over all entities of a given codimension and level of a grid.
Definition 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,109 +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 │ │ │ │ -identitygridhierarchiciterator.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_IDENTITYGRIDHIERITERATOR_HH │ │ │ │ -6#define DUNE_IDENTITYGRIDHIERITERATOR_HH │ │ │ │ +5#ifndef DUNE_IDENTITYGRIDLEVELITERATOR_HH │ │ │ │ +6#define DUNE_IDENTITYGRIDLEVELITERATOR_HH │ │ │ │ 7 │ │ │ │ -12namespace _D_u_n_e { │ │ │ │ -13 │ │ │ │ -14 │ │ │ │ -15 //********************************************************************** │ │ │ │ -16 // │ │ │ │ -24 template │ │ │ │ -_2_5 class _I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ -26 { │ │ │ │ -27 │ │ │ │ -28 // Type of the corresponding HierarchicIterator in the host grid │ │ │ │ -29 typedef typename GridImp::HostGridType::template Codim<0>::Entity:: │ │ │ │ -HierarchicIterator HostGridHierarchicIterator; │ │ │ │ +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; │ │ │ │ 30 │ │ │ │ -31 public: │ │ │ │ -32 │ │ │ │ -_3_3 constexpr static int _c_o_d_i_m_e_n_s_i_o_n = 0; │ │ │ │ -34 │ │ │ │ -_3_5 typedef typename GridImp::template Codim<0>::Entity _E_n_t_i_t_y; │ │ │ │ +_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 │ │ │ │ -_3_8 explicit _I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r(const GridImp* identityGrid, const │ │ │ │ -_E_n_t_i_t_y& startEntity, int maxLevel) : │ │ │ │ -39 identityGrid_(identityGrid), │ │ │ │ -40 hostHierarchicIterator_(startEntity.impl().hostEntity_.hbegin(maxLevel)) │ │ │ │ -41 {} │ │ │ │ -42 │ │ │ │ -43 │ │ │ │ -_4_5 explicit _I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r(const GridImp* identityGrid, const │ │ │ │ -_E_n_t_i_t_y& startEntity, int maxLevel, [[maybe_unused]] bool endDummy) : │ │ │ │ -46 identityGrid_(identityGrid), │ │ │ │ -47 hostHierarchicIterator_(startEntity.impl().hostEntity_.hend(maxLevel)) │ │ │ │ -48 {} │ │ │ │ -49 │ │ │ │ -50 │ │ │ │ -_5_2 void _i_n_c_r_e_m_e_n_t() │ │ │ │ -53 { │ │ │ │ -54 ++hostHierarchicIterator_; │ │ │ │ -55 } │ │ │ │ -56 │ │ │ │ -_5_8 _E_n_t_i_t_y _d_e_r_e_f_e_r_e_n_c_e() const { │ │ │ │ -59 return _E_n_t_i_t_y{{identityGrid_,*hostHierarchicIterator_}}; │ │ │ │ -60 } │ │ │ │ -61 │ │ │ │ -_6_3 bool _e_q_u_a_l_s(const _I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r& i) const { │ │ │ │ -64 return hostHierarchicIterator_ == i.hostHierarchicIterator_; │ │ │ │ -65 } │ │ │ │ +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 private: │ │ │ │ -68 const GridImp* identityGrid_; │ │ │ │ +67 HostGridLevelIterator hostLevelIterator_; │ │ │ │ +68 }; │ │ │ │ 69 │ │ │ │ -70 HostGridHierarchicIterator hostHierarchicIterator_; │ │ │ │ -71 │ │ │ │ -72 }; │ │ │ │ -73 │ │ │ │ -74 │ │ │ │ -75} // end namespace Dune │ │ │ │ -76 │ │ │ │ -77#endif │ │ │ │ +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 │ │ │ │ _D_u_n_e │ │ │ │ Include standard header files. │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ -Iterator over the descendants of an entity.Mesh entities of codimension 0 │ │ │ │ -("elements") allow to visit... │ │ │ │ -DDeeffiinniittiioonn identitygridhierarchiciterator.hh:26 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_i_n_c_r_e_m_e_n_t │ │ │ │ +_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() │ │ │ │ -DDeeffiinniittiioonn identitygridhierarchiciterator.hh:52 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_E_n_t_i_t_y │ │ │ │ -GridImp::template Codim< 0 >::Entity Entity │ │ │ │ -DDeeffiinniittiioonn identitygridhierarchiciterator.hh:35 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_e_q_u_a_l_s │ │ │ │ -bool equals(const IdentityGridHierarchicIterator &i) const │ │ │ │ -equality │ │ │ │ -DDeeffiinniittiioonn identitygridhierarchiciterator.hh:63 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_c_o_d_i_m_e_n_s_i_o_n │ │ │ │ +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 identitygridhierarchiciterator.hh:33 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ -IdentityGridHierarchicIterator(const GridImp *identityGrid, const Entity │ │ │ │ -&startEntity, int maxLevel, bool endDummy) │ │ │ │ -DDeeffiinniittiioonn identitygridhierarchiciterator.hh:45 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_d_e_r_e_f_e_r_e_n_c_e │ │ │ │ +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 identitygridhierarchiciterator.hh:58 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r_:_:_I_d_e_n_t_i_t_y_G_r_i_d_H_i_e_r_a_r_c_h_i_c_I_t_e_r_a_t_o_r │ │ │ │ -IdentityGridHierarchicIterator(const GridImp *identityGrid, const Entity │ │ │ │ -&startEntity, int maxLevel) │ │ │ │ -the default Constructor │ │ │ │ -DDeeffiinniittiioonn identitygridhierarchiciterator.hh:38 │ │ │ │ +DDeeffiinniittiioonn identitygridleveliterator.hh:55 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00755.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: identitygridentityseed.hh File Reference │ │ │ +dune-grid: identitygridintersections.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,37 +72,41 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
identitygridentityseed.hh File Reference
│ │ │ +
identitygridintersections.hh File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

The IdentityGridEntitySeed class. │ │ │ +

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

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

Go to the source code of this file.

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

│ │ │ Classes

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

│ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │

Detailed Description

│ │ │ -

The IdentityGridEntitySeed class.

│ │ │ +

The IdentityGridLeafIntersection and IdentityGridLevelIntersection classes.

│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -2,23 +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 │ │ │ │ -identitygridentityseed.hh File Reference │ │ │ │ -The IdentityGridEntitySeed class. _M_o_r_e_._._. │ │ │ │ +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_E_n_t_i_t_y_S_e_e_d_<_ _c_o_d_i_m_,_ _G_r_i_d_I_m_p_ _> │ │ │ │ -  The _E_n_t_i_t_y_S_e_e_d class provides the minimal information needed to restore │ │ │ │ - an _E_n_t_i_t_y using the grid. _M_o_r_e_._._. │ │ │ │ +class   _D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_r_i_d_I_m_p_ _> │ │ │ │ + An intersection with a leaf neighbor elementMesh entities of │ │ │ │ + codimension 0 ("elements") allow to visit all neighbors, where a │ │ │ │ +  neighbor is an entity of codimension 0 which has a common entity of │ │ │ │ + codimension 1 These neighbors are accessed via a _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r. │ │ │ │ + This allows the implement non-matching meshes. The number of neighbors │ │ │ │ + may be different from the number of an element! _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +class   _D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_<_ _G_r_i_d_I_m_p_ _> │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │   Include standard header files. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -The IdentityGridEntitySeed class. │ │ │ │ +The IdentityGridLeafIntersection and IdentityGridLevelIntersection classes. │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00755_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: identitygridentityseed.hh Source File │ │ │ +dune-grid: identitygridintersections.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,85 +74,435 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
identitygridentityseed.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_IDENTITY_GRID_ENTITY_SEED_HH
│ │ │ -
6#define DUNE_IDENTITY_GRID_ENTITY_SEED_HH
│ │ │ +
5#ifndef DUNE_IDENTITYGRID_INTERSECTIONS_HH
│ │ │ +
6#define DUNE_IDENTITYGRID_INTERSECTIONS_HH
│ │ │
7
│ │ │ -
14namespace Dune {
│ │ │ -
15
│ │ │ + │ │ │ + │ │ │ +
10
│ │ │ +
15namespace Dune {
│ │ │
16
│ │ │ -
22 template<int codim, class GridImp>
│ │ │ -
│ │ │ - │ │ │ -
24 {
│ │ │ -
25 protected:
│ │ │ -
26
│ │ │ -
27 // Entity type of the hostgrid
│ │ │ -
28 typedef typename GridImp::HostGridType::Traits::template Codim<codim>::Entity HostEntity;
│ │ │ -
29
│ │ │ -
30 // EntitySeed type of the hostgrid
│ │ │ -
31 typedef typename GridImp::HostGridType::Traits::template Codim<codim>::EntitySeed HostEntitySeed;
│ │ │ -
32
│ │ │ -
33 public:
│ │ │ +
17
│ │ │ +
18 // External forward declarations
│ │ │ +
19 template< class Grid >
│ │ │ +
20 struct HostGridAccess;
│ │ │ +
21
│ │ │ +
22
│ │ │ +
31 template<class GridImp>
│ │ │ +
│ │ │ + │ │ │ +
33 {
│ │ │
34
│ │ │ -
35 constexpr static int codimension = codim;
│ │ │ +
35 friend class IdentityGridLeafIntersectionIterator<GridImp>;
│ │ │
36
│ │ │ -
│ │ │ - │ │ │ -
41 {}
│ │ │ -
│ │ │ +
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
│ │ │ -
│ │ │ - │ │ │ -
50 hostEntitySeed_(hostEntity.seed())
│ │ │ -
51 {}
│ │ │ -
│ │ │ -
52
│ │ │ -
│ │ │ - │ │ │ -
57 {
│ │ │ -
58 return hostEntitySeed_;
│ │ │ -
59 }
│ │ │ +
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 {}
│ │ │
│ │ │ -
60
│ │ │ +
63
│ │ │
│ │ │ -
64 bool isValid() const
│ │ │ -
65 {
│ │ │ -
66 return hostEntitySeed_.isValid();
│ │ │ -
67 }
│ │ │ +
64 IdentityGridLeafIntersection(const GridImp* identityGrid,
│ │ │ +
65 HostLeafIntersection&& hostIntersection)
│ │ │ +
66 : identityGrid_(identityGrid)
│ │ │ +
67 , hostIntersection_(std::move(hostIntersection))
│ │ │ +
68 {}
│ │ │
│ │ │ -
68 private:
│ │ │
69
│ │ │ -
70 HostEntitySeed hostEntitySeed_;
│ │ │ -
71 };
│ │ │ +
│ │ │ +
70 bool equals(const IdentityGridLeafIntersection& other) const
│ │ │ +
71 {
│ │ │ +
72 return hostIntersection_ == other.hostIntersection_;
│ │ │ +
73 }
│ │ │
│ │ │ -
72
│ │ │ -
73} // namespace Dune
│ │ │
74
│ │ │ -
75#endif // #define DUNE_IDENTITY_GRID_ENTITY_SEED_HH
│ │ │ +
│ │ │ +
77 Entity inside() const {
│ │ │ +
78 return IdentityGridEntity<0,dim,GridImp>(identityGrid_,hostIntersection_.inside());
│ │ │ +
79 }
│ │ │ +
│ │ │ +
80
│ │ │ +
81
│ │ │ +
│ │ │ +
84 Entity outside() const {
│ │ │ +
85 return IdentityGridEntity<0,dim,GridImp>(identityGrid_,hostIntersection_.outside());
│ │ │ +
86 }
│ │ │ +
│ │ │ +
87
│ │ │ +
88
│ │ │ +
│ │ │ +
90 bool boundary () const {
│ │ │ +
91 return hostIntersection_.boundary();
│ │ │ +
92 }
│ │ │ +
│ │ │ +
93
│ │ │ +
│ │ │ + │ │ │ +
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() );
│ │ │ +
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 IdentityGridLeafIterator class.
│ │ │ +
The IdentityGridEntity class.
│ │ │ +
STL namespace.
│ │ │
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
│ │ │ +
provides access to host grid objects from GeometryGrid
Definition identitygrid.hh:37
│ │ │ +
The implementation of entities in a IdentityGrid.
Definition identitygridentity.hh:55
│ │ │ +
Definition identitygridintersectioniterator.hh:84
│ │ │ +
Iterator over all element neighborsMesh entities of codimension 0 ("elements") allow to visit all nei...
Definition identitygridintersectioniterator.hh:29
│ │ │ +
An intersection with a leaf neighbor elementMesh entities of codimension 0 ("elements") allow to visi...
Definition identitygridintersections.hh:33
│ │ │ +
Entity inside() const
Definition identitygridintersections.hh:77
│ │ │ +
IdentityGridLeafIntersection(const GridImp *identityGrid, HostLeafIntersection &&hostIntersection)
Definition identitygridintersections.hh:64
│ │ │ +
NormalVector centerUnitOuterNormal() const
Return unit outer normal (length == 1)
Definition identitygridintersections.hh:99
│ │ │ +
GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
Definition identitygridintersections.hh:51
│ │ │ +
Geometry geometry() const
Definition identitygridintersections.hh:142
│ │ │ +
Entity outside() const
Definition identitygridintersections.hh:84
│ │ │ +
LocalGeometry geometryInOutside() const
Definition identitygridintersections.hh:135
│ │ │ +
bool boundary() const
return true if intersection is with boundary.
Definition identitygridintersections.hh:90
│ │ │ +
GeometryType type() const
Geometry type of an intersection.
Definition identitygridintersections.hh:119
│ │ │ +
FieldVector< ctype, dimworld > NormalVector
Definition identitygridintersections.hh:53
│ │ │ +
LocalGeometry geometryInInside() const
Definition identitygridintersections.hh:128
│ │ │ +
bool conforming() const
Return true if this is a conforming intersection.
Definition identitygridintersections.hh:114
│ │ │ +
IdentityGridLeafIntersection(const GridImp *identityGrid, const HostLeafIntersection &hostIntersection)
Definition identitygridintersections.hh:58
│ │ │ +
size_t boundarySegmentIndex() const
return the boundary segment index
Definition identitygridintersections.hh:109
│ │ │ +
bool equals(const IdentityGridLeafIntersection &other) const
Definition identitygridintersections.hh:70
│ │ │ +
FieldVector< ctype, GridImp::dimensionworld > outerNormal(const FieldVector< ctype, GridImp::dimension-1 > &local) const
return outer normal
Definition identitygridintersections.hh:161
│ │ │ +
int indexInOutside() const
local number of codim 1 entity in neighbor where intersection is contained
Definition identitygridintersections.hh:155
│ │ │ +
FieldVector< ctype, GridImp::dimensionworld > integrationOuterNormal(const FieldVector< ctype, GridImp::dimension-1 > &local) const
return outer normal multiplied by the integration element
Definition identitygridintersections.hh:166
│ │ │ +
bool neighbor() const
return true if across the edge an neighbor on this level exists
Definition identitygridintersections.hh:104
│ │ │ +
FieldVector< ctype, GridImp::dimensionworld > unitOuterNormal(const FieldVector< ctype, GridImp::dimension-1 > &local) const
return unit outer normal
Definition identitygridintersections.hh:171
│ │ │ +
int indexInInside() const
local number of codim 1 entity in self where intersection is contained in
Definition identitygridintersections.hh:149
│ │ │ +
GridImp::template Codim< 1 >::Geometry Geometry
Definition identitygridintersections.hh:50
│ │ │ +
GridImp::template Codim< 0 >::Entity Entity
Definition identitygridintersections.hh:52
│ │ │ +
Definition identitygridintersections.hh:192
│ │ │ +
Geometry geometry() const
Definition identitygridintersections.hh:302
│ │ │ +
GridImp::template Codim< 0 >::Entity Entity
Definition identitygridintersections.hh:211
│ │ │ +
IdentityGridLevelIntersection(const GridImp *identityGrid, const HostLevelIntersection &hostIntersection)
Definition identitygridintersections.hh:217
│ │ │ +
GridImp::template Codim< 1 >::Geometry Geometry
Definition identitygridintersections.hh:209
│ │ │ +
bool equals(const IdentityGridLevelIntersection &other) const
Definition identitygridintersections.hh:229
│ │ │ +
bool neighbor() const
return true if across the edge an neighbor on this level exists
Definition identitygridintersections.hh:264
│ │ │ +
NormalVector centerUnitOuterNormal() const
Return unit outer normal (length == 1)
Definition identitygridintersections.hh:259
│ │ │ +
bool conforming() const
Return true if this is a conforming intersection.
Definition identitygridintersections.hh:274
│ │ │ +
int indexInInside() const
local number of codim 1 entity in self where intersection is contained in
Definition identitygridintersections.hh:309
│ │ │ +
FieldVector< ctype, dimworld > outerNormal(const FieldVector< ctype, dim-1 > &local) const
return outer normal
Definition identitygridintersections.hh:321
│ │ │ +
GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
Definition identitygridintersections.hh:210
│ │ │ +
FieldVector< ctype, dimworld > NormalVector
Definition identitygridintersections.hh:212
│ │ │ +
bool boundary() const
return true if intersection is with boundary.
Definition identitygridintersections.hh:250
│ │ │ +
FieldVector< ctype, dimworld > integrationOuterNormal(const FieldVector< ctype, dim-1 > &local) const
return outer normal multiplied by the integration element
Definition identitygridintersections.hh:326
│ │ │ +
LocalGeometry geometryInOutside() const
Definition identitygridintersections.hh:295
│ │ │ +
LocalGeometry geometryInInside() const
Definition identitygridintersections.hh:288
│ │ │ +
int indexInOutside() const
local number of codim 1 entity in neighbor where intersection is contained
Definition identitygridintersections.hh:315
│ │ │ +
FieldVector< ctype, dimworld > unitOuterNormal(const FieldVector< ctype, dim-1 > &local) const
return unit outer normal
Definition identitygridintersections.hh:331
│ │ │ +
size_t boundarySegmentIndex() const
return the boundary segment index
Definition identitygridintersections.hh:269
│ │ │ +
Entity outside() const
Definition identitygridintersections.hh:243
│ │ │ +
Entity inside() const
Definition identitygridintersections.hh:236
│ │ │ +
GeometryType type() const
Geometry type of an intersection.
Definition identitygridintersections.hh:279
│ │ │ +
IdentityGridLevelIntersection(const GridImp *identityGrid, HostLevelIntersection &&hostIntersection)
Definition identitygridintersections.hh:223
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,96 +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 │ │ │ │ -identitygridentityseed.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_IDENTITY_GRID_ENTITY_SEED_HH │ │ │ │ -6#define DUNE_IDENTITY_GRID_ENTITY_SEED_HH │ │ │ │ +5#ifndef DUNE_IDENTITYGRID_INTERSECTIONS_HH │ │ │ │ +6#define DUNE_IDENTITYGRID_INTERSECTIONS_HH │ │ │ │ 7 │ │ │ │ -14namespace _D_u_n_e { │ │ │ │ -15 │ │ │ │ +8#include "_i_d_e_n_t_i_t_y_g_r_i_d_l_e_a_f_i_t_e_r_a_t_o_r_._h_h" │ │ │ │ +9#include <_d_u_n_e_/_g_r_i_d_/_i_d_e_n_t_i_t_y_g_r_i_d_/_i_d_e_n_t_i_t_y_g_r_i_d_e_n_t_i_t_y_._h_h> │ │ │ │ +10 │ │ │ │ +15namespace _D_u_n_e { │ │ │ │ 16 │ │ │ │ -22 template │ │ │ │ -_2_3 class _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d │ │ │ │ -24 { │ │ │ │ -25 protected: │ │ │ │ -26 │ │ │ │ -27 // Entity type of the hostgrid │ │ │ │ -_2_8 typedef typename GridImp::HostGridType::Traits::template Codim:: │ │ │ │ -Entity _H_o_s_t_E_n_t_i_t_y; │ │ │ │ -29 │ │ │ │ -30 // EntitySeed type of the hostgrid │ │ │ │ -_3_1 typedef typename GridImp::HostGridType::Traits::template Codim:: │ │ │ │ -EntitySeed _H_o_s_t_E_n_t_i_t_y_S_e_e_d; │ │ │ │ -32 │ │ │ │ -33 public: │ │ │ │ +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 │ │ │ │ -_3_5 constexpr static int _c_o_d_i_m_e_n_s_i_o_n = codim; │ │ │ │ +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 │ │ │ │ -_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 {} │ │ │ │ +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 │ │ │ │ -_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: │ │ │ │ +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 │ │ │ │ -70 _H_o_s_t_E_n_t_i_t_y_S_e_e_d hostEntitySeed_; │ │ │ │ -71 }; │ │ │ │ -72 │ │ │ │ -73} // namespace Dune │ │ │ │ +_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 │ │ │ │ -75#endif // #define DUNE_IDENTITY_GRID_ENTITY_SEED_HH │ │ │ │ +_7_7 _E_n_t_i_t_y _i_n_s_i_d_e() const { │ │ │ │ +78 return _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_0_,_d_i_m_,_G_r_i_d_I_m_p_> │ │ │ │ +(identityGrid_,hostIntersection_.inside()); │ │ │ │ +79 } │ │ │ │ +80 │ │ │ │ +81 │ │ │ │ +_8_4 _E_n_t_i_t_y _o_u_t_s_i_d_e() const { │ │ │ │ +85 return _I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_<_0_,_d_i_m_,_G_r_i_d_I_m_p_> │ │ │ │ +(identityGrid_,hostIntersection_.outside()); │ │ │ │ +86 } │ │ │ │ +87 │ │ │ │ +88 │ │ │ │ +_9_0 bool _b_o_u_n_d_a_r_y () const { │ │ │ │ +91 return hostIntersection_.boundary(); │ │ │ │ +92 } │ │ │ │ +93 │ │ │ │ +_9_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() ); │ │ │ │ +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_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. │ │ │ │ +_s_t_d │ │ │ │ +STL namespace. │ │ │ │ _D_u_n_e │ │ │ │ Include standard header files. │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d │ │ │ │ -The EntitySeed class provides the minimal information needed to restore an │ │ │ │ -Entity using the grid. │ │ │ │ -DDeeffiinniittiioonn identitygridentityseed.hh:24 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d_:_:_c_o_d_i_m_e_n_s_i_o_n │ │ │ │ -static constexpr int codimension │ │ │ │ -DDeeffiinniittiioonn identitygridentityseed.hh:35 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d │ │ │ │ -IdentityGridEntitySeed() │ │ │ │ -Construct an empty (i.e. isValid() == false) seed. │ │ │ │ -DDeeffiinniittiioonn identitygridentityseed.hh:40 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d_:_:_i_s_V_a_l_i_d │ │ │ │ -bool isValid() const │ │ │ │ -Check whether it is safe to create an Entity from this Seed. │ │ │ │ -DDeeffiinniittiioonn identitygridentityseed.hh:64 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d_:_:_H_o_s_t_E_n_t_i_t_y │ │ │ │ -GridImp::HostGridType::Traits::template Codim< codim >::Entity HostEntity │ │ │ │ -DDeeffiinniittiioonn identitygridentityseed.hh:28 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d │ │ │ │ -IdentityGridEntitySeed(const HostEntity &hostEntity) │ │ │ │ -Create EntitySeed from hostgrid Entity. │ │ │ │ -DDeeffiinniittiioonn identitygridentityseed.hh:49 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d_:_:_h_o_s_t_E_n_t_i_t_y_S_e_e_d │ │ │ │ -const HostEntitySeed & hostEntitySeed() const │ │ │ │ -Get stored HostEntitySeed. │ │ │ │ -DDeeffiinniittiioonn identitygridentityseed.hh:56 │ │ │ │ -_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y_S_e_e_d_:_:_H_o_s_t_E_n_t_i_t_y_S_e_e_d │ │ │ │ -GridImp::HostGridType::Traits::template Codim< codim >::EntitySeed │ │ │ │ -HostEntitySeed │ │ │ │ -DDeeffiinniittiioonn identitygridentityseed.hh:31 │ │ │ │ +_D_u_n_e_:_:_H_o_s_t_G_r_i_d_A_c_c_e_s_s │ │ │ │ +provides access to host grid objects from GeometryGrid │ │ │ │ +DDeeffiinniittiioonn identitygrid.hh:37 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_E_n_t_i_t_y │ │ │ │ +The implementation of entities in a IdentityGrid. │ │ │ │ +DDeeffiinniittiioonn identitygridentity.hh:55 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ +DDeeffiinniittiioonn identitygridintersectioniterator.hh:84 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ +Iterator over all element neighborsMesh entities of codimension 0 ("elements") │ │ │ │ +allow to visit all nei... │ │ │ │ +DDeeffiinniittiioonn identitygridintersectioniterator.hh:29 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ +An intersection with a leaf neighbor elementMesh entities of codimension 0 │ │ │ │ +("elements") allow to visi... │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:33 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_i_n_s_i_d_e │ │ │ │ +Entity inside() const │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:77 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ +IdentityGridLeafIntersection(const GridImp *identityGrid, HostLeafIntersection │ │ │ │ +&&hostIntersection) │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:64 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_c_e_n_t_e_r_U_n_i_t_O_u_t_e_r_N_o_r_m_a_l │ │ │ │ +NormalVector centerUnitOuterNormal() const │ │ │ │ +Return unit outer normal (length == 1) │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:99 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y │ │ │ │ +GridImp::template Codim< 1 >::LocalGeometry LocalGeometry │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:51 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_g_e_o_m_e_t_r_y │ │ │ │ +Geometry geometry() const │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:142 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_o_u_t_s_i_d_e │ │ │ │ +Entity outside() const │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:84 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_g_e_o_m_e_t_r_y_I_n_O_u_t_s_i_d_e │ │ │ │ +LocalGeometry geometryInOutside() const │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:135 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_b_o_u_n_d_a_r_y │ │ │ │ +bool boundary() const │ │ │ │ +return true if intersection is with boundary. │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:90 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_t_y_p_e │ │ │ │ +GeometryType type() const │ │ │ │ +Geometry type of an intersection. │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:119 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_N_o_r_m_a_l_V_e_c_t_o_r │ │ │ │ +FieldVector< ctype, dimworld > NormalVector │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:53 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_g_e_o_m_e_t_r_y_I_n_I_n_s_i_d_e │ │ │ │ +LocalGeometry geometryInInside() const │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:128 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_c_o_n_f_o_r_m_i_n_g │ │ │ │ +bool conforming() const │ │ │ │ +Return true if this is a conforming intersection. │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:114 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ +IdentityGridLeafIntersection(const GridImp *identityGrid, const │ │ │ │ +HostLeafIntersection &hostIntersection) │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:58 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_b_o_u_n_d_a_r_y_S_e_g_m_e_n_t_I_n_d_e_x │ │ │ │ +size_t boundarySegmentIndex() const │ │ │ │ +return the boundary segment index │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:109 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_e_q_u_a_l_s │ │ │ │ +bool equals(const IdentityGridLeafIntersection &other) const │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:70 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_o_u_t_e_r_N_o_r_m_a_l │ │ │ │ +FieldVector< ctype, GridImp::dimensionworld > outerNormal(const FieldVector< │ │ │ │ +ctype, GridImp::dimension-1 > &local) const │ │ │ │ +return outer normal │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:161 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_i_n_d_e_x_I_n_O_u_t_s_i_d_e │ │ │ │ +int indexInOutside() const │ │ │ │ +local number of codim 1 entity in neighbor where intersection is contained │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:155 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_i_n_t_e_g_r_a_t_i_o_n_O_u_t_e_r_N_o_r_m_a_l │ │ │ │ +FieldVector< ctype, GridImp::dimensionworld > integrationOuterNormal(const │ │ │ │ +FieldVector< ctype, GridImp::dimension-1 > &local) const │ │ │ │ +return outer normal multiplied by the integration element │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:166 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_n_e_i_g_h_b_o_r │ │ │ │ +bool neighbor() const │ │ │ │ +return true if across the edge an neighbor on this level exists │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:104 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_u_n_i_t_O_u_t_e_r_N_o_r_m_a_l │ │ │ │ +FieldVector< ctype, GridImp::dimensionworld > unitOuterNormal(const │ │ │ │ +FieldVector< ctype, GridImp::dimension-1 > &local) const │ │ │ │ +return unit outer normal │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:171 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_i_n_d_e_x_I_n_I_n_s_i_d_e │ │ │ │ +int indexInInside() const │ │ │ │ +local number of codim 1 entity in self where intersection is contained in │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:149 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_G_e_o_m_e_t_r_y │ │ │ │ +GridImp::template Codim< 1 >::Geometry Geometry │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:50 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_a_f_I_n_t_e_r_s_e_c_t_i_o_n_:_:_E_n_t_i_t_y │ │ │ │ +GridImp::template Codim< 0 >::Entity Entity │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:52 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:192 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_g_e_o_m_e_t_r_y │ │ │ │ +Geometry geometry() const │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:302 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_E_n_t_i_t_y │ │ │ │ +GridImp::template Codim< 0 >::Entity Entity │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:211 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ +IdentityGridLevelIntersection(const GridImp *identityGrid, const │ │ │ │ +HostLevelIntersection &hostIntersection) │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:217 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_G_e_o_m_e_t_r_y │ │ │ │ +GridImp::template Codim< 1 >::Geometry Geometry │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:209 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_e_q_u_a_l_s │ │ │ │ +bool equals(const IdentityGridLevelIntersection &other) const │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:229 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_n_e_i_g_h_b_o_r │ │ │ │ +bool neighbor() const │ │ │ │ +return true if across the edge an neighbor on this level exists │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:264 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_c_e_n_t_e_r_U_n_i_t_O_u_t_e_r_N_o_r_m_a_l │ │ │ │ +NormalVector centerUnitOuterNormal() const │ │ │ │ +Return unit outer normal (length == 1) │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:259 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_c_o_n_f_o_r_m_i_n_g │ │ │ │ +bool conforming() const │ │ │ │ +Return true if this is a conforming intersection. │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:274 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_i_n_d_e_x_I_n_I_n_s_i_d_e │ │ │ │ +int indexInInside() const │ │ │ │ +local number of codim 1 entity in self where intersection is contained in │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:309 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_o_u_t_e_r_N_o_r_m_a_l │ │ │ │ +FieldVector< ctype, dimworld > outerNormal(const FieldVector< ctype, dim-1 > │ │ │ │ +&local) const │ │ │ │ +return outer normal │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:321 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_L_o_c_a_l_G_e_o_m_e_t_r_y │ │ │ │ +GridImp::template Codim< 1 >::LocalGeometry LocalGeometry │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:210 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_N_o_r_m_a_l_V_e_c_t_o_r │ │ │ │ +FieldVector< ctype, dimworld > NormalVector │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:212 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_b_o_u_n_d_a_r_y │ │ │ │ +bool boundary() const │ │ │ │ +return true if intersection is with boundary. │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:250 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_i_n_t_e_g_r_a_t_i_o_n_O_u_t_e_r_N_o_r_m_a_l │ │ │ │ +FieldVector< ctype, dimworld > integrationOuterNormal(const FieldVector< ctype, │ │ │ │ +dim-1 > &local) const │ │ │ │ +return outer normal multiplied by the integration element │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:326 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_g_e_o_m_e_t_r_y_I_n_O_u_t_s_i_d_e │ │ │ │ +LocalGeometry geometryInOutside() const │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:295 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_g_e_o_m_e_t_r_y_I_n_I_n_s_i_d_e │ │ │ │ +LocalGeometry geometryInInside() const │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:288 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_i_n_d_e_x_I_n_O_u_t_s_i_d_e │ │ │ │ +int indexInOutside() const │ │ │ │ +local number of codim 1 entity in neighbor where intersection is contained │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:315 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_u_n_i_t_O_u_t_e_r_N_o_r_m_a_l │ │ │ │ +FieldVector< ctype, dimworld > unitOuterNormal(const FieldVector< ctype, dim- │ │ │ │ +1 > &local) const │ │ │ │ +return unit outer normal │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:331 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_b_o_u_n_d_a_r_y_S_e_g_m_e_n_t_I_n_d_e_x │ │ │ │ +size_t boundarySegmentIndex() const │ │ │ │ +return the boundary segment index │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:269 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_o_u_t_s_i_d_e │ │ │ │ +Entity outside() const │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:243 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_i_n_s_i_d_e │ │ │ │ +Entity inside() const │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:236 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_t_y_p_e │ │ │ │ +GeometryType type() const │ │ │ │ +Geometry type of an intersection. │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:279 │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n_:_:_I_d_e_n_t_i_t_y_G_r_i_d_L_e_v_e_l_I_n_t_e_r_s_e_c_t_i_o_n │ │ │ │ +IdentityGridLevelIntersection(const GridImp *identityGrid, │ │ │ │ +HostLevelIntersection &&hostIntersection) │ │ │ │ +DDeeffiinniittiioonn identitygridintersections.hh:223 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00761.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: vtuwriter.hh File Reference │ │ │ +dune-grid: vtk.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,47 +65,33 @@ │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
│ │ │ -Classes | │ │ │ -Namespaces
│ │ │ -
vtuwriter.hh File Reference
│ │ │ +
vtk.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 <dune/grid/io/file/vtk/dataarraywriter.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.

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

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

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 │ │ │ │ - * _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> │ │ │ │ +vtk.hh File Reference │ │ │ │ +Convenience header which includes all available VTK writers. _M_o_r_e_._._. │ │ │ │ +#include "_v_t_k_/_b_o_u_n_d_a_r_y_w_r_i_t_e_r_._h_h" │ │ │ │ +#include "_v_t_k_/_s_u_b_s_a_m_p_l_i_n_g_v_t_k_w_r_i_t_e_r_._h_h" │ │ │ │ +#include "_v_t_k_/_v_t_k_s_e_q_u_e_n_c_e_w_r_i_t_e_r_._h_h" │ │ │ │ +#include "_v_t_k_/_v_t_k_w_r_i_t_e_r_._h_h" │ │ │ │ +#include "_v_t_k_/_v_o_l_u_m_e_w_r_i_t_e_r_._h_h" │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ -class   _D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r │ │ │ │ -  Dump a .vtu/.vtp files contents to a stream. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -NNaammeessppaacceess │ │ │ │ -namespace   _D_u_n_e │ │ │ │ -  Include standard header files. │ │ │ │ -  │ │ │ │ -namespace   _D_u_n_e_:_:_V_T_K │ │ │ │ -  │ │ │ │ +********** 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/a00761_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: vtuwriter.hh Source File │ │ │ +dune-grid: vtk.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,308 +70,41 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
vtuwriter.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
│ │ │ -
6#ifndef DUNE_GRID_IO_FILE_VTK_VTUWRITER_HH
│ │ │ -
7#define DUNE_GRID_IO_FILE_VTK_VTUWRITER_HH
│ │ │ +
6#ifndef DUNE_GRID_IO_FILE_VTK_HH
│ │ │ +
7#define DUNE_GRID_IO_FILE_VTK_HH
│ │ │
8
│ │ │ -
9#include <ostream>
│ │ │ -
10#include <string>
│ │ │ -
11
│ │ │ -
12#include <dune/common/exceptions.hh>
│ │ │ -
13#include <dune/common/indent.hh>
│ │ │ -
14
│ │ │ - │ │ │ - │ │ │ -
17
│ │ │ -
18namespace Dune {
│ │ │ -
19
│ │ │ -
22
│ │ │ -
23 namespace VTK {
│ │ │ -
24
│ │ │ -
26
│ │ │ -
│ │ │ -
98 class VTUWriter {
│ │ │ -
99 public:
│ │ │ -
100 std::ostream& stream;
│ │ │ - │ │ │ -
102
│ │ │ -
103 private:
│ │ │ - │ │ │ -
105 Indent indent;
│ │ │ -
106
│ │ │ -
107 std::string fileType;
│ │ │ -
108 std::string cellName;
│ │ │ -
109
│ │ │ -
110 bool doAppended;
│ │ │ -
111
│ │ │ -
112 public:
│ │ │ -
114
│ │ │ -
│ │ │ -
122 inline VTUWriter(std::ostream& stream_, OutputType outputType,
│ │ │ -
123 FileType fileType_)
│ │ │ -
124 : stream(stream_), factory(outputType, stream)
│ │ │ -
125 {
│ │ │ -
126 switch(fileType_) {
│ │ │ -
127 case polyData :
│ │ │ -
128 fileType = "PolyData";
│ │ │ -
129 cellName = "Lines";
│ │ │ -
130 break;
│ │ │ -
131 case unstructuredGrid :
│ │ │ -
132 fileType = "UnstructuredGrid";
│ │ │ -
133 cellName = "Cells";
│ │ │ -
134 break;
│ │ │ -
135 default :
│ │ │ -
136 DUNE_THROW(IOError, "VTUWriter: Unknown fileType: " << fileType_);
│ │ │ -
137 }
│ │ │ -
138 const std::string& byteOrder = getEndiannessString();
│ │ │ -
139
│ │ │ -
140 stream << indent << "<?xml version=\"1.0\"?>\n";
│ │ │ -
141 stream << indent << "<VTKFile"
│ │ │ -
142 << " type=\"" << fileType << "\""
│ │ │ -
143 << " version=\"0.1\""
│ │ │ -
144 << " byte_order=\"" << byteOrder << "\">\n";
│ │ │ -
145 ++indent;
│ │ │ -
146 }
│ │ │ -
│ │ │ -
147
│ │ │ -
│ │ │ -
149 inline ~VTUWriter() {
│ │ │ -
150 --indent;
│ │ │ -
151 stream << indent << "</VTKFile>\n"
│ │ │ -
152 << std::flush;
│ │ │ -
153 }
│ │ │ -
│ │ │ -
154
│ │ │ -
156
│ │ │ -
│ │ │ -
167 inline void beginPointData(const std::string& scalars = "",
│ │ │ -
168 const std::string& vectors = "") {
│ │ │ -
169 switch(phase) {
│ │ │ -
170 case main :
│ │ │ -
171 stream << indent << "<PointData";
│ │ │ -
172 if(scalars != "") stream << " Scalars=\"" << scalars << "\"";
│ │ │ -
173 if(vectors != "") stream << " Vectors=\"" << vectors << "\"";
│ │ │ -
174 stream << ">\n";
│ │ │ -
175 ++indent;
│ │ │ -
176 break;
│ │ │ -
177 case appended :
│ │ │ -
178 break;
│ │ │ -
179 }
│ │ │ -
180 }
│ │ │ -
│ │ │ -
│ │ │ -
182 inline void endPointData() {
│ │ │ -
183 switch(phase) {
│ │ │ -
184 case main :
│ │ │ -
185 --indent;
│ │ │ -
186 stream << indent << "</PointData>\n";
│ │ │ -
187 break;
│ │ │ -
188 case appended :
│ │ │ -
189 break;
│ │ │ -
190 }
│ │ │ -
191 }
│ │ │ -
│ │ │ -
192
│ │ │ -
194
│ │ │ -
│ │ │ -
205 inline void beginCellData(const std::string& scalars = "",
│ │ │ -
206 const std::string& vectors = "") {
│ │ │ -
207 switch(phase) {
│ │ │ -
208 case main :
│ │ │ -
209 stream << indent << "<CellData";
│ │ │ -
210 if(scalars != "") stream << " Scalars=\"" << scalars << "\"";
│ │ │ -
211 if(vectors != "") stream << " Vectors=\"" << vectors << "\"";
│ │ │ -
212 stream << ">\n";
│ │ │ -
213 ++indent;
│ │ │ -
214 break;
│ │ │ -
215 case appended :
│ │ │ -
216 break;
│ │ │ -
217 }
│ │ │ -
218 }
│ │ │ -
│ │ │ -
│ │ │ -
220 inline void endCellData() {
│ │ │ -
221 switch(phase) {
│ │ │ -
222 case main :
│ │ │ -
223 --indent;
│ │ │ -
224 stream << indent << "</CellData>\n";
│ │ │ -
225 break;
│ │ │ -
226 case appended :
│ │ │ -
227 break;
│ │ │ -
228 }
│ │ │ -
229 }
│ │ │ -
│ │ │ -
230
│ │ │ -
232
│ │ │ -
│ │ │ -
238 inline void beginPoints() {
│ │ │ -
239 switch(phase) {
│ │ │ -
240 case main :
│ │ │ -
241 stream << indent << "<Points>\n";
│ │ │ -
242 ++indent;
│ │ │ -
243 break;
│ │ │ -
244 case appended :
│ │ │ -
245 break;
│ │ │ -
246 }
│ │ │ -
247 }
│ │ │ -
│ │ │ -
│ │ │ -
249 inline void endPoints() {
│ │ │ -
250 switch(phase) {
│ │ │ -
251 case main :
│ │ │ -
252 --indent;
│ │ │ -
253 stream << indent << "</Points>\n";
│ │ │ -
254 break;
│ │ │ -
255 case appended :
│ │ │ -
256 break;
│ │ │ -
257 }
│ │ │ -
258 }
│ │ │ -
│ │ │ -
259
│ │ │ -
261
│ │ │ -
│ │ │ -
274 inline void beginCells() {
│ │ │ -
275 switch(phase) {
│ │ │ -
276 case main :
│ │ │ -
277 stream << indent << "<" << cellName << ">\n";
│ │ │ -
278 ++indent;
│ │ │ -
279 break;
│ │ │ -
280 case appended :
│ │ │ -
281 break;
│ │ │ -
282 }
│ │ │ -
283 }
│ │ │ -
│ │ │ -
│ │ │ -
285 inline void endCells() {
│ │ │ -
286 switch(phase) {
│ │ │ -
287 case main :
│ │ │ -
288 --indent;
│ │ │ -
289 stream << indent << "</" << cellName << ">\n";
│ │ │ -
290 break;
│ │ │ -
291 case appended :
│ │ │ -
292 break;
│ │ │ -
293 }
│ │ │ -
294 }
│ │ │ -
│ │ │ -
295
│ │ │ -
297
│ │ │ -
│ │ │ -
310 inline void beginMain(unsigned ncells, unsigned npoints) {
│ │ │ -
311 stream << indent << "<" << fileType << ">\n";
│ │ │ -
312 ++indent;
│ │ │ -
313 stream << indent << "<Piece"
│ │ │ -
314 << " NumberOf" << cellName << "=\"" << ncells << "\""
│ │ │ -
315 << " NumberOfPoints=\"" << npoints << "\">\n";
│ │ │ -
316 ++indent;
│ │ │ -
317 phase = main;
│ │ │ -
318 }
│ │ │ -
│ │ │ -
│ │ │ -
320 inline void endMain() {
│ │ │ -
321 --indent;
│ │ │ -
322 stream << indent << "</Piece>\n";
│ │ │ -
323 --indent;
│ │ │ -
324 stream << indent << "</" << fileType << ">\n";
│ │ │ -
325 }
│ │ │ -
│ │ │ -
326
│ │ │ -
328
│ │ │ -
│ │ │ -
345 inline bool beginAppended() {
│ │ │ -
346 doAppended = factory.beginAppended();
│ │ │ -
347 if(doAppended) {
│ │ │ -
348 const std::string& encoding = factory.appendedEncoding();
│ │ │ -
349 stream << indent << "<AppendedData"
│ │ │ -
350 << " encoding=\"" << encoding << "\">\n";
│ │ │ -
351 ++indent;
│ │ │ -
352 // mark begin of data
│ │ │ -
353 stream << indent << "_";
│ │ │ -
354 }
│ │ │ -
355 phase = appended;
│ │ │ -
356 return doAppended;
│ │ │ -
357 }
│ │ │ -
│ │ │ -
│ │ │ -
359 inline void endAppended() {
│ │ │ -
360 if(doAppended) {
│ │ │ -
361 stream << "\n";
│ │ │ -
362 --indent;
│ │ │ -
363 stream << indent << "</AppendedData>\n";
│ │ │ -
364 }
│ │ │ -
365 }
│ │ │ -
│ │ │ -
366
│ │ │ -
368
│ │ │ -
│ │ │ -
380 DataArrayWriter* makeArrayWriter(const std::string& name,
│ │ │ -
381 unsigned ncomps, unsigned nitems,
│ │ │ -
382 Precision prec) {
│ │ │ -
383 return factory.make(name, ncomps, nitems, indent, prec);
│ │ │ -
384 }
│ │ │ -
│ │ │ -
385 };
│ │ │ -
│ │ │ -
386
│ │ │ -
387 } // namespace VTK
│ │ │ -
388
│ │ │ -
390
│ │ │ -
391} // namespace Dune
│ │ │ -
392
│ │ │ -
393#endif // DUNE_GRID_IO_FILE_VTK_VTUWRITER_HH
│ │ │ -
Data array writers for the VTKWriter.
│ │ │ -
Common stuff for the VTKWriter.
│ │ │ -
Include standard header files.
Definition agrid.hh:60
│ │ │ -
Precision
which precision to use when writing out data to vtk files
Definition common.hh:271
│ │ │ -
OutputType
How the bulk data should be stored in the file.
Definition common.hh:43
│ │ │ -
FileType
which type of VTK file to write
Definition common.hh:252
│ │ │ -
@ polyData
for .vtp files (PolyData)
Definition common.hh:254
│ │ │ -
@ unstructuredGrid
for .vtu files (UnstructuredGrid)
Definition common.hh:256
│ │ │ -
std::string getEndiannessString()
determine endianness of this C++ implementation
Definition common.hh:232
│ │ │ -
base class for data array writers
Definition dataarraywriter.hh:56
│ │ │ -
a factory for DataArrayWriters
Definition dataarraywriter.hh:462
│ │ │ -
bool beginAppended()
signal start of the appended section
Definition dataarraywriter.hh:497
│ │ │ -
DataArrayWriter * make(const std::string &name, unsigned ncomps, unsigned nitems, const Indent &indent, Precision prec)
create a DataArrayWriter
Definition dataarraywriter.hh:541
│ │ │ -
const std::string & appendedEncoding() const
query encoding string for appended data
Definition dataarraywriter.hh:510
│ │ │ -
Dump a .vtu/.vtp files contents to a stream.
Definition vtuwriter.hh:98
│ │ │ -
DataArrayWriter * makeArrayWriter(const std::string &name, unsigned ncomps, unsigned nitems, Precision prec)
acquire a DataArrayWriter
Definition vtuwriter.hh:380
│ │ │ -
bool beginAppended()
start the appended data section
Definition vtuwriter.hh:345
│ │ │ -
void endAppended()
finish the appended data section
Definition vtuwriter.hh:359
│ │ │ -
VTUWriter(std::ostream &stream_, OutputType outputType, FileType fileType_)
create a VTUWriter object
Definition vtuwriter.hh:122
│ │ │ -
std::ostream & stream
Definition vtuwriter.hh:100
│ │ │ -
void endCellData()
finish CellData section
Definition vtuwriter.hh:220
│ │ │ -
void beginMain(unsigned ncells, unsigned npoints)
start the main PolyData/UnstructuredGrid section
Definition vtuwriter.hh:310
│ │ │ -
void beginCells()
start section for the grid cells/PolyData lines
Definition vtuwriter.hh:274
│ │ │ -
void endPointData()
finish PointData section
Definition vtuwriter.hh:182
│ │ │ -
Phase
Definition vtuwriter.hh:101
│ │ │ -
@ appended
Definition vtuwriter.hh:101
│ │ │ -
@ main
Definition vtuwriter.hh:101
│ │ │ -
void beginCellData(const std::string &scalars="", const std::string &vectors="")
start CellData section
Definition vtuwriter.hh:205
│ │ │ -
void beginPointData(const std::string &scalars="", const std::string &vectors="")
start PointData section
Definition vtuwriter.hh:167
│ │ │ -
void endPoints()
finish section for the point coordinates
Definition vtuwriter.hh:249
│ │ │ -
~VTUWriter()
write footer
Definition vtuwriter.hh:149
│ │ │ -
void endCells()
start section for the grid cells/PolyData lines
Definition vtuwriter.hh:285
│ │ │ -
void beginPoints()
start section for the point coordinates
Definition vtuwriter.hh:238
│ │ │ -
void endMain()
finish the main PolyData/UnstructuredGrid section
Definition vtuwriter.hh:320
│ │ │ -
enum Dune::VTK::VTUWriter::Phase phase
│ │ │ +
13#include "vtk/boundarywriter.hh"
│ │ │ + │ │ │ + │ │ │ +
16#include "vtk/vtkwriter.hh"
│ │ │ +
17#include "vtk/volumewriter.hh"
│ │ │ +
18
│ │ │ +
19#endif // DUNE_GRID_IO_FILE_VTK_HH
│ │ │ + │ │ │ +
Provides subsampled file i/o for the visualization toolkit.
│ │ │ +
Provides file i/o for the visualization toolkit.
│ │ │ + │ │ │ + │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -2,363 +2,34 @@ │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_r_i_d │ │ │ │ * _i_o │ │ │ │ * _f_i_l_e │ │ │ │ - * _v_t_k │ │ │ │ -vtuwriter.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 │ │ │ │ -6#ifndef DUNE_GRID_IO_FILE_VTK_VTUWRITER_HH │ │ │ │ -7#define DUNE_GRID_IO_FILE_VTK_VTUWRITER_HH │ │ │ │ +6#ifndef DUNE_GRID_IO_FILE_VTK_HH │ │ │ │ +7#define DUNE_GRID_IO_FILE_VTK_HH │ │ │ │ 8 │ │ │ │ -9#include │ │ │ │ -10#include │ │ │ │ -11 │ │ │ │ -12#include │ │ │ │ -13#include │ │ │ │ -14 │ │ │ │ -15#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_m_m_o_n_._h_h> │ │ │ │ -16#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_d_a_t_a_a_r_r_a_y_w_r_i_t_e_r_._h_h> │ │ │ │ -17 │ │ │ │ -18namespace _D_u_n_e { │ │ │ │ -19 │ │ │ │ -22 │ │ │ │ -23 namespace VTK { │ │ │ │ -24 │ │ │ │ -26 │ │ │ │ -_9_8 class _V_T_U_W_r_i_t_e_r { │ │ │ │ -99 public: │ │ │ │ -_1_0_0 std::ostream& _s_t_r_e_a_m; │ │ │ │ -_1_0_1 enum _P_h_a_s_e { _m_a_i_n, _a_p_p_e_n_d_e_d } _p_h_a_s_e; │ │ │ │ -102 │ │ │ │ -103 private: │ │ │ │ -104 _D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_F_a_c_t_o_r_y factory; │ │ │ │ -105 Indent indent; │ │ │ │ -106 │ │ │ │ -107 std::string fileType; │ │ │ │ -108 std::string cellName; │ │ │ │ -109 │ │ │ │ -110 bool doAppended; │ │ │ │ -111 │ │ │ │ -112 public: │ │ │ │ -114 │ │ │ │ -_1_2_2 inline _V_T_U_W_r_i_t_e_r(std::ostream& stream_, _O_u_t_p_u_t_T_y_p_e outputType, │ │ │ │ -123 _F_i_l_e_T_y_p_e fileType_) │ │ │ │ -124 : _s_t_r_e_a_m(stream_), factory(outputType, _s_t_r_e_a_m) │ │ │ │ -125 { │ │ │ │ -126 switch(fileType_) { │ │ │ │ -127 case _p_o_l_y_D_a_t_a : │ │ │ │ -128 fileType = "PolyData"; │ │ │ │ -129 cellName = "Lines"; │ │ │ │ -130 break; │ │ │ │ -131 case _u_n_s_t_r_u_c_t_u_r_e_d_G_r_i_d : │ │ │ │ -132 fileType = "UnstructuredGrid"; │ │ │ │ -133 cellName = "Cells"; │ │ │ │ -134 break; │ │ │ │ -135 default : │ │ │ │ -136 DUNE_THROW(IOError, "VTUWriter: Unknown fileType: " << fileType_); │ │ │ │ -137 } │ │ │ │ -138 const std::string& byteOrder = _g_e_t_E_n_d_i_a_n_n_e_s_s_S_t_r_i_n_g(); │ │ │ │ -139 │ │ │ │ -140 _s_t_r_e_a_m << indent << "\n"; │ │ │ │ -141 _s_t_r_e_a_m << indent << "\n"; │ │ │ │ -145 ++indent; │ │ │ │ -146 } │ │ │ │ -147 │ │ │ │ -_1_4_9 inline _~_V_T_U_W_r_i_t_e_r() { │ │ │ │ -150 --indent; │ │ │ │ -151 _s_t_r_e_a_m << indent << "\n" │ │ │ │ -152 << std::flush; │ │ │ │ -153 } │ │ │ │ -154 │ │ │ │ -156 │ │ │ │ -_1_6_7 inline void _b_e_g_i_n_P_o_i_n_t_D_a_t_a(const std::string& scalars = "", │ │ │ │ -168 const std::string& vectors = "") { │ │ │ │ -169 switch(_p_h_a_s_e) { │ │ │ │ -170 case _m_a_i_n : │ │ │ │ -171 _s_t_r_e_a_m << indent << "\n"; │ │ │ │ -175 ++indent; │ │ │ │ -176 break; │ │ │ │ -177 case _a_p_p_e_n_d_e_d : │ │ │ │ -178 break; │ │ │ │ -179 } │ │ │ │ -180 } │ │ │ │ -_1_8_2 inline void _e_n_d_P_o_i_n_t_D_a_t_a() { │ │ │ │ -183 switch(_p_h_a_s_e) { │ │ │ │ -184 case _m_a_i_n : │ │ │ │ -185 --indent; │ │ │ │ -186 _s_t_r_e_a_m << indent << "\n"; │ │ │ │ -187 break; │ │ │ │ -188 case _a_p_p_e_n_d_e_d : │ │ │ │ -189 break; │ │ │ │ -190 } │ │ │ │ -191 } │ │ │ │ -192 │ │ │ │ -194 │ │ │ │ -_2_0_5 inline void _b_e_g_i_n_C_e_l_l_D_a_t_a(const std::string& scalars = "", │ │ │ │ -206 const std::string& vectors = "") { │ │ │ │ -207 switch(_p_h_a_s_e) { │ │ │ │ -208 case _m_a_i_n : │ │ │ │ -209 _s_t_r_e_a_m << indent << "\n"; │ │ │ │ -213 ++indent; │ │ │ │ -214 break; │ │ │ │ -215 case _a_p_p_e_n_d_e_d : │ │ │ │ -216 break; │ │ │ │ -217 } │ │ │ │ -218 } │ │ │ │ -_2_2_0 inline void _e_n_d_C_e_l_l_D_a_t_a() { │ │ │ │ -221 switch(_p_h_a_s_e) { │ │ │ │ -222 case _m_a_i_n : │ │ │ │ -223 --indent; │ │ │ │ -224 _s_t_r_e_a_m << indent << "\n"; │ │ │ │ -225 break; │ │ │ │ -226 case _a_p_p_e_n_d_e_d : │ │ │ │ -227 break; │ │ │ │ -228 } │ │ │ │ -229 } │ │ │ │ -230 │ │ │ │ -232 │ │ │ │ -_2_3_8 inline void _b_e_g_i_n_P_o_i_n_t_s() { │ │ │ │ -239 switch(_p_h_a_s_e) { │ │ │ │ -240 case _m_a_i_n : │ │ │ │ -241 _s_t_r_e_a_m << indent << "\n"; │ │ │ │ -242 ++indent; │ │ │ │ -243 break; │ │ │ │ -244 case _a_p_p_e_n_d_e_d : │ │ │ │ -245 break; │ │ │ │ -246 } │ │ │ │ -247 } │ │ │ │ -_2_4_9 inline void _e_n_d_P_o_i_n_t_s() { │ │ │ │ -250 switch(_p_h_a_s_e) { │ │ │ │ -251 case _m_a_i_n : │ │ │ │ -252 --indent; │ │ │ │ -253 _s_t_r_e_a_m << indent << "\n"; │ │ │ │ -254 break; │ │ │ │ -255 case _a_p_p_e_n_d_e_d : │ │ │ │ -256 break; │ │ │ │ -257 } │ │ │ │ -258 } │ │ │ │ -259 │ │ │ │ -261 │ │ │ │ -_2_7_4 inline void _b_e_g_i_n_C_e_l_l_s() { │ │ │ │ -275 switch(_p_h_a_s_e) { │ │ │ │ -276 case _m_a_i_n : │ │ │ │ -277 _s_t_r_e_a_m << indent << "<" << cellName << ">\n"; │ │ │ │ -278 ++indent; │ │ │ │ -279 break; │ │ │ │ -280 case _a_p_p_e_n_d_e_d : │ │ │ │ -281 break; │ │ │ │ -282 } │ │ │ │ -283 } │ │ │ │ -_2_8_5 inline void _e_n_d_C_e_l_l_s() { │ │ │ │ -286 switch(_p_h_a_s_e) { │ │ │ │ -287 case _m_a_i_n : │ │ │ │ -288 --indent; │ │ │ │ -289 _s_t_r_e_a_m << indent << "\n"; │ │ │ │ -290 break; │ │ │ │ -291 case _a_p_p_e_n_d_e_d : │ │ │ │ -292 break; │ │ │ │ -293 } │ │ │ │ -294 } │ │ │ │ -295 │ │ │ │ -297 │ │ │ │ -_3_1_0 inline void _b_e_g_i_n_M_a_i_n(unsigned ncells, unsigned npoints) { │ │ │ │ -311 _s_t_r_e_a_m << indent << "<" << fileType << ">\n"; │ │ │ │ -312 ++indent; │ │ │ │ -313 _s_t_r_e_a_m << indent << "\n"; │ │ │ │ -316 ++indent; │ │ │ │ -317 _p_h_a_s_e = _m_a_i_n; │ │ │ │ -318 } │ │ │ │ -_3_2_0 inline void _e_n_d_M_a_i_n() { │ │ │ │ -321 --indent; │ │ │ │ -322 _s_t_r_e_a_m << indent << "\n"; │ │ │ │ -323 --indent; │ │ │ │ -324 _s_t_r_e_a_m << indent << "\n"; │ │ │ │ -325 } │ │ │ │ -326 │ │ │ │ -328 │ │ │ │ -_3_4_5 inline bool _b_e_g_i_n_A_p_p_e_n_d_e_d() { │ │ │ │ -346 doAppended = factory._b_e_g_i_n_A_p_p_e_n_d_e_d(); │ │ │ │ -347 if(doAppended) { │ │ │ │ -348 const std::string& encoding = factory._a_p_p_e_n_d_e_d_E_n_c_o_d_i_n_g(); │ │ │ │ -349 _s_t_r_e_a_m << indent << "\n"; │ │ │ │ -351 ++indent; │ │ │ │ -352 // mark begin of data │ │ │ │ -353 _s_t_r_e_a_m << indent << "_"; │ │ │ │ -354 } │ │ │ │ -355 _p_h_a_s_e = _a_p_p_e_n_d_e_d; │ │ │ │ -356 return doAppended; │ │ │ │ -357 } │ │ │ │ -_3_5_9 inline void _e_n_d_A_p_p_e_n_d_e_d() { │ │ │ │ -360 if(doAppended) { │ │ │ │ -361 _s_t_r_e_a_m << "\n"; │ │ │ │ -362 --indent; │ │ │ │ -363 _s_t_r_e_a_m << indent << "\n"; │ │ │ │ -364 } │ │ │ │ -365 } │ │ │ │ -366 │ │ │ │ -368 │ │ │ │ -_3_8_0 _D_a_t_a_A_r_r_a_y_W_r_i_t_e_r* _m_a_k_e_A_r_r_a_y_W_r_i_t_e_r(const std::string& name, │ │ │ │ -381 unsigned ncomps, unsigned nitems, │ │ │ │ -382 _P_r_e_c_i_s_i_o_n prec) { │ │ │ │ -383 return factory._m_a_k_e(name, ncomps, nitems, indent, prec); │ │ │ │ -384 } │ │ │ │ -385 }; │ │ │ │ -386 │ │ │ │ -387 } // namespace VTK │ │ │ │ -388 │ │ │ │ -390 │ │ │ │ -391} // namespace Dune │ │ │ │ -392 │ │ │ │ -393#endif // DUNE_GRID_IO_FILE_VTK_VTUWRITER_HH │ │ │ │ -_d_a_t_a_a_r_r_a_y_w_r_i_t_e_r_._h_h │ │ │ │ -Data array writers for the VTKWriter. │ │ │ │ -_c_o_m_m_o_n_._h_h │ │ │ │ -Common stuff for the VTKWriter. │ │ │ │ -_D_u_n_e │ │ │ │ -Include standard header files. │ │ │ │ -DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_P_r_e_c_i_s_i_o_n │ │ │ │ -Precision │ │ │ │ -which precision to use when writing out data to vtk files │ │ │ │ -DDeeffiinniittiioonn common.hh:271 │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_O_u_t_p_u_t_T_y_p_e │ │ │ │ -OutputType │ │ │ │ -How the bulk data should be stored in the file. │ │ │ │ -DDeeffiinniittiioonn common.hh:43 │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_F_i_l_e_T_y_p_e │ │ │ │ -FileType │ │ │ │ -which type of VTK file to write │ │ │ │ -DDeeffiinniittiioonn common.hh:252 │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_p_o_l_y_D_a_t_a │ │ │ │ -@ polyData │ │ │ │ -for .vtp files (PolyData) │ │ │ │ -DDeeffiinniittiioonn common.hh:254 │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_u_n_s_t_r_u_c_t_u_r_e_d_G_r_i_d │ │ │ │ -@ unstructuredGrid │ │ │ │ -for .vtu files (UnstructuredGrid) │ │ │ │ -DDeeffiinniittiioonn common.hh:256 │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_g_e_t_E_n_d_i_a_n_n_e_s_s_S_t_r_i_n_g │ │ │ │ -std::string getEndiannessString() │ │ │ │ -determine endianness of this C++ implementation │ │ │ │ -DDeeffiinniittiioonn common.hh:232 │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ -base class for data array writers │ │ │ │ -DDeeffiinniittiioonn dataarraywriter.hh:56 │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_F_a_c_t_o_r_y │ │ │ │ -a factory for DataArrayWriters │ │ │ │ -DDeeffiinniittiioonn dataarraywriter.hh:462 │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_F_a_c_t_o_r_y_:_:_b_e_g_i_n_A_p_p_e_n_d_e_d │ │ │ │ -bool beginAppended() │ │ │ │ -signal start of the appended section │ │ │ │ -DDeeffiinniittiioonn dataarraywriter.hh:497 │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_F_a_c_t_o_r_y_:_:_m_a_k_e │ │ │ │ -DataArrayWriter * make(const std::string &name, unsigned ncomps, unsigned │ │ │ │ -nitems, const Indent &indent, Precision prec) │ │ │ │ -create a DataArrayWriter │ │ │ │ -DDeeffiinniittiioonn dataarraywriter.hh:541 │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r_F_a_c_t_o_r_y_:_:_a_p_p_e_n_d_e_d_E_n_c_o_d_i_n_g │ │ │ │ -const std::string & appendedEncoding() const │ │ │ │ -query encoding string for appended data │ │ │ │ -DDeeffiinniittiioonn dataarraywriter.hh:510 │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r │ │ │ │ -Dump a .vtu/.vtp files contents to a stream. │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:98 │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_m_a_k_e_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ -DataArrayWriter * makeArrayWriter(const std::string &name, unsigned ncomps, │ │ │ │ -unsigned nitems, Precision prec) │ │ │ │ -acquire a DataArrayWriter │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:380 │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_A_p_p_e_n_d_e_d │ │ │ │ -bool beginAppended() │ │ │ │ -start the appended data section │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:345 │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_e_n_d_A_p_p_e_n_d_e_d │ │ │ │ -void endAppended() │ │ │ │ -finish the appended data section │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:359 │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_V_T_U_W_r_i_t_e_r │ │ │ │ -VTUWriter(std::ostream &stream_, OutputType outputType, FileType fileType_) │ │ │ │ -create a VTUWriter object │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:122 │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_s_t_r_e_a_m │ │ │ │ -std::ostream & stream │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:100 │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_e_n_d_C_e_l_l_D_a_t_a │ │ │ │ -void endCellData() │ │ │ │ -finish CellData section │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:220 │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_M_a_i_n │ │ │ │ -void beginMain(unsigned ncells, unsigned npoints) │ │ │ │ -start the main PolyData/UnstructuredGrid section │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:310 │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_C_e_l_l_s │ │ │ │ -void beginCells() │ │ │ │ -start section for the grid cells/PolyData lines │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:274 │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_e_n_d_P_o_i_n_t_D_a_t_a │ │ │ │ -void endPointData() │ │ │ │ -finish PointData section │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:182 │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_P_h_a_s_e │ │ │ │ -Phase │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:101 │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_a_p_p_e_n_d_e_d │ │ │ │ -@ appended │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:101 │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_m_a_i_n │ │ │ │ -@ main │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:101 │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_C_e_l_l_D_a_t_a │ │ │ │ -void beginCellData(const std::string &scalars="", const std::string │ │ │ │ -&vectors="") │ │ │ │ -start CellData section │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:205 │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_P_o_i_n_t_D_a_t_a │ │ │ │ -void beginPointData(const std::string &scalars="", const std::string │ │ │ │ -&vectors="") │ │ │ │ -start PointData section │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:167 │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_e_n_d_P_o_i_n_t_s │ │ │ │ -void endPoints() │ │ │ │ -finish section for the point coordinates │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:249 │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_~_V_T_U_W_r_i_t_e_r │ │ │ │ -~VTUWriter() │ │ │ │ -write footer │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:149 │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_e_n_d_C_e_l_l_s │ │ │ │ -void endCells() │ │ │ │ -start section for the grid cells/PolyData lines │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:285 │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_b_e_g_i_n_P_o_i_n_t_s │ │ │ │ -void beginPoints() │ │ │ │ -start section for the point coordinates │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:238 │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_e_n_d_M_a_i_n │ │ │ │ -void endMain() │ │ │ │ -finish the main PolyData/UnstructuredGrid section │ │ │ │ -DDeeffiinniittiioonn vtuwriter.hh:320 │ │ │ │ -_D_u_n_e_:_:_V_T_K_:_:_V_T_U_W_r_i_t_e_r_:_:_p_h_a_s_e │ │ │ │ -enum Dune::VTK::VTUWriter::Phase phase │ │ │ │ +13#include "_v_t_k_/_b_o_u_n_d_a_r_y_w_r_i_t_e_r_._h_h" │ │ │ │ +14#include "_v_t_k_/_s_u_b_s_a_m_p_l_i_n_g_v_t_k_w_r_i_t_e_r_._h_h" │ │ │ │ +15#include "_v_t_k_/_v_t_k_s_e_q_u_e_n_c_e_w_r_i_t_e_r_._h_h" │ │ │ │ +16#include "_v_t_k_/_v_t_k_w_r_i_t_e_r_._h_h" │ │ │ │ +17#include "_v_t_k_/_v_o_l_u_m_e_w_r_i_t_e_r_._h_h" │ │ │ │ +18 │ │ │ │ +19#endif // DUNE_GRID_IO_FILE_VTK_HH │ │ │ │ +_b_o_u_n_d_a_r_y_w_r_i_t_e_r_._h_h │ │ │ │ +_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_o_l_u_m_e_w_r_i_t_e_r_._h_h │ │ │ │ +_v_t_k_s_e_q_u_e_n_c_e_w_r_i_t_e_r_._h_h │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00764.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: vtkwriter.hh File Reference │ │ │ +dune-grid: gnuplot.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,95 +65,39 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ Namespaces
│ │ │ -
vtkwriter.hh File Reference
│ │ │ +
gnuplot.cc File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

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

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

│ │ │ -
#include <cstring>
│ │ │ -#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 "../gnuplot.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::VTKWriter< GridView >::VTKLocalFunction::GlobalFunctionWrapper< F >
 Type erasure implementation for C++ functions, i.e., functions that can be evaluated in global coordinates. More...
 
struct  Dune::VTKWriter< GridView >::VTKLocalFunction::VTKFunctionWrapper
 Type erasure implementation for legacy VTKFunctions. More...
 
class  Dune::VTKWriter< GridView >::CellIterator
 Iterator over the grids elements. More...
 
class  Dune::VTKWriter< GridView >::VertexIterator
 Iterate over the grid's vertices. More...
 
class  Dune::VTKWriter< GridView >::CornerIterator
 Iterate over the elements' corners. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
│ │ │

Detailed Description

│ │ │ -

Provides file i/o for the visualization toolkit.

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

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

│ │ │ +
Author
Christian Engwer
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -2,79 +2,23 @@ │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_r_i_d │ │ │ │ * _i_o │ │ │ │ * _f_i_l_e │ │ │ │ - * _v_t_k │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -vtkwriter.hh File Reference │ │ │ │ -Provides file i/o for the visualization toolkit. _M_o_r_e_._._. │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_m_c_m_g_m_a_p_p_e_r_._h_h> │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_e_n_u_m_s_._h_h> │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_m_m_o_n_._h_h> │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_d_a_t_a_a_r_r_a_y_w_r_i_t_e_r_._h_h> │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_f_u_n_c_t_i_o_n_._h_h> │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_p_v_t_u_w_r_i_t_e_r_._h_h> │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_s_t_r_e_a_m_s_._h_h> │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_t_u_w_r_i_t_e_r_._h_h> │ │ │ │ + * _g_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_:_:_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_:_:_V_T_K_W_r_i_t_e_r_<_ _G_r_i_d_V_i_e_w_ _>_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n │ │ │ │ -  Type erasure wrapper for _V_T_K data sets. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_<_ _G_r_i_d_V_i_e_w_ _>_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n_:_:_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r_B_a_s_e │ │ │ │ -  Base class for polymorphic container of underlying data set. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_<_ _G_r_i_d_V_i_e_w_ _>_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n_:_:_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r_<_ _F_ _> │ │ │ │ -  Type erasure implementation for functions conforming to the dune- │ │ │ │ - functions LocalFunction interface. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_<_ _G_r_i_d_V_i_e_w_ _>_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n_:_:_G_l_o_b_a_l_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r_< │ │ │ │ - _F_ _> │ │ │ │ -  Type erasure implementation for C++ functions, i.e., functions that │ │ │ │ - can be evaluated in global coordinates. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_<_ _G_r_i_d_V_i_e_w_ _>_:_:_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n_:_:_V_T_K_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r │ │ │ │ -  Type erasure implementation for legacy VTKFunctions. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ - class   _D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_<_ _G_r_i_d_V_i_e_w_ _>_:_:_C_e_l_l_I_t_e_r_a_t_o_r │ │ │ │ -  Iterator over the grids elements. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ - class   _D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_<_ _G_r_i_d_V_i_e_w_ _>_:_:_V_e_r_t_e_x_I_t_e_r_a_t_o_r │ │ │ │ -  Iterate over the grid's vertices. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ - class   _D_u_n_e_:_:_V_T_K_W_r_i_t_e_r_<_ _G_r_i_d_V_i_e_w_ _>_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r │ │ │ │ -  Iterate over the elements' corners. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │   Include standard header files. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Provides file i/o for the visualization toolkit. │ │ │ │ +Implementation of gnuplot output for 1D and 2D grids. │ │ │ │ Author │ │ │ │ - Peter Bastian, Christian Engwer │ │ │ │ + Christian Engwer │ │ │ │ =============================================================================== │ │ │ │ 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: vtkwriter.hh Source File │ │ │ +dune-grid: gnuplot.cc Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,1661 +70,136 @@ │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
vtkwriter.hh
│ │ │ +
gnuplot.cc
│ │ │
│ │ │
│ │ │ -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{
│ │ │ +
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 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 {};
│ │ │ +
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 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 {};
│ │ │ +
61 }
│ │ │ +
62
│ │ │ +
63 }
│ │ │ +
64
│ │ │ +
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 } // 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 // 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;
│ │ │ +
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 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;
│ │ │ +
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 static const PartitionIteratorType VTK_Partition = InteriorBorder_Partition;
│ │ │ -
116 //static const PartitionIteratorType VTK_Partition = All_Partition;
│ │ │ -
117
│ │ │ -
118 typedef typename GridView::template Codim< 0 >
│ │ │ -
119 ::template Partition< VTK_Partition >::Iterator
│ │ │ -
120 GridCellIterator;
│ │ │ -
121 typedef typename GridView::template Codim< n >
│ │ │ -
122 ::template Partition< VTK_Partition >::Iterator
│ │ │ -
123 GridVertexIterator;
│ │ │ -
124
│ │ │ -
125 typedef typename GridCellIterator::Reference EntityReference;
│ │ │ -
126
│ │ │ -
127 typedef typename GridView::template Codim< 0 >
│ │ │ -
128 ::Entity::Geometry::LocalCoordinate Coordinate;
│ │ │ -
129
│ │ │ - │ │ │ -
131
│ │ │ -
132 // return true if entity should be skipped in Vertex and Corner iterator
│ │ │ -
133 static bool skipEntity( const PartitionType entityType )
│ │ │ -
134 {
│ │ │ -
135 switch( VTK_Partition )
│ │ │ -
136 {
│ │ │ -
137 // for All_Partition no entity has to be skipped
│ │ │ -
138 case All_Partition: return false;
│ │ │ -
139 case InteriorBorder_Partition: return ( entityType != InteriorEntity );
│ │ │ -
140 default: DUNE_THROW(NotImplemented,"Add check for this partition type");
│ │ │ -
141 }
│ │ │ -
142 return false ;
│ │ │ -
143 }
│ │ │ -
144
│ │ │ -
145 public:
│ │ │ -
146
│ │ │ - │ │ │ -
148
│ │ │ -
149 protected:
│ │ │ -
150
│ │ │ -
152
│ │ │ -
│ │ │ - │ │ │ -
156 {
│ │ │ -
157
│ │ │ -
158 public:
│ │ │ -
159
│ │ │ - │ │ │ -
161
│ │ │ -
│ │ │ - │ │ │ -
164 {
│ │ │ -
165
│ │ │ -
167 virtual void bind(const Entity& e) = 0;
│ │ │ -
168
│ │ │ -
170 virtual void unbind() = 0;
│ │ │ -
171
│ │ │ -
173
│ │ │ -
176 virtual void write(const Coordinate& pos, Writer& w, std::size_t count) const = 0;
│ │ │ -
177
│ │ │ -
│ │ │ - │ │ │ -
179 {}
│ │ │ -
│ │ │ -
180
│ │ │ -
181 };
│ │ │ -
│ │ │ -
182
│ │ │ -
184 // DUNE_PRIVATE since _f has less visibility
│ │ │ -
185 template<typename F>
│ │ │ -
│ │ │ -
186 struct DUNE_PRIVATE FunctionWrapper
│ │ │ -
187 : public FunctionWrapperBase
│ │ │ -
188 {
│ │ │ -
189 using Function = typename std::decay<F>::type;
│ │ │ -
190
│ │ │ -
191 template<typename F_>
│ │ │ -
│ │ │ - │ │ │ -
193 : _f(std::forward<F_>(f))
│ │ │ -
194 {}
│ │ │ -
│ │ │ -
195
│ │ │ -
│ │ │ -
196 virtual void bind(const Entity& e)
│ │ │ -
197 {
│ │ │ -
198 _f.bind(e);
│ │ │ -
199 }
│ │ │ -
│ │ │ -
200
│ │ │ -
│ │ │ -
201 virtual void unbind()
│ │ │ -
202 {
│ │ │ -
203 _f.unbind();
│ │ │ -
204 }
│ │ │ -
│ │ │ -
205
│ │ │ -
│ │ │ -
206 virtual void write(const Coordinate& pos, Writer& w, std::size_t count) const
│ │ │ -
207 {
│ │ │ -
208 auto r = _f(pos);
│ │ │ -
209 // we need to do different things here depending on whether r supports indexing into it or not.
│ │ │ -
210 do_write(w,r,count,IsIndexable<decltype(r)>());
│ │ │ -
211 }
│ │ │ -
│ │ │ -
212
│ │ │ -
213 private:
│ │ │ -
214
│ │ │ -
215 template<typename R>
│ │ │ -
216 void do_write(Writer& w, const R& r, std::size_t count, std::true_type) const
│ │ │ -
217 {
│ │ │ -
218 for (std::size_t i = 0; i < count; ++i)
│ │ │ -
219 w.write(r[i]);
│ │ │ -
220 }
│ │ │ -
221
│ │ │ -
222 template<typename R>
│ │ │ -
223 void do_write(Writer& w, const R& r, std::size_t count, std::false_type) const
│ │ │ -
224 {
│ │ │ -
225 assert(count == 1);
│ │ │ -
226 w.write(r);
│ │ │ -
227 }
│ │ │ -
228
│ │ │ -
229 Function _f;
│ │ │ -
230 };
│ │ │ -
│ │ │ -
231
│ │ │ -
233 template<typename F>
│ │ │ -
│ │ │ - │ │ │ -
235 : public FunctionWrapperBase
│ │ │ -
236 {
│ │ │ -
237 using Function = typename std::decay<F>::type;
│ │ │ -
238
│ │ │ -
239 template<typename F_>
│ │ │ -
│ │ │ - │ │ │ -
241 : _f(std::forward<F_>(f))
│ │ │ -
242 , element_(nullptr)
│ │ │ -
243 {}
│ │ │ -
│ │ │ -
244
│ │ │ -
│ │ │ -
245 virtual void bind(const Entity& e)
│ │ │ -
246 {
│ │ │ -
247 element_ = &e;
│ │ │ -
248 }
│ │ │ -
│ │ │ -
249
│ │ │ -
│ │ │ -
250 virtual void unbind()
│ │ │ -
251 {
│ │ │ -
252 element_ = nullptr;
│ │ │ -
253 }
│ │ │ -
│ │ │ -
254
│ │ │ -
│ │ │ -
255 virtual void write(const Coordinate& pos, Writer& w, std::size_t count) const
│ │ │ -
256 {
│ │ │ -
257 auto globalPos = element_->geometry().global(pos);
│ │ │ -
258 auto r = _f(globalPos);
│ │ │ -
259 if constexpr (IsIndexable<decltype(r)>()) {
│ │ │ -
260 for (std::size_t i = 0; i < count; ++i)
│ │ │ -
261 w.write(r[i]);
│ │ │ -
262 }
│ │ │ -
263 else {
│ │ │ -
264 assert(count == 1);
│ │ │ -
265 w.write(r);
│ │ │ -
266 }
│ │ │ -
267 }
│ │ │ -
│ │ │ -
268 private:
│ │ │ -
269 Function _f;
│ │ │ -
270 const Entity* element_;
│ │ │ -
271 };
│ │ │ -
│ │ │ -
272
│ │ │ -
│ │ │ - │ │ │ -
275 : public FunctionWrapperBase
│ │ │ -
276 {
│ │ │ -
│ │ │ -
277 VTKFunctionWrapper(const std::shared_ptr< const VTKFunction >& f)
│ │ │ -
278 : _f(f)
│ │ │ -
279 , _entity(nullptr)
│ │ │ -
280 {}
│ │ │ -
│ │ │ -
281
│ │ │ -
│ │ │ -
282 virtual void bind(const Entity& e)
│ │ │ -
283 {
│ │ │ -
284 _entity = &e;
│ │ │ -
285 }
│ │ │ -
│ │ │ -
286
│ │ │ -
│ │ │ -
287 virtual void unbind()
│ │ │ -
288 {
│ │ │ -
289 _entity = nullptr;
│ │ │ -
290 }
│ │ │ -
│ │ │ -
291
│ │ │ -
│ │ │ -
292 virtual void write(const Coordinate& pos, Writer& w, std::size_t count) const
│ │ │ -
293 {
│ │ │ -
294 for (std::size_t i = 0; i < count; ++i)
│ │ │ -
295 w.write(_f->evaluate(i,*_entity,pos));
│ │ │ -
296 }
│ │ │ -
│ │ │ -
297
│ │ │ -
298 private:
│ │ │ -
299
│ │ │ -
300 std::shared_ptr< const VTKFunction > _f;
│ │ │ -
301 const Entity* _entity;
│ │ │ -
302
│ │ │ -
303 };
│ │ │ -
│ │ │ -
304
│ │ │ -
306 template<typename F, std::enable_if_t<Impl::IsBindable<F, Entity>::value, int> = 0>
│ │ │ -
│ │ │ - │ │ │ -
308 : _f(std::make_unique<FunctionWrapper<F> >(std::forward<F>(f)))
│ │ │ - │ │ │ -
310 {}
│ │ │ -
│ │ │ -
311
│ │ │ -
313 // That is, a function that you can create a LocalFunction for, and evaluate that in element coordinates
│ │ │ -
314 template<typename F, std::enable_if_t<not Impl::IsBindable<F, Entity>::value && Impl::HasLocalFunction<F>::value, int> = 0>
│ │ │ -
│ │ │ - │ │ │ -
316 : _f(std::make_unique< FunctionWrapper<
│ │ │ -
317 typename std::decay<decltype(localFunction(std::forward<F>(f)))>::type
│ │ │ -
318 > >(localFunction(std::forward<F>(f))))
│ │ │ - │ │ │ -
320 {}
│ │ │ -
│ │ │ -
321
│ │ │ -
323 // That is, a function that can be evaluated in global coordinates of the domain
│ │ │ -
324 template<typename F, std::enable_if_t<not Impl::IsBindable<F, Entity>::value && not Impl::HasLocalFunction<F>::value, int> = 0>
│ │ │ -
│ │ │ - │ │ │ -
326 : _f(std::make_unique< GlobalFunctionWrapper<F> >(std::forward<F>(f)))
│ │ │ - │ │ │ -
328 {}
│ │ │ -
│ │ │ -
329
│ │ │ -
│ │ │ -
331 explicit VTKLocalFunction (const std::shared_ptr< const VTKFunction >& vtkFunctionPtr)
│ │ │ -
332 : _f(std::make_unique<VTKFunctionWrapper>(vtkFunctionPtr))
│ │ │ -
333 , _fieldInfo(
│ │ │ -
334 vtkFunctionPtr->name(),
│ │ │ -
335 (vtkFunctionPtr->ncomps() == 2 || vtkFunctionPtr->ncomps() == 3) ? VTK::FieldInfo::Type::vector : VTK::FieldInfo::Type::scalar,
│ │ │ -
336 vtkFunctionPtr->ncomps(),
│ │ │ -
337 vtkFunctionPtr->precision()
│ │ │ -
338 )
│ │ │ -
339 {}
│ │ │ -
│ │ │ -
340
│ │ │ -
│ │ │ -
342 std::string name() const
│ │ │ -
343 {
│ │ │ -
344 return fieldInfo().name();
│ │ │ -
345 }
│ │ │ -
│ │ │ -
346
│ │ │ -
│ │ │ - │ │ │ -
349 {
│ │ │ -
350 return _fieldInfo;
│ │ │ -
351 }
│ │ │ -
│ │ │ -
352
│ │ │ -
│ │ │ -
354 void bind(const Entity& e) const
│ │ │ -
355 {
│ │ │ -
356 _f->bind(e);
│ │ │ -
357 }
│ │ │ -
│ │ │ -
358
│ │ │ -
│ │ │ -
360 void unbind() const
│ │ │ -
361 {
│ │ │ -
362 _f->unbind();
│ │ │ -
363 }
│ │ │ -
│ │ │ -
364
│ │ │ -
│ │ │ -
366 void write(const Coordinate& pos, Writer& w) const
│ │ │ -
367 {
│ │ │ -
368 _f->write(pos,w,fieldInfo().size());
│ │ │ -
369 }
│ │ │ -
│ │ │ -
370
│ │ │ -
371 std::shared_ptr<FunctionWrapperBase> _f;
│ │ │ - │ │ │ -
373
│ │ │ -
374 };
│ │ │ -
│ │ │ -
375
│ │ │ -
376 typedef typename std::list<VTKLocalFunction>::const_iterator FunctionIterator;
│ │ │ -
377
│ │ │ -
379
│ │ │ -
│ │ │ -
384 class CellIterator : public GridCellIterator
│ │ │ -
385 {
│ │ │ -
386 public:
│ │ │ -
388 CellIterator(const GridCellIterator & x) : GridCellIterator(x) {}
│ │ │ -
│ │ │ -
391 const FieldVector<DT,n> position() const
│ │ │ -
392 {
│ │ │ -
393 return ReferenceElements<DT,n>::general((*this)->type()).position(0,0);
│ │ │ -
394 }
│ │ │ -
│ │ │ -
395 };
│ │ │ -
│ │ │ -
396
│ │ │ -
│ │ │ - │ │ │ -
398 {
│ │ │ -
399 return gridView_.template begin< 0, VTK_Partition >();
│ │ │ -
400 }
│ │ │ -
│ │ │ -
401
│ │ │ -
│ │ │ - │ │ │ -
403 {
│ │ │ -
404 return gridView_.template end< 0, VTK_Partition >();
│ │ │ -
405 }
│ │ │ -
│ │ │ -
406
│ │ │ -
408
│ │ │ -
│ │ │ - │ │ │ -
423 public ForwardIteratorFacade<VertexIterator, const Entity, EntityReference, int>
│ │ │ -
424 {
│ │ │ -
425 GridCellIterator git;
│ │ │ -
426 GridCellIterator gend;
│ │ │ -
427 VTK::DataMode datamode;
│ │ │ -
428 // Index of the currently visited corner within the current element.
│ │ │ -
429 // NOTE: this is in Dune-numbering, in contrast to CornerIterator.
│ │ │ -
430 int cornerIndexDune;
│ │ │ -
431 const VertexMapper & vertexmapper;
│ │ │ -
432 std::vector<bool> visited;
│ │ │ -
433 // in conforming mode, for each vertex id (as obtained by vertexmapper)
│ │ │ -
434 // hold its number in the iteration order (VertexIterator)
│ │ │ -
435 int offset;
│ │ │ -
436
│ │ │ -
437 // hide operator ->
│ │ │ -
438 void operator->();
│ │ │ -
439 protected:
│ │ │ -
│ │ │ - │ │ │ -
441 {
│ │ │ -
442 if( git == gend )
│ │ │ -
443 return;
│ │ │ -
444 ++cornerIndexDune;
│ │ │ -
445 const int numCorners = git->subEntities(n);
│ │ │ -
446 if( cornerIndexDune == numCorners )
│ │ │ -
447 {
│ │ │ -
448 offset += numCorners;
│ │ │ -
449 cornerIndexDune = 0;
│ │ │ -
450
│ │ │ -
451 ++git;
│ │ │ -
452 while( (git != gend) && skipEntity( git->partitionType() ) )
│ │ │ -
453 ++git;
│ │ │ -
454 }
│ │ │ -
455 }
│ │ │ -
│ │ │ -
456 public:
│ │ │ -
│ │ │ -
457 VertexIterator(const GridCellIterator & x,
│ │ │ -
458 const GridCellIterator & end,
│ │ │ -
459 const VTK::DataMode & dm,
│ │ │ -
460 const VertexMapper & vm) :
│ │ │ -
461 git(x), gend(end), datamode(dm), cornerIndexDune(0),
│ │ │ -
462 vertexmapper(vm), visited(vm.size(), false),
│ │ │ -
463 offset(0)
│ │ │ -
464 {
│ │ │ -
465 if (datamode == VTK::conforming && git != gend)
│ │ │ -
466 visited[vertexmapper.subIndex(*git,cornerIndexDune,n)] = true;
│ │ │ -
467 }
│ │ │ -
│ │ │ -
│ │ │ -
468 void increment ()
│ │ │ -
469 {
│ │ │ -
470 switch (datamode)
│ │ │ -
471 {
│ │ │ -
472 case VTK::conforming :
│ │ │ -
473 while(visited[vertexmapper.subIndex(*git,cornerIndexDune,n)])
│ │ │ -
474 {
│ │ │ - │ │ │ -
476 if (git == gend) return;
│ │ │ -
477 }
│ │ │ -
478 visited[vertexmapper.subIndex(*git,cornerIndexDune,n)] = true;
│ │ │ -
479 break;
│ │ │ -
480 case VTK::nonconforming :
│ │ │ - │ │ │ -
482 break;
│ │ │ -
483 }
│ │ │ -
484 }
│ │ │ -
│ │ │ -
│ │ │ -
485 bool equals (const VertexIterator & cit) const
│ │ │ -
486 {
│ │ │ -
487 return git == cit.git
│ │ │ -
488 && cornerIndexDune == cit.cornerIndexDune
│ │ │ -
489 && datamode == cit.datamode;
│ │ │ -
490 }
│ │ │ -
│ │ │ -
│ │ │ -
491 EntityReference dereference() const
│ │ │ -
492 {
│ │ │ -
493 return *git;
│ │ │ -
494 }
│ │ │ -
│ │ │ -
│ │ │ -
496 int localindex () const
│ │ │ -
497 {
│ │ │ -
498 return cornerIndexDune;
│ │ │ -
499 }
│ │ │ -
│ │ │ -
│ │ │ -
501 FieldVector<DT,n> position () const
│ │ │ -
502 {
│ │ │ -
503 return referenceElement<DT,n>(git->type())
│ │ │ -
504 .position(cornerIndexDune,n);
│ │ │ -
505 }
│ │ │ -
│ │ │ -
506 };
│ │ │ -
│ │ │ -
507
│ │ │ -
│ │ │ - │ │ │ -
509 {
│ │ │ -
510 return VertexIterator( gridView_.template begin< 0, VTK_Partition >(),
│ │ │ -
511 gridView_.template end< 0, VTK_Partition >(),
│ │ │ -
512 datamode, *vertexmapper );
│ │ │ -
513 }
│ │ │ -
│ │ │ -
514
│ │ │ -
│ │ │ - │ │ │ -
516 {
│ │ │ -
517 return VertexIterator( gridView_.template end< 0, VTK_Partition >(),
│ │ │ -
518 gridView_.template end< 0, VTK_Partition >(),
│ │ │ -
519 datamode, *vertexmapper );
│ │ │ -
520 }
│ │ │ -
│ │ │ -
521
│ │ │ -
523
│ │ │ -
│ │ │ - │ │ │ -
538 public ForwardIteratorFacade<CornerIterator, const Entity, EntityReference, int>
│ │ │ -
539 {
│ │ │ -
540 GridCellIterator git;
│ │ │ -
541 GridCellIterator gend;
│ │ │ -
542 VTK::DataMode datamode;
│ │ │ -
543 // Index of the currently visited corner within the current element.
│ │ │ -
544 // NOTE: this is in VTK-numbering, in contrast to VertexIterator.
│ │ │ -
545 int cornerIndexVTK;
│ │ │ -
546 const VertexMapper & vertexmapper;
│ │ │ -
547 // in conforming mode, for each vertex id (as obtained by vertexmapper)
│ │ │ -
548 // hold its number in the iteration order of VertexIterator (*not*
│ │ │ -
549 // CornerIterator)
│ │ │ -
550 const std::vector<int> & number;
│ │ │ -
551 // holds the number of corners of all the elements we have seen so far,
│ │ │ -
552 // excluding the current element
│ │ │ -
553 int offset;
│ │ │ -
554
│ │ │ -
555 // hide operator ->
│ │ │ -
556 void operator->();
│ │ │ -
557 public:
│ │ │ -
│ │ │ -
558 CornerIterator(const GridCellIterator & x,
│ │ │ -
559 const GridCellIterator & end,
│ │ │ -
560 const VTK::DataMode & dm,
│ │ │ -
561 const VertexMapper & vm,
│ │ │ -
562 const std::vector<int> & num) :
│ │ │ -
563 git(x), gend(end), datamode(dm), cornerIndexVTK(0),
│ │ │ -
564 vertexmapper(vm),
│ │ │ -
565 number(num), offset(0) {}
│ │ │ -
│ │ │ -
│ │ │ -
566 void increment ()
│ │ │ -
567 {
│ │ │ -
568 if( git == gend )
│ │ │ -
569 return;
│ │ │ -
570 ++cornerIndexVTK;
│ │ │ -
571 const int numCorners = git->subEntities(n);
│ │ │ -
572 if( cornerIndexVTK == numCorners )
│ │ │ -
573 {
│ │ │ -
574 offset += numCorners;
│ │ │ -
575 cornerIndexVTK = 0;
│ │ │ -
576
│ │ │ -
577 ++git;
│ │ │ -
578 while( (git != gend) && skipEntity( git->partitionType() ) )
│ │ │ -
579 ++git;
│ │ │ -
580 }
│ │ │ -
581 }
│ │ │ -
│ │ │ -
│ │ │ -
582 bool equals (const CornerIterator & cit) const
│ │ │ -
583 {
│ │ │ -
584 return git == cit.git
│ │ │ -
585 && cornerIndexVTK == cit.cornerIndexVTK
│ │ │ -
586 && datamode == cit.datamode;
│ │ │ -
587 }
│ │ │ -
│ │ │ -
│ │ │ -
588 EntityReference dereference() const
│ │ │ -
589 {
│ │ │ -
590 return *git;
│ │ │ -
591 }
│ │ │ -
│ │ │ -
593
│ │ │ -
│ │ │ -
597 int id () const
│ │ │ -
598 {
│ │ │ -
599 switch (datamode)
│ │ │ -
600 {
│ │ │ -
601 case VTK::conforming :
│ │ │ -
602 return
│ │ │ -
603 number[vertexmapper.subIndex(*git,VTK::renumber(*git,cornerIndexVTK),
│ │ │ -
604 n)];
│ │ │ -
605 case VTK::nonconforming :
│ │ │ -
606 return offset + VTK::renumber(*git,cornerIndexVTK);
│ │ │ -
607 default :
│ │ │ -
608 DUNE_THROW(IOError,"VTKWriter: unsupported DataMode" << datamode);
│ │ │ -
609 }
│ │ │ -
610 }
│ │ │ -
│ │ │ -
611 };
│ │ │ -
│ │ │ -
612
│ │ │ -
│ │ │ - │ │ │ -
614 {
│ │ │ -
615 return CornerIterator( gridView_.template begin< 0, VTK_Partition >(),
│ │ │ -
616 gridView_.template end< 0, VTK_Partition >(),
│ │ │ -
617 datamode, *vertexmapper, number );
│ │ │ -
618 }
│ │ │ -
│ │ │ -
619
│ │ │ -
│ │ │ - │ │ │ -
621 {
│ │ │ -
622 return CornerIterator( gridView_.template end< 0, VTK_Partition >(),
│ │ │ -
623 gridView_.template end< 0, VTK_Partition >(),
│ │ │ -
624 datamode, *vertexmapper, number );
│ │ │ -
625 }
│ │ │ -
│ │ │ -
626
│ │ │ -
627 public:
│ │ │ -
│ │ │ -
636 explicit VTKWriter ( const GridView &gridView,
│ │ │ - │ │ │ - │ │ │ -
639 : gridView_( gridView ),
│ │ │ -
640 datamode( dm ),
│ │ │ -
641 coordPrec (coordPrecision),
│ │ │ -
642 polyhedralCellsPresent_( checkForPolyhedralCells() )
│ │ │ -
643 { }
│ │ │ -
│ │ │ -
644
│ │ │ -
│ │ │ -
649 void addCellData (const std::shared_ptr< const VTKFunction > & p)
│ │ │ -
650 {
│ │ │ -
651 celldata.push_back(VTKLocalFunction(p));
│ │ │ -
652 }
│ │ │ -
│ │ │ -
653
│ │ │ -
673 template<typename F>
│ │ │ -
│ │ │ -
674 void addCellData(F&& f, VTK::FieldInfo vtkFieldInfo)
│ │ │ -
675 {
│ │ │ -
676 celldata.push_back(VTKLocalFunction(std::forward<F>(f),vtkFieldInfo));
│ │ │ -
677 }
│ │ │ -
│ │ │ -
678
│ │ │ -
694 template<class Container>
│ │ │ -
│ │ │ -
695 void addCellData (const Container& v, const std::string &name, int ncomps = 1,
│ │ │ - │ │ │ -
697 {
│ │ │ -
698 typedef P0VTKFunction<GridView, Container> Function;
│ │ │ -
699 for (int c=0; c<ncomps; ++c) {
│ │ │ -
700 std::stringstream compName;
│ │ │ -
701 compName << name;
│ │ │ -
702 if (ncomps>1)
│ │ │ -
703 compName << "[" << c << "]";
│ │ │ -
704 VTKFunction* p = new Function(gridView_, v, compName.str(), ncomps, c, prec);
│ │ │ -
705 addCellData(std::shared_ptr< const VTKFunction >(p));
│ │ │ -
706 }
│ │ │ -
707 }
│ │ │ -
│ │ │ -
708
│ │ │ -
│ │ │ -
713 void addVertexData (const std::shared_ptr< const VTKFunction > & p)
│ │ │ -
714 {
│ │ │ -
715 vertexdata.push_back(VTKLocalFunction(p));
│ │ │ -
716 }
│ │ │ -
│ │ │ -
717
│ │ │ -
737 template<typename F>
│ │ │ -
│ │ │ -
738 void addVertexData(F&& f, VTK::FieldInfo vtkFieldInfo)
│ │ │ -
739 {
│ │ │ -
740 vertexdata.push_back(VTKLocalFunction(std::forward<F>(f),vtkFieldInfo));
│ │ │ -
741 }
│ │ │ -
│ │ │ -
742
│ │ │ -
743
│ │ │ -
759 template<class Container>
│ │ │ -
│ │ │ -
760 void addVertexData (const Container& v, const std::string &name, int ncomps=1,
│ │ │ - │ │ │ -
762 {
│ │ │ -
763 typedef P1VTKFunction<GridView, Container> Function;
│ │ │ -
764 for (int c=0; c<ncomps; ++c) {
│ │ │ -
765 std::stringstream compName;
│ │ │ -
766 compName << name;
│ │ │ -
767 if (ncomps>1)
│ │ │ -
768 compName << "[" << c << "]";
│ │ │ -
769 VTKFunction* p = new Function(gridView_, v, compName.str(), ncomps, c, prec);
│ │ │ -
770 addVertexData(std::shared_ptr< const VTKFunction >(p));
│ │ │ -
771 }
│ │ │ -
772 }
│ │ │ -
│ │ │ -
773
│ │ │ -
│ │ │ -
775 void clear ()
│ │ │ -
776 {
│ │ │ -
777 celldata.clear();
│ │ │ -
778 vertexdata.clear();
│ │ │ -
779 }
│ │ │ -
│ │ │ -
780
│ │ │ -
│ │ │ - │ │ │ -
783 { return coordPrec; }
│ │ │ -
│ │ │ -
784
│ │ │ -
│ │ │ -
786 virtual ~VTKWriter ()
│ │ │ -
787 {
│ │ │ -
788 this->clear();
│ │ │ -
789 }
│ │ │ -
│ │ │ -
790
│ │ │ -
│ │ │ -
803 std::string write ( const std::string &name,
│ │ │ - │ │ │ -
805 {
│ │ │ -
806 return write( name, type, gridView_.comm().rank(), gridView_.comm().size() );
│ │ │ -
807 }
│ │ │ -
│ │ │ -
808
│ │ │ -
│ │ │ -
835 std::string pwrite ( const std::string & name, const std::string & path, const std::string & extendpath,
│ │ │ - │ │ │ -
837 {
│ │ │ -
838 return pwrite( name, path, extendpath, type, gridView_.comm().rank(), gridView_.comm().size() );
│ │ │ -
839 }
│ │ │ -
│ │ │ -
840
│ │ │ -
841 protected:
│ │ │ -
843
│ │ │ -
│ │ │ -
855 std::string getParallelPieceName(const std::string& name,
│ │ │ -
856 const std::string& path,
│ │ │ -
857 int commRank, int commSize) const
│ │ │ -
858 {
│ │ │ -
859 std::ostringstream s;
│ │ │ -
860 // write path first
│ │ │ -
861 if(path.size() > 0)
│ │ │ -
862 {
│ │ │ -
863 s << path;
│ │ │ -
864 if(path[path.size()-1] != '/')
│ │ │ -
865 s << '/';
│ │ │ -
866 }
│ │ │ -
867
│ │ │ -
868 std::string fileprefix;
│ │ │ -
869 // check if a path was already added to name
│ │ │ -
870 // and if yes find filename without path
│ │ │ -
871 auto pos = name.rfind('/');
│ │ │ -
872 if( pos != std::string::npos )
│ │ │ -
873 {
│ │ │ -
874 // extract filename without path
│ │ │ -
875 fileprefix = name.substr( pos+1 );
│ │ │ -
876 // extract the path and added it before
│ │ │ -
877 // the magic below is added
│ │ │ -
878 std::string newpath = name.substr(0, pos);
│ │ │ -
879 s << newpath;
│ │ │ -
880 if(newpath[name.size()-1] != '/')
│ │ │ -
881 s << '/';
│ │ │ -
882 }
│ │ │ -
883 else
│ │ │ -
884 {
│ │ │ -
885 // if no path was found just copy the name
│ │ │ -
886 fileprefix = name;
│ │ │ -
887 }
│ │ │ -
888
│ │ │ -
889 s << 's' << std::setw(4) << std::setfill('0') << commSize << '-';
│ │ │ -
890 const bool writeHeader = commRank < 0;
│ │ │ -
891 if( ! writeHeader )
│ │ │ -
892 {
│ │ │ -
893 s << 'p' << std::setw(4) << std::setfill('0') << commRank << '-';
│ │ │ -
894 }
│ │ │ -
895
│ │ │ -
896 s << fileprefix << ".";
│ │ │ -
897 // write p for header files
│ │ │ -
898 if( writeHeader )
│ │ │ -
899 s << "p";
│ │ │ -
900 s << "vt";
│ │ │ -
901
│ │ │ -
902 if(GridView::dimension > 1)
│ │ │ -
903 s << "u";
│ │ │ -
904 else
│ │ │ -
905 s << "p";
│ │ │ -
906 return s.str();
│ │ │ -
907 }
│ │ │ -
│ │ │ -
908
│ │ │ -
910
│ │ │ -
│ │ │ -
920 std::string getParallelHeaderName(const std::string& name,
│ │ │ -
921 const std::string& path,
│ │ │ -
922 int commSize) const
│ │ │ -
923 {
│ │ │ -
924 return getParallelPieceName( name, path, -1, commSize );
│ │ │ -
925 }
│ │ │ -
│ │ │ -
926
│ │ │ -
928
│ │ │ -
│ │ │ -
940 std::string getSerialPieceName(const std::string& name,
│ │ │ -
941 const std::string& path) const
│ │ │ -
942 {
│ │ │ -
943 static const std::string extension =
│ │ │ -
944 GridView::dimension == 1 ? ".vtp" : ".vtu";
│ │ │ -
945
│ │ │ -
946 return concatPaths(path, name+extension);
│ │ │ -
947 }
│ │ │ -
│ │ │ -
948
│ │ │ -
│ │ │ -
965 std::string write ( const std::string &name,
│ │ │ -
966 VTK::OutputType type,
│ │ │ -
967 const int commRank,
│ │ │ -
968 const int commSize )
│ │ │ -
969 {
│ │ │ -
970 // in the parallel case, just use pwrite, it has all the necessary
│ │ │ -
971 // stuff, so we don't need to reimplement it here.
│ │ │ -
972 if(commSize > 1)
│ │ │ -
973 {
│ │ │ -
974 std::string filename = name;
│ │ │ -
975 std::string path = std::string("");
│ │ │ -
976
│ │ │ -
977 // check if a path was already added to name
│ │ │ -
978 // and if yes find filename without path
│ │ │ -
979 auto pos = name.rfind('/');
│ │ │ -
980 if( pos != std::string::npos )
│ │ │ -
981 {
│ │ │ -
982 // extract filename without path
│ │ │ -
983 filename = name.substr( pos+1 );
│ │ │ -
984
│ │ │ -
985 // extract the path and added it before
│ │ │ -
986 // the magic below is added
│ │ │ -
987 path = name.substr(0, pos);
│ │ │ -
988 }
│ │ │ -
989
│ │ │ -
990 return pwrite(filename, path, "", type, commRank, commSize);
│ │ │ -
991 }
│ │ │ -
992
│ │ │ -
993 // make data mode visible to private functions
│ │ │ -
994 outputtype = type;
│ │ │ -
995
│ │ │ -
996 // generate filename for process data
│ │ │ -
997 std::string pieceName = getSerialPieceName(name, "");
│ │ │ -
998
│ │ │ -
999 // write process data
│ │ │ -
1000 std::ofstream file;
│ │ │ -
1001 file.exceptions(std::ios_base::badbit | std::ios_base::failbit |
│ │ │ -
1002 std::ios_base::eofbit);
│ │ │ -
1003 // check if file can be opened
│ │ │ -
1004 try {
│ │ │ -
1005 file.open( pieceName.c_str(), std::ios::binary );
│ │ │ -
1006 }
│ │ │ -
1007 catch(...) {
│ │ │ -
1008 std::cerr << "Filename: " << pieceName << " could not be opened" << std::endl;
│ │ │ -
1009 throw;
│ │ │ -
1010 }
│ │ │ -
1011 if (! file.is_open())
│ │ │ -
1012 DUNE_THROW(IOError, "Could not write to piece file " << pieceName);
│ │ │ -
1013 writeDataFile( file );
│ │ │ -
1014 file.close();
│ │ │ -
1015
│ │ │ -
1016 return pieceName;
│ │ │ -
1017 }
│ │ │ -
│ │ │ -
1018
│ │ │ -
1020
│ │ │ -
│ │ │ -
1043 std::string pwrite(const std::string& name, const std::string& path,
│ │ │ -
1044 const std::string& extendpath,
│ │ │ -
1045 VTK::OutputType ot, const int commRank,
│ │ │ -
1046 const int commSize )
│ │ │ -
1047 {
│ │ │ -
1048 // make data mode visible to private functions
│ │ │ -
1049 outputtype=ot;
│ │ │ -
1050
│ │ │ -
1051 // do some magic because paraview can only cope with relative paths to piece files
│ │ │ -
1052 std::ofstream file;
│ │ │ -
1053 file.exceptions(std::ios_base::badbit | std::ios_base::failbit |
│ │ │ -
1054 std::ios_base::eofbit);
│ │ │ -
1055 std::string piecepath = concatPaths(path, extendpath);
│ │ │ -
1056 std::string relpiecepath = relativePath(path, piecepath);
│ │ │ -
1057
│ │ │ -
1058 // write this processes .vtu/.vtp piece file
│ │ │ -
1059 std::string fullname = getParallelPieceName(name, piecepath, commRank,
│ │ │ -
1060 commSize);
│ │ │ -
1061 // check if file can be opened
│ │ │ -
1062 try {
│ │ │ -
1063 file.open(fullname.c_str(),std::ios::binary);
│ │ │ -
1064 }
│ │ │ -
1065 catch(...) {
│ │ │ -
1066 std::cerr << "Filename: " << fullname << " could not be opened" << std::endl;
│ │ │ -
1067 throw;
│ │ │ -
1068 }
│ │ │ -
1069 if (! file.is_open())
│ │ │ -
1070 DUNE_THROW(IOError, "Could not write to piecefile file " << fullname);
│ │ │ -
1071 writeDataFile(file);
│ │ │ -
1072 file.close();
│ │ │ -
1073 gridView_.comm().barrier();
│ │ │ -
1074
│ │ │ -
1075 // if we are rank 0, write .pvtu/.pvtp parallel header
│ │ │ -
1076 fullname = getParallelHeaderName(name, path, commSize);
│ │ │ -
1077 if( commRank ==0 )
│ │ │ -
1078 {
│ │ │ -
1079 file.open(fullname.c_str());
│ │ │ -
1080 if (! file.is_open())
│ │ │ -
1081 DUNE_THROW(IOError, "Could not write to parallel file " << fullname);
│ │ │ -
1082 writeParallelHeader(file,name,relpiecepath, commSize );
│ │ │ -
1083 file.close();
│ │ │ -
1084 }
│ │ │ -
1085 gridView_.comm().barrier();
│ │ │ -
1086 return fullname;
│ │ │ -
1087 }
│ │ │ -
│ │ │ -
1088
│ │ │ -
1089 private:
│ │ │ -
1091
│ │ │ -
1108 void writeParallelHeader(std::ostream& s, const std::string& piecename,
│ │ │ -
1109 const std::string& piecepath, const int commSize)
│ │ │ -
1110 {
│ │ │ -
1111 VTK::FileType fileType =
│ │ │ -
1112 (n == 1) ? VTK::polyData : VTK::unstructuredGrid;
│ │ │ -
1113
│ │ │ -
1114 VTK::PVTUWriter writer(s, fileType);
│ │ │ -
1115
│ │ │ -
1116 writer.beginMain();
│ │ │ -
1117
│ │ │ -
1118 // PPointData
│ │ │ -
1119 {
│ │ │ -
1120 std::string scalars, vectors;
│ │ │ -
1121 std::tie(scalars,vectors) = getDataNames(vertexdata);
│ │ │ -
1122 writer.beginPointData(scalars, vectors);
│ │ │ -
1123 }
│ │ │ -
1124 for (auto it = vertexdata.begin(),
│ │ │ -
1125 end = vertexdata.end();
│ │ │ -
1126 it != end;
│ │ │ -
1127 ++it)
│ │ │ -
1128 {
│ │ │ -
1129 unsigned writecomps = it->fieldInfo().size();
│ │ │ -
1130 // 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 };
│ │ │ +
115 }
│ │ │ +
116
│ │ │ +
117 }
│ │ │ +
118
│ │ │ +
119}
│ │ │
│ │ │ -
1615
│ │ │ -
1616}
│ │ │ -
1617
│ │ │ -
1618#endif
│ │ │ -
Mapper for multiple codim and multiple geometry types.
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
Functions for VTK output.
│ │ │ -
Data array writers for the VTKWriter.
│ │ │ -
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.
│ │ │
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
│ │ │ +
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,1980 +2,139 @@ │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_r_i_d │ │ │ │ * _i_o │ │ │ │ * _f_i_l_e │ │ │ │ - * _v_t_k │ │ │ │ -vtkwriter.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 │ │ │ │ +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{ │ │ │ │ +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 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 {}; │ │ │ │ +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 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 {}; │ │ │ │ +61 } │ │ │ │ +62 │ │ │ │ +63 } │ │ │ │ +64 │ │ │ │ +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 } // 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 // 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; │ │ │ │ +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 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; │ │ │ │ +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 static const _P_a_r_t_i_t_i_o_n_I_t_e_r_a_t_o_r_T_y_p_e VTK_Partition = │ │ │ │ -_I_n_t_e_r_i_o_r_B_o_r_d_e_r___P_a_r_t_i_t_i_o_n; │ │ │ │ -116 //static const PartitionIteratorType VTK_Partition = All_Partition; │ │ │ │ -117 │ │ │ │ -118 typedef typename _G_r_i_d_V_i_e_w_:_:_t_e_m_p_l_a_t_e Codim< 0 > │ │ │ │ -119 ::template Partition< VTK_Partition >::Iterator │ │ │ │ -120 GridCellIterator; │ │ │ │ -121 typedef typename _G_r_i_d_V_i_e_w_:_:_t_e_m_p_l_a_t_e Codim< n > │ │ │ │ -122 ::template Partition< VTK_Partition >::Iterator │ │ │ │ -123 GridVertexIterator; │ │ │ │ -124 │ │ │ │ -125 typedef typename GridCellIterator::Reference EntityReference; │ │ │ │ -126 │ │ │ │ -127 typedef typename _G_r_i_d_V_i_e_w_:_:_t_e_m_p_l_a_t_e Codim< 0 > │ │ │ │ -128 ::Entity::Geometry::LocalCoordinate Coordinate; │ │ │ │ -129 │ │ │ │ -130 typedef _M_u_l_t_i_p_l_e_C_o_d_i_m_M_u_l_t_i_p_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_<_ _G_r_i_d_V_i_e_w_ _> _V_e_r_t_e_x_M_a_p_p_e_r; │ │ │ │ -131 │ │ │ │ -132 // return true if entity should be skipped in Vertex and Corner iterator │ │ │ │ -133 static bool skipEntity( const _P_a_r_t_i_t_i_o_n_T_y_p_e entityType ) │ │ │ │ -134 { │ │ │ │ -135 switch( VTK_Partition ) │ │ │ │ -136 { │ │ │ │ -137 // for All_Partition no entity has to be skipped │ │ │ │ -138 case _A_l_l___P_a_r_t_i_t_i_o_n: return false; │ │ │ │ -139 case _I_n_t_e_r_i_o_r_B_o_r_d_e_r___P_a_r_t_i_t_i_o_n: return ( entityType != _I_n_t_e_r_i_o_r_E_n_t_i_t_y ); │ │ │ │ -140 default: DUNE_THROW(NotImplemented,"Add check for this partition type"); │ │ │ │ -141 } │ │ │ │ -142 return false ; │ │ │ │ -143 } │ │ │ │ -144 │ │ │ │ -145 public: │ │ │ │ -146 │ │ │ │ -_1_4_7 typedef _D_u_n_e_:_:_V_T_K_F_u_n_c_t_i_o_n_<_ _G_r_i_d_V_i_e_w_ _> _V_T_K_F_u_n_c_t_i_o_n; │ │ │ │ -148 │ │ │ │ -149 protected: │ │ │ │ -150 │ │ │ │ -152 │ │ │ │ -_1_5_5 class _V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n │ │ │ │ -156 { │ │ │ │ -157 │ │ │ │ -158 public: │ │ │ │ -159 │ │ │ │ -_1_6_0 typedef _V_T_K_:_:_D_a_t_a_A_r_r_a_y_W_r_i_t_e_r _W_r_i_t_e_r; │ │ │ │ -161 │ │ │ │ -_1_6_3 struct _F_u_n_c_t_i_o_n_W_r_a_p_p_e_r_B_a_s_e │ │ │ │ -164 { │ │ │ │ -165 │ │ │ │ -_1_6_7 virtual void _b_i_n_d(const Entity& e) = 0; │ │ │ │ -168 │ │ │ │ -_1_7_0 virtual void _u_n_b_i_n_d() = 0; │ │ │ │ -171 │ │ │ │ -173 │ │ │ │ -_1_7_6 virtual void _w_r_i_t_e(const Coordinate& pos, _W_r_i_t_e_r& w, std::size_t count) │ │ │ │ -const = 0; │ │ │ │ -177 │ │ │ │ -_1_7_8 virtual _~_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r_B_a_s_e() │ │ │ │ -179 {} │ │ │ │ -180 │ │ │ │ -181 }; │ │ │ │ -182 │ │ │ │ -184 // DUNE_PRIVATE since _f has less visibility │ │ │ │ -185 template │ │ │ │ -_1_8_6 struct DUNE_PRIVATE _F_u_n_c_t_i_o_n_W_r_a_p_p_e_r │ │ │ │ -187 : public _F_u_n_c_t_i_o_n_W_r_a_p_p_e_r_B_a_s_e │ │ │ │ -188 { │ │ │ │ -_1_8_9 using _F_u_n_c_t_i_o_n = typename std::decay::type; │ │ │ │ -190 │ │ │ │ -191 template │ │ │ │ -_1_9_2 _F_u_n_c_t_i_o_n_W_r_a_p_p_e_r(F_&& f) │ │ │ │ -193 : _f(_s_t_d::forward(f)) │ │ │ │ -194 {} │ │ │ │ -195 │ │ │ │ -_1_9_6 virtual void _b_i_n_d(const Entity& e) │ │ │ │ -197 { │ │ │ │ -198 _f.bind(e); │ │ │ │ -199 } │ │ │ │ -200 │ │ │ │ -_2_0_1 virtual void _u_n_b_i_n_d() │ │ │ │ -202 { │ │ │ │ -203 _f.unbind(); │ │ │ │ -204 } │ │ │ │ -205 │ │ │ │ -_2_0_6 virtual void _w_r_i_t_e(const Coordinate& pos, _W_r_i_t_e_r& w, std::size_t count) │ │ │ │ -const │ │ │ │ -207 { │ │ │ │ -208 auto r = _f(pos); │ │ │ │ -209 // we need to do different things here depending on whether r supports │ │ │ │ -indexing into it or not. │ │ │ │ -210 do_write(w,r,count,IsIndexable()); │ │ │ │ -211 } │ │ │ │ -212 │ │ │ │ -213 private: │ │ │ │ -214 │ │ │ │ -215 template │ │ │ │ -216 void do_write(_W_r_i_t_e_r& w, const R& r, std::size_t count, std::true_type) │ │ │ │ -const │ │ │ │ -217 { │ │ │ │ -218 for (std::size_t i = 0; i < count; ++i) │ │ │ │ -219 w._w_r_i_t_e(r[i]); │ │ │ │ -220 } │ │ │ │ -221 │ │ │ │ -222 template │ │ │ │ -223 void do_write(Writer& w, const R& r, std::size_t count, std::false_type) │ │ │ │ -const │ │ │ │ -224 { │ │ │ │ -225 assert(count == 1); │ │ │ │ -226 w.write(r); │ │ │ │ -227 } │ │ │ │ -228 │ │ │ │ -229 Function _f; │ │ │ │ -230 }; │ │ │ │ -231 │ │ │ │ -233 template │ │ │ │ -_2_3_4 struct _G_l_o_b_a_l_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r │ │ │ │ -235 : public _F_u_n_c_t_i_o_n_W_r_a_p_p_e_r_B_a_s_e │ │ │ │ -236 { │ │ │ │ -_2_3_7 using _F_u_n_c_t_i_o_n = typename std::decay::type; │ │ │ │ -238 │ │ │ │ -239 template │ │ │ │ -_2_4_0 _G_l_o_b_a_l_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r(F_&& f) │ │ │ │ -241 : _f(_s_t_d::forward(f)) │ │ │ │ -242 , element_(nullptr) │ │ │ │ -243 {} │ │ │ │ -244 │ │ │ │ -_2_4_5 virtual void _b_i_n_d(const Entity& e) │ │ │ │ -246 { │ │ │ │ -247 element_ = &e; │ │ │ │ -248 } │ │ │ │ -249 │ │ │ │ -_2_5_0 virtual void _u_n_b_i_n_d() │ │ │ │ -251 { │ │ │ │ -252 element_ = nullptr; │ │ │ │ -253 } │ │ │ │ -254 │ │ │ │ -_2_5_5 virtual void _w_r_i_t_e(const Coordinate& pos, _W_r_i_t_e_r& w, std::size_t count) │ │ │ │ -const │ │ │ │ -256 { │ │ │ │ -257 auto globalPos = element_->geometry().global(pos); │ │ │ │ -258 auto r = _f(globalPos); │ │ │ │ -259 if constexpr (IsIndexable()) { │ │ │ │ -260 for (std::size_t i = 0; i < count; ++i) │ │ │ │ -261 w._w_r_i_t_e(r[i]); │ │ │ │ -262 } │ │ │ │ -263 else { │ │ │ │ -264 assert(count == 1); │ │ │ │ -265 w._w_r_i_t_e(r); │ │ │ │ -266 } │ │ │ │ -267 } │ │ │ │ -268 private: │ │ │ │ -269 _F_u_n_c_t_i_o_n _f; │ │ │ │ -270 const Entity* element_; │ │ │ │ -271 }; │ │ │ │ -272 │ │ │ │ -_2_7_4 struct _V_T_K_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r │ │ │ │ -275 : public _F_u_n_c_t_i_o_n_W_r_a_p_p_e_r_B_a_s_e │ │ │ │ -276 { │ │ │ │ -_2_7_7 _V_T_K_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r(const std::shared_ptr< const VTKFunction >& f) │ │ │ │ -278 : _f(f) │ │ │ │ -279 , _entity(nullptr) │ │ │ │ -280 {} │ │ │ │ -281 │ │ │ │ -_2_8_2 virtual void _b_i_n_d(const Entity& e) │ │ │ │ -283 { │ │ │ │ -284 _entity = &e; │ │ │ │ -285 } │ │ │ │ -286 │ │ │ │ -_2_8_7 virtual void _u_n_b_i_n_d() │ │ │ │ -288 { │ │ │ │ -289 _entity = nullptr; │ │ │ │ -290 } │ │ │ │ -291 │ │ │ │ -_2_9_2 virtual void _w_r_i_t_e(const Coordinate& pos, _W_r_i_t_e_r& w, std::size_t count) │ │ │ │ -const │ │ │ │ -293 { │ │ │ │ -294 for (std::size_t i = 0; i < count; ++i) │ │ │ │ -295 w._w_r_i_t_e(_f->evaluate(i,*_entity,pos)); │ │ │ │ -296 } │ │ │ │ -297 │ │ │ │ -298 private: │ │ │ │ -299 │ │ │ │ -300 std::shared_ptr< const VTKFunction > _f; │ │ │ │ -301 const Entity* _entity; │ │ │ │ -302 │ │ │ │ -303 }; │ │ │ │ -304 │ │ │ │ -306 template::value, │ │ │ │ -int> = 0> │ │ │ │ -_3_0_7 _V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n(F&& f, _V_T_K_:_:_F_i_e_l_d_I_n_f_o _f_i_e_l_d_I_n_f_o) │ │ │ │ -308 : ___f(_s_t_d::make_unique<_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r >(_s_t_d::forward(f))) │ │ │ │ -309 , ___f_i_e_l_d_I_n_f_o(_f_i_e_l_d_I_n_f_o) │ │ │ │ -310 {} │ │ │ │ -311 │ │ │ │ -313 // That is, a function that you can create a LocalFunction for, and │ │ │ │ -evaluate that in element coordinates │ │ │ │ -314 template:: │ │ │ │ -value && Impl::HasLocalFunction::value, int> = 0> │ │ │ │ -_3_1_5 _V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n(F&& f, _V_T_K_:_:_F_i_e_l_d_I_n_f_o _f_i_e_l_d_I_n_f_o) │ │ │ │ -316 : ___f(_s_t_d::make_unique< _F_u_n_c_t_i_o_n_W_r_a_p_p_e_r< │ │ │ │ -317 typename _s_t_d::decay(f)))>::type │ │ │ │ -318 > >(localFunction(_s_t_d::forward(f)))) │ │ │ │ -319 , ___f_i_e_l_d_I_n_f_o(_f_i_e_l_d_I_n_f_o) │ │ │ │ -320 {} │ │ │ │ -321 │ │ │ │ -323 // That is, a function that can be evaluated in global coordinates of the │ │ │ │ -domain │ │ │ │ -324 template:: │ │ │ │ -value && not Impl::HasLocalFunction::value, int> = 0> │ │ │ │ -_3_2_5 _V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n(F&& f, _V_T_K_:_:_F_i_e_l_d_I_n_f_o _f_i_e_l_d_I_n_f_o) │ │ │ │ -326 : ___f(_s_t_d::make_unique< _G_l_o_b_a_l_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r >(_s_t_d::forward(f))) │ │ │ │ -327 , ___f_i_e_l_d_I_n_f_o(_f_i_e_l_d_I_n_f_o) │ │ │ │ -328 {} │ │ │ │ -329 │ │ │ │ -_3_3_1 explicit _V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n (const std::shared_ptr< const VTKFunction >& │ │ │ │ -vtkFunctionPtr) │ │ │ │ -332 : ___f(_s_t_d::make_unique<_V_T_K_F_u_n_c_t_i_o_n_W_r_a_p_p_e_r>(vtkFunctionPtr)) │ │ │ │ -333 , ___f_i_e_l_d_I_n_f_o( │ │ │ │ -334 vtkFunctionPtr->_n_a_m_e(), │ │ │ │ -335 (vtkFunctionPtr->ncomps() == 2 || vtkFunctionPtr->ncomps() == 3) ? VTK:: │ │ │ │ -FieldInfo::Type::vector : VTK::FieldInfo::Type::scalar, │ │ │ │ -336 vtkFunctionPtr->ncomps(), │ │ │ │ -337 vtkFunctionPtr->precision() │ │ │ │ -338 ) │ │ │ │ -339 {} │ │ │ │ -340 │ │ │ │ -_3_4_2 std::string _n_a_m_e() const │ │ │ │ -343 { │ │ │ │ -344 return _f_i_e_l_d_I_n_f_o()._n_a_m_e(); │ │ │ │ -345 } │ │ │ │ -346 │ │ │ │ -_3_4_8 const _V_T_K_:_:_F_i_e_l_d_I_n_f_o& _f_i_e_l_d_I_n_f_o() const │ │ │ │ -349 { │ │ │ │ -350 return ___f_i_e_l_d_I_n_f_o; │ │ │ │ -351 } │ │ │ │ -352 │ │ │ │ -_3_5_4 void _b_i_n_d(const Entity& e) const │ │ │ │ -355 { │ │ │ │ -356 ___f->bind(e); │ │ │ │ -357 } │ │ │ │ -358 │ │ │ │ -_3_6_0 void _u_n_b_i_n_d() const │ │ │ │ -361 { │ │ │ │ -362 ___f->unbind(); │ │ │ │ -363 } │ │ │ │ -364 │ │ │ │ -_3_6_6 void _w_r_i_t_e(const Coordinate& pos, _W_r_i_t_e_r& w) const │ │ │ │ -367 { │ │ │ │ -368 ___f->write(pos,w,_f_i_e_l_d_I_n_f_o().size()); │ │ │ │ -369 } │ │ │ │ -370 │ │ │ │ -_3_7_1 std::shared_ptr ___f; │ │ │ │ -_3_7_2 _V_T_K_:_:_F_i_e_l_d_I_n_f_o ___f_i_e_l_d_I_n_f_o; │ │ │ │ -373 │ │ │ │ -374 }; │ │ │ │ -375 │ │ │ │ -_3_7_6 typedef typename std::list::const_iterator │ │ │ │ -_F_u_n_c_t_i_o_n_I_t_e_r_a_t_o_r; │ │ │ │ -377 │ │ │ │ -379 │ │ │ │ -_3_8_4 class _C_e_l_l_I_t_e_r_a_t_o_r : public GridCellIterator │ │ │ │ -385 { │ │ │ │ -386 public: │ │ │ │ -_3_8_8 _C_e_l_l_I_t_e_r_a_t_o_r(const GridCellIterator & x) : GridCellIterator(x) {} │ │ │ │ -_3_9_1 const FieldVector _p_o_s_i_t_i_o_n() const │ │ │ │ -392 { │ │ │ │ -393 return ReferenceElements::general((*this)->type()).position(0,0); │ │ │ │ -394 } │ │ │ │ -395 }; │ │ │ │ -396 │ │ │ │ -_3_9_7 _C_e_l_l_I_t_e_r_a_t_o_r _c_e_l_l_B_e_g_i_n() const │ │ │ │ -398 { │ │ │ │ -399 return _g_r_i_d_V_i_e_w__.template begin< 0, VTK_Partition >(); │ │ │ │ -400 } │ │ │ │ -401 │ │ │ │ -_4_0_2 _C_e_l_l_I_t_e_r_a_t_o_r _c_e_l_l_E_n_d() const │ │ │ │ -403 { │ │ │ │ -404 return _g_r_i_d_V_i_e_w__.template end< 0, VTK_Partition >(); │ │ │ │ -405 } │ │ │ │ -406 │ │ │ │ -408 │ │ │ │ -_4_2_2 class _V_e_r_t_e_x_I_t_e_r_a_t_o_r : │ │ │ │ -423 public ForwardIteratorFacade │ │ │ │ -424 { │ │ │ │ -425 GridCellIterator git; │ │ │ │ -426 GridCellIterator gend; │ │ │ │ -427 _V_T_K_:_:_D_a_t_a_M_o_d_e datamode; │ │ │ │ -428 // Index of the currently visited corner within the current element. │ │ │ │ -429 // NOTE: this is in Dune-numbering, in contrast to CornerIterator. │ │ │ │ -430 int cornerIndexDune; │ │ │ │ -431 const _V_e_r_t_e_x_M_a_p_p_e_r & vertexmapper; │ │ │ │ -432 std::vector visited; │ │ │ │ -433 // in conforming mode, for each vertex id (as obtained by vertexmapper) │ │ │ │ -434 // hold its number in the iteration order (VertexIterator) │ │ │ │ -435 int offset; │ │ │ │ -436 │ │ │ │ -437 // hide operator -> │ │ │ │ -438 void operator->(); │ │ │ │ -439 protected: │ │ │ │ -_4_4_0 void _b_a_s_i_c_I_n_c_r_e_m_e_n_t () │ │ │ │ -441 { │ │ │ │ -442 if( git == gend ) │ │ │ │ -443 return; │ │ │ │ -444 ++cornerIndexDune; │ │ │ │ -445 const int numCorners = git->subEntities(n); │ │ │ │ -446 if( cornerIndexDune == numCorners ) │ │ │ │ -447 { │ │ │ │ -448 offset += numCorners; │ │ │ │ -449 cornerIndexDune = 0; │ │ │ │ -450 │ │ │ │ -451 ++git; │ │ │ │ -452 while( (git != gend) && skipEntity( git->partitionType() ) ) │ │ │ │ -453 ++git; │ │ │ │ -454 } │ │ │ │ -455 } │ │ │ │ -456 public: │ │ │ │ -_4_5_7 _V_e_r_t_e_x_I_t_e_r_a_t_o_r(const GridCellIterator & x, │ │ │ │ -458 const GridCellIterator & end, │ │ │ │ -459 const _V_T_K_:_:_D_a_t_a_M_o_d_e & dm, │ │ │ │ -460 const _V_e_r_t_e_x_M_a_p_p_e_r & vm) : │ │ │ │ -461 git(x), gend(end), datamode(dm), cornerIndexDune(0), │ │ │ │ -462 vertexmapper(vm), visited(vm.size(), false), │ │ │ │ -463 offset(0) │ │ │ │ -464 { │ │ │ │ -465 if (datamode == _V_T_K_:_:_c_o_n_f_o_r_m_i_n_g && git != gend) │ │ │ │ -466 visited[vertexmapper._s_u_b_I_n_d_e_x(*git,cornerIndexDune,n)] = true; │ │ │ │ -467 } │ │ │ │ -_4_6_8 void _i_n_c_r_e_m_e_n_t () │ │ │ │ -469 { │ │ │ │ -470 switch (datamode) │ │ │ │ -471 { │ │ │ │ -472 case _V_T_K_:_:_c_o_n_f_o_r_m_i_n_g : │ │ │ │ -473 while(visited[vertexmapper._s_u_b_I_n_d_e_x(*git,cornerIndexDune,n)]) │ │ │ │ -474 { │ │ │ │ -475 _b_a_s_i_c_I_n_c_r_e_m_e_n_t(); │ │ │ │ -476 if (git == gend) return; │ │ │ │ -477 } │ │ │ │ -478 visited[vertexmapper._s_u_b_I_n_d_e_x(*git,cornerIndexDune,n)] = true; │ │ │ │ -479 break; │ │ │ │ -480 case _V_T_K_:_:_n_o_n_c_o_n_f_o_r_m_i_n_g : │ │ │ │ -481 _b_a_s_i_c_I_n_c_r_e_m_e_n_t(); │ │ │ │ -482 break; │ │ │ │ -483 } │ │ │ │ -484 } │ │ │ │ -_4_8_5 bool _e_q_u_a_l_s (const _V_e_r_t_e_x_I_t_e_r_a_t_o_r & cit) const │ │ │ │ -486 { │ │ │ │ -487 return git == cit.git │ │ │ │ -488 && cornerIndexDune == cit.cornerIndexDune │ │ │ │ -489 && datamode == cit.datamode; │ │ │ │ -490 } │ │ │ │ -_4_9_1 EntityReference _d_e_r_e_f_e_r_e_n_c_e() const │ │ │ │ -492 { │ │ │ │ -493 return *git; │ │ │ │ -494 } │ │ │ │ -_4_9_6 int _l_o_c_a_l_i_n_d_e_x () const │ │ │ │ -497 { │ │ │ │ -498 return cornerIndexDune; │ │ │ │ -499 } │ │ │ │ -_5_0_1 FieldVector _p_o_s_i_t_i_o_n () const │ │ │ │ -502 { │ │ │ │ -503 return referenceElement(git->type()) │ │ │ │ -504 .position(cornerIndexDune,n); │ │ │ │ -505 } │ │ │ │ -506 }; │ │ │ │ -507 │ │ │ │ -_5_0_8 _V_e_r_t_e_x_I_t_e_r_a_t_o_r _v_e_r_t_e_x_B_e_g_i_n () const │ │ │ │ -509 { │ │ │ │ -510 return _V_e_r_t_e_x_I_t_e_r_a_t_o_r( _g_r_i_d_V_i_e_w__.template begin< 0, VTK_Partition >(), │ │ │ │ -511 _g_r_i_d_V_i_e_w__.template end< 0, VTK_Partition >(), │ │ │ │ -512 datamode, *vertexmapper ); │ │ │ │ -513 } │ │ │ │ -514 │ │ │ │ -_5_1_5 _V_e_r_t_e_x_I_t_e_r_a_t_o_r _v_e_r_t_e_x_E_n_d () const │ │ │ │ -516 { │ │ │ │ -517 return _V_e_r_t_e_x_I_t_e_r_a_t_o_r( _g_r_i_d_V_i_e_w__.template end< 0, VTK_Partition >(), │ │ │ │ -518 _g_r_i_d_V_i_e_w__.template end< 0, VTK_Partition >(), │ │ │ │ -519 datamode, *vertexmapper ); │ │ │ │ -520 } │ │ │ │ -521 │ │ │ │ -523 │ │ │ │ -_5_3_7 class _C_o_r_n_e_r_I_t_e_r_a_t_o_r : │ │ │ │ -538 public ForwardIteratorFacade │ │ │ │ -539 { │ │ │ │ -540 GridCellIterator git; │ │ │ │ -541 GridCellIterator gend; │ │ │ │ -542 _V_T_K_:_:_D_a_t_a_M_o_d_e datamode; │ │ │ │ -543 // Index of the currently visited corner within the current element. │ │ │ │ -544 // NOTE: this is in VTK-numbering, in contrast to VertexIterator. │ │ │ │ -545 int cornerIndexVTK; │ │ │ │ -546 const _V_e_r_t_e_x_M_a_p_p_e_r & vertexmapper; │ │ │ │ -547 // in conforming mode, for each vertex id (as obtained by vertexmapper) │ │ │ │ -548 // hold its number in the iteration order of VertexIterator (*not* │ │ │ │ -549 // CornerIterator) │ │ │ │ -550 const std::vector & number; │ │ │ │ -551 // holds the number of corners of all the elements we have seen so far, │ │ │ │ -552 // excluding the current element │ │ │ │ -553 int offset; │ │ │ │ -554 │ │ │ │ -555 // hide operator -> │ │ │ │ -556 void operator->(); │ │ │ │ -557 public: │ │ │ │ -_5_5_8 _C_o_r_n_e_r_I_t_e_r_a_t_o_r(const GridCellIterator & x, │ │ │ │ -559 const GridCellIterator & end, │ │ │ │ -560 const _V_T_K_:_:_D_a_t_a_M_o_d_e & dm, │ │ │ │ -561 const _V_e_r_t_e_x_M_a_p_p_e_r & vm, │ │ │ │ -562 const std::vector & num) : │ │ │ │ -563 git(x), gend(end), datamode(dm), cornerIndexVTK(0), │ │ │ │ -564 vertexmapper(vm), │ │ │ │ -565 number(num), offset(0) {} │ │ │ │ -_5_6_6 void _i_n_c_r_e_m_e_n_t () │ │ │ │ -567 { │ │ │ │ -568 if( git == gend ) │ │ │ │ -569 return; │ │ │ │ -570 ++cornerIndexVTK; │ │ │ │ -571 const int numCorners = git->subEntities(n); │ │ │ │ -572 if( cornerIndexVTK == numCorners ) │ │ │ │ -573 { │ │ │ │ -574 offset += numCorners; │ │ │ │ -575 cornerIndexVTK = 0; │ │ │ │ -576 │ │ │ │ -577 ++git; │ │ │ │ -578 while( (git != gend) && skipEntity( git->partitionType() ) ) │ │ │ │ -579 ++git; │ │ │ │ -580 } │ │ │ │ -581 } │ │ │ │ -_5_8_2 bool _e_q_u_a_l_s (const _C_o_r_n_e_r_I_t_e_r_a_t_o_r & cit) const │ │ │ │ -583 { │ │ │ │ -584 return git == cit.git │ │ │ │ -585 && cornerIndexVTK == cit.cornerIndexVTK │ │ │ │ -586 && datamode == cit.datamode; │ │ │ │ -587 } │ │ │ │ -_5_8_8 EntityReference _d_e_r_e_f_e_r_e_n_c_e() const │ │ │ │ -589 { │ │ │ │ -590 return *git; │ │ │ │ -591 } │ │ │ │ -593 │ │ │ │ -_5_9_7 int _i_d () const │ │ │ │ -598 { │ │ │ │ -599 switch (datamode) │ │ │ │ -600 { │ │ │ │ -601 case _V_T_K_:_:_c_o_n_f_o_r_m_i_n_g : │ │ │ │ -602 return │ │ │ │ -603 number[vertexmapper._s_u_b_I_n_d_e_x(*git,_V_T_K_:_:_r_e_n_u_m_b_e_r(*git,cornerIndexVTK), │ │ │ │ -604 n)]; │ │ │ │ -605 case _V_T_K_:_:_n_o_n_c_o_n_f_o_r_m_i_n_g : │ │ │ │ -606 return offset + _V_T_K_:_:_r_e_n_u_m_b_e_r(*git,cornerIndexVTK); │ │ │ │ -607 default : │ │ │ │ -608 DUNE_THROW(IOError,"VTKWriter: unsupported DataMode" << datamode); │ │ │ │ -609 } │ │ │ │ -610 } │ │ │ │ -611 }; │ │ │ │ -612 │ │ │ │ -_6_1_3 _C_o_r_n_e_r_I_t_e_r_a_t_o_r _c_o_r_n_e_r_B_e_g_i_n () const │ │ │ │ -614 { │ │ │ │ -615 return _C_o_r_n_e_r_I_t_e_r_a_t_o_r( _g_r_i_d_V_i_e_w__.template begin< 0, VTK_Partition >(), │ │ │ │ -616 _g_r_i_d_V_i_e_w__.template end< 0, VTK_Partition >(), │ │ │ │ -617 datamode, *vertexmapper, number ); │ │ │ │ -618 } │ │ │ │ -619 │ │ │ │ -_6_2_0 _C_o_r_n_e_r_I_t_e_r_a_t_o_r _c_o_r_n_e_r_E_n_d () const │ │ │ │ -621 { │ │ │ │ -622 return _C_o_r_n_e_r_I_t_e_r_a_t_o_r( _g_r_i_d_V_i_e_w__.template end< 0, VTK_Partition >(), │ │ │ │ -623 _g_r_i_d_V_i_e_w__.template end< 0, VTK_Partition >(), │ │ │ │ -624 datamode, *vertexmapper, number ); │ │ │ │ -625 } │ │ │ │ -626 │ │ │ │ -627 public: │ │ │ │ -_6_3_6 explicit _V_T_K_W_r_i_t_e_r ( const _G_r_i_d_V_i_e_w &gridView, │ │ │ │ -637 _V_T_K_:_:_D_a_t_a_M_o_d_e dm = _V_T_K_:_:_c_o_n_f_o_r_m_i_n_g, │ │ │ │ -638 _V_T_K_:_:_P_r_e_c_i_s_i_o_n _c_o_o_r_d_P_r_e_c_i_s_i_o_n = _V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2) │ │ │ │ -639 : _g_r_i_d_V_i_e_w__( gridView ), │ │ │ │ -640 datamode( dm ), │ │ │ │ -641 coordPrec (_c_o_o_r_d_P_r_e_c_i_s_i_o_n), │ │ │ │ -642 polyhedralCellsPresent_( _c_h_e_c_k_F_o_r_P_o_l_y_h_e_d_r_a_l_C_e_l_l_s() ) │ │ │ │ -643 { } │ │ │ │ -644 │ │ │ │ -_6_4_9 void _a_d_d_C_e_l_l_D_a_t_a (const std::shared_ptr< const VTKFunction > & p) │ │ │ │ -650 { │ │ │ │ -651 _c_e_l_l_d_a_t_a.push_back(_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n(p)); │ │ │ │ -652 } │ │ │ │ -653 │ │ │ │ -673 template │ │ │ │ -_6_7_4 void _a_d_d_C_e_l_l_D_a_t_a(F&& f, _V_T_K_:_:_F_i_e_l_d_I_n_f_o vtkFieldInfo) │ │ │ │ -675 { │ │ │ │ -676 _c_e_l_l_d_a_t_a.push_back(_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n(std::forward(f),vtkFieldInfo)); │ │ │ │ -677 } │ │ │ │ -678 │ │ │ │ -694 template │ │ │ │ -_6_9_5 void _a_d_d_C_e_l_l_D_a_t_a (const Container& v, const std::string &name, int ncomps = │ │ │ │ -1, │ │ │ │ -696 _V_T_K_:_:_P_r_e_c_i_s_i_o_n prec = _V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2) │ │ │ │ -697 { │ │ │ │ -698 typedef _P_0_V_T_K_F_u_n_c_t_i_o_n_<_G_r_i_d_V_i_e_w_,_ _C_o_n_t_a_i_n_e_r_> Function; │ │ │ │ -699 for (int c=0; c1) │ │ │ │ -703 compName << "[" << c << "]"; │ │ │ │ -704 _V_T_K_F_u_n_c_t_i_o_n* p = new Function(_g_r_i_d_V_i_e_w__, v, compName.str(), ncomps, c, │ │ │ │ -prec); │ │ │ │ -705 _a_d_d_C_e_l_l_D_a_t_a(std::shared_ptr< const VTKFunction >(p)); │ │ │ │ -706 } │ │ │ │ -707 } │ │ │ │ -708 │ │ │ │ -_7_1_3 void _a_d_d_V_e_r_t_e_x_D_a_t_a (const std::shared_ptr< const VTKFunction > & p) │ │ │ │ -714 { │ │ │ │ -715 _v_e_r_t_e_x_d_a_t_a.push_back(_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n(p)); │ │ │ │ -716 } │ │ │ │ -717 │ │ │ │ -737 template │ │ │ │ -_7_3_8 void _a_d_d_V_e_r_t_e_x_D_a_t_a(F&& f, _V_T_K_:_:_F_i_e_l_d_I_n_f_o vtkFieldInfo) │ │ │ │ -739 { │ │ │ │ -740 _v_e_r_t_e_x_d_a_t_a.push_back(_V_T_K_L_o_c_a_l_F_u_n_c_t_i_o_n(std::forward(f),vtkFieldInfo)); │ │ │ │ -741 } │ │ │ │ -742 │ │ │ │ -743 │ │ │ │ -759 template │ │ │ │ -_7_6_0 void _a_d_d_V_e_r_t_e_x_D_a_t_a (const Container& v, const std::string &name, int │ │ │ │ -ncomps=1, │ │ │ │ -761 _V_T_K_:_:_P_r_e_c_i_s_i_o_n prec = _V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2) │ │ │ │ -762 { │ │ │ │ -763 typedef _P_1_V_T_K_F_u_n_c_t_i_o_n_<_G_r_i_d_V_i_e_w_,_ _C_o_n_t_a_i_n_e_r_> Function; │ │ │ │ -764 for (int c=0; c1) │ │ │ │ -768 compName << "[" << c << "]"; │ │ │ │ -769 _V_T_K_F_u_n_c_t_i_o_n* p = new Function(_g_r_i_d_V_i_e_w__, v, compName.str(), ncomps, c, │ │ │ │ -prec); │ │ │ │ -770 _a_d_d_V_e_r_t_e_x_D_a_t_a(std::shared_ptr< const VTKFunction >(p)); │ │ │ │ -771 } │ │ │ │ -772 } │ │ │ │ -773 │ │ │ │ -_7_7_5 void _c_l_e_a_r () │ │ │ │ -776 { │ │ │ │ -777 _c_e_l_l_d_a_t_a.clear(); │ │ │ │ -778 _v_e_r_t_e_x_d_a_t_a.clear(); │ │ │ │ -779 } │ │ │ │ -780 │ │ │ │ -_7_8_2 _V_T_K_:_:_P_r_e_c_i_s_i_o_n _c_o_o_r_d_P_r_e_c_i_s_i_o_n() const │ │ │ │ -783 { return coordPrec; } │ │ │ │ -784 │ │ │ │ -_7_8_6 virtual _~_V_T_K_W_r_i_t_e_r () │ │ │ │ -787 { │ │ │ │ -788 this->_c_l_e_a_r(); │ │ │ │ -789 } │ │ │ │ -790 │ │ │ │ -_8_0_3 std::string _w_r_i_t_e ( const std::string &name, │ │ │ │ -804 _V_T_K_:_:_O_u_t_p_u_t_T_y_p_e type = _V_T_K_:_:_a_s_c_i_i ) │ │ │ │ -805 { │ │ │ │ -806 return _w_r_i_t_e( name, type, _g_r_i_d_V_i_e_w__._c_o_m_m().rank(), _g_r_i_d_V_i_e_w__._c_o_m_m().size() │ │ │ │ -); │ │ │ │ -807 } │ │ │ │ -808 │ │ │ │ -_8_3_5 std::string _p_w_r_i_t_e ( const std::string & name, const std::string & path, │ │ │ │ -const std::string & extendpath, │ │ │ │ -836 _V_T_K_:_:_O_u_t_p_u_t_T_y_p_e type = _V_T_K_:_:_a_s_c_i_i ) │ │ │ │ -837 { │ │ │ │ -838 return _p_w_r_i_t_e( name, path, extendpath, type, _g_r_i_d_V_i_e_w__._c_o_m_m().rank(), │ │ │ │ -_g_r_i_d_V_i_e_w__._c_o_m_m().size() ); │ │ │ │ -839 } │ │ │ │ -840 │ │ │ │ -841 protected: │ │ │ │ -843 │ │ │ │ -_8_5_5 std::string _g_e_t_P_a_r_a_l_l_e_l_P_i_e_c_e_N_a_m_e(const std::string& name, │ │ │ │ -856 const std::string& path, │ │ │ │ -857 int commRank, int commSize) const │ │ │ │ -858 { │ │ │ │ -859 std::ostringstream s; │ │ │ │ -860 // write path first │ │ │ │ -861 if(path.size() > 0) │ │ │ │ -862 { │ │ │ │ -863 s << path; │ │ │ │ -864 if(path[path.size()-1] != '/') │ │ │ │ -865 s << '/'; │ │ │ │ -866 } │ │ │ │ -867 │ │ │ │ -868 std::string fileprefix; │ │ │ │ -869 // check if a path was already added to name │ │ │ │ -870 // and if yes find filename without path │ │ │ │ -871 auto pos = name.rfind('/'); │ │ │ │ -872 if( pos != std::string::npos ) │ │ │ │ -873 { │ │ │ │ -874 // extract filename without path │ │ │ │ -875 fileprefix = name.substr( pos+1 ); │ │ │ │ -876 // extract the path and added it before │ │ │ │ -877 // the magic below is added │ │ │ │ -878 std::string newpath = name.substr(0, pos); │ │ │ │ -879 s << newpath; │ │ │ │ -880 if(newpath[name.size()-1] != '/') │ │ │ │ -881 s << '/'; │ │ │ │ -882 } │ │ │ │ -883 else │ │ │ │ -884 { │ │ │ │ -885 // if no path was found just copy the name │ │ │ │ -886 fileprefix = name; │ │ │ │ -887 } │ │ │ │ -888 │ │ │ │ -889 s << 's' << std::setw(4) << std::setfill('0') << commSize << '-'; │ │ │ │ -890 const bool writeHeader = commRank < 0; │ │ │ │ -891 if( ! writeHeader ) │ │ │ │ -892 { │ │ │ │ -893 s << 'p' << std::setw(4) << std::setfill('0') << commRank << '-'; │ │ │ │ -894 } │ │ │ │ -895 │ │ │ │ -896 s << fileprefix << "."; │ │ │ │ -897 // write p for header files │ │ │ │ -898 if( writeHeader ) │ │ │ │ -899 s << "p"; │ │ │ │ -900 s << "vt"; │ │ │ │ -901 │ │ │ │ -902 if(_G_r_i_d_V_i_e_w_:_:_d_i_m_e_n_s_i_o_n > 1) │ │ │ │ -903 s << "u"; │ │ │ │ -904 else │ │ │ │ -905 s << "p"; │ │ │ │ -906 return s.str(); │ │ │ │ -907 } │ │ │ │ -908 │ │ │ │ -910 │ │ │ │ -_9_2_0 std::string _g_e_t_P_a_r_a_l_l_e_l_H_e_a_d_e_r_N_a_m_e(const std::string& name, │ │ │ │ -921 const std::string& path, │ │ │ │ -922 int commSize) const │ │ │ │ -923 { │ │ │ │ -924 return _g_e_t_P_a_r_a_l_l_e_l_P_i_e_c_e_N_a_m_e( name, path, -1, commSize ); │ │ │ │ -925 } │ │ │ │ -926 │ │ │ │ -928 │ │ │ │ -_9_4_0 std::string _g_e_t_S_e_r_i_a_l_P_i_e_c_e_N_a_m_e(const std::string& name, │ │ │ │ -941 const std::string& path) const │ │ │ │ -942 { │ │ │ │ -943 static const std::string extension = │ │ │ │ -944 _G_r_i_d_V_i_e_w_:_:_d_i_m_e_n_s_i_o_n == 1 ? ".vtp" : ".vtu"; │ │ │ │ -945 │ │ │ │ -946 return concatPaths(path, name+extension); │ │ │ │ -947 } │ │ │ │ -948 │ │ │ │ -_9_6_5 std::string _w_r_i_t_e ( const std::string &name, │ │ │ │ -966 _V_T_K_:_:_O_u_t_p_u_t_T_y_p_e type, │ │ │ │ -967 const int commRank, │ │ │ │ -968 const int commSize ) │ │ │ │ -969 { │ │ │ │ -970 // in the parallel case, just use pwrite, it has all the necessary │ │ │ │ -971 // stuff, so we don't need to reimplement it here. │ │ │ │ -972 if(commSize > 1) │ │ │ │ -973 { │ │ │ │ -974 std::string filename = name; │ │ │ │ -975 std::string path = std::string(""); │ │ │ │ -976 │ │ │ │ -977 // check if a path was already added to name │ │ │ │ -978 // and if yes find filename without path │ │ │ │ -979 auto pos = name.rfind('/'); │ │ │ │ -980 if( pos != std::string::npos ) │ │ │ │ -981 { │ │ │ │ -982 // extract filename without path │ │ │ │ -983 filename = name.substr( pos+1 ); │ │ │ │ -984 │ │ │ │ -985 // extract the path and added it before │ │ │ │ -986 // the magic below is added │ │ │ │ -987 path = name.substr(0, pos); │ │ │ │ -988 } │ │ │ │ -989 │ │ │ │ -990 return _p_w_r_i_t_e(filename, path, "", type, commRank, commSize); │ │ │ │ -991 } │ │ │ │ -992 │ │ │ │ -993 // make data mode visible to private functions │ │ │ │ -994 _o_u_t_p_u_t_t_y_p_e = type; │ │ │ │ -995 │ │ │ │ -996 // generate filename for process data │ │ │ │ -997 std::string pieceName = _g_e_t_S_e_r_i_a_l_P_i_e_c_e_N_a_m_e(name, ""); │ │ │ │ -998 │ │ │ │ -999 // write process data │ │ │ │ -1000 std::ofstream file; │ │ │ │ -1001 file.exceptions(std::ios_base::badbit | std::ios_base::failbit | │ │ │ │ -1002 std::ios_base::eofbit); │ │ │ │ -1003 // check if file can be opened │ │ │ │ -1004 try { │ │ │ │ -1005 file.open( pieceName.c_str(), std::ios::binary ); │ │ │ │ -1006 } │ │ │ │ -1007 catch(...) { │ │ │ │ -1008 std::cerr << "Filename: " << pieceName << " could not be opened" << std:: │ │ │ │ -endl; │ │ │ │ -1009 throw; │ │ │ │ -1010 } │ │ │ │ -1011 if (! file.is_open()) │ │ │ │ -1012 DUNE_THROW(IOError, "Could not write to piece file " << pieceName); │ │ │ │ -1013 writeDataFile( file ); │ │ │ │ -1014 file.close(); │ │ │ │ -1015 │ │ │ │ -1016 return pieceName; │ │ │ │ -1017 } │ │ │ │ -1018 │ │ │ │ -1020 │ │ │ │ -_1_0_4_3 std::string _p_w_r_i_t_e(const std::string& name, const std::string& path, │ │ │ │ -1044 const std::string& extendpath, │ │ │ │ -1045 _V_T_K_:_:_O_u_t_p_u_t_T_y_p_e ot, const int commRank, │ │ │ │ -1046 const int commSize ) │ │ │ │ -1047 { │ │ │ │ -1048 // make data mode visible to private functions │ │ │ │ -1049 _o_u_t_p_u_t_t_y_p_e=ot; │ │ │ │ -1050 │ │ │ │ -1051 // do some magic because paraview can only cope with relative paths to │ │ │ │ -piece files │ │ │ │ -1052 std::ofstream file; │ │ │ │ -1053 file.exceptions(std::ios_base::badbit | std::ios_base::failbit | │ │ │ │ -1054 std::ios_base::eofbit); │ │ │ │ -1055 std::string piecepath = concatPaths(path, extendpath); │ │ │ │ -1056 std::string relpiecepath = relativePath(path, piecepath); │ │ │ │ -1057 │ │ │ │ -1058 // write this processes .vtu/.vtp piece file │ │ │ │ -1059 std::string fullname = _g_e_t_P_a_r_a_l_l_e_l_P_i_e_c_e_N_a_m_e(name, piecepath, commRank, │ │ │ │ -1060 commSize); │ │ │ │ -1061 // check if file can be opened │ │ │ │ -1062 try { │ │ │ │ -1063 file.open(fullname.c_str(),std::ios::binary); │ │ │ │ -1064 } │ │ │ │ -1065 catch(...) { │ │ │ │ -1066 std::cerr << "Filename: " << fullname << " could not be opened" << std:: │ │ │ │ -endl; │ │ │ │ -1067 throw; │ │ │ │ -1068 } │ │ │ │ -1069 if (! file.is_open()) │ │ │ │ -1070 DUNE_THROW(IOError, "Could not write to piecefile file " << fullname); │ │ │ │ -1071 writeDataFile(file); │ │ │ │ -1072 file.close(); │ │ │ │ -1073 _g_r_i_d_V_i_e_w__._c_o_m_m().barrier(); │ │ │ │ -1074 │ │ │ │ -1075 // if we are rank 0, write .pvtu/.pvtp parallel header │ │ │ │ -1076 fullname = _g_e_t_P_a_r_a_l_l_e_l_H_e_a_d_e_r_N_a_m_e(name, path, commSize); │ │ │ │ -1077 if( commRank ==0 ) │ │ │ │ -1078 { │ │ │ │ -1079 file.open(fullname.c_str()); │ │ │ │ -1080 if (! file.is_open()) │ │ │ │ -1081 DUNE_THROW(IOError, "Could not write to parallel file " << fullname); │ │ │ │ -1082 writeParallelHeader(file,name,relpiecepath, commSize ); │ │ │ │ -1083 file.close(); │ │ │ │ -1084 } │ │ │ │ -1085 _g_r_i_d_V_i_e_w__._c_o_m_m().barrier(); │ │ │ │ -1086 return fullname; │ │ │ │ -1087 } │ │ │ │ -1088 │ │ │ │ -1089 private: │ │ │ │ -1091 │ │ │ │ -1108 void writeParallelHeader(std::ostream& s, const std::string& piecename, │ │ │ │ -1109 const std::string& piecepath, const int commSize) │ │ │ │ -1110 { │ │ │ │ -1111 _V_T_K_:_:_F_i_l_e_T_y_p_e fileType = │ │ │ │ -1112 (n == 1) ? _V_T_K_:_:_p_o_l_y_D_a_t_a : VTK::unstructuredGrid; │ │ │ │ -1113 │ │ │ │ -1114 _V_T_K_:_:_P_V_T_U_W_r_i_t_e_r writer(s, fileType); │ │ │ │ -1115 │ │ │ │ -1116 writer.beginMain(); │ │ │ │ -1117 │ │ │ │ -1118 // PPointData │ │ │ │ -1119 { │ │ │ │ -1120 std::string scalars, vectors; │ │ │ │ -1121 std::tie(scalars,vectors) = _g_e_t_D_a_t_a_N_a_m_e_s(_v_e_r_t_e_x_d_a_t_a); │ │ │ │ -1122 writer.beginPointData(scalars, vectors); │ │ │ │ -1123 } │ │ │ │ -1124 for (auto it = _v_e_r_t_e_x_d_a_t_a.begin(), │ │ │ │ -1125 end = _v_e_r_t_e_x_d_a_t_a.end(); │ │ │ │ -1126 it != end; │ │ │ │ -1127 ++it) │ │ │ │ -1128 { │ │ │ │ -1129 unsigned writecomps = it->fieldInfo().size(); │ │ │ │ -1130 // 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 │ │ │ │ -_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 │ │ │ │ -_f_u_n_c_t_i_o_n_._h_h │ │ │ │ -Functions for VTK output. │ │ │ │ -_d_a_t_a_a_r_r_a_y_w_r_i_t_e_r_._h_h │ │ │ │ -Data array writers for the VTKWriter. │ │ │ │ -_c_o_m_m_o_n_._h_h │ │ │ │ -Common stuff for the VTKWriter. │ │ │ │ -_D_u_n_e_:_:_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 │ │ │ │ +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_:_:_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_:_:_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 │ │ │ │ +_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/a00767.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: vtksequencewriterbase.hh File Reference │ │ │ +dune-grid: dgfgridfactory.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,40 +65,40 @@ │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
vtksequencewriterbase.hh File Reference
│ │ │ +
dgfgridfactory.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>
│ │ │ +
#include <iostream>
│ │ │ +#include <string>
│ │ │ +#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::VTKSequenceWriterBase< GridView >
 Base class to write pvd-files which contains a list of all collected vtk-files. More...
struct  Dune::DGFGridFactory< G >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -2,31 +2,30 @@ │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_r_i_d │ │ │ │ * _i_o │ │ │ │ * _f_i_l_e │ │ │ │ - * _v_t_k │ │ │ │ + * _d_g_f_p_a_r_s_e_r │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -vtksequencewriterbase.hh File Reference │ │ │ │ -#include │ │ │ │ +dgfgridfactory.hh File Reference │ │ │ │ #include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_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_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_d_g_f_e_x_c_e_p_t_i_o_n_._h_h> │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_m_a_c_r_o_g_r_i_d_._h_h> │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_p_a_r_s_e_r_._h_h> │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_i_n_t_e_r_s_e_c_t_i_o_n_._h_h> │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -class   _D_u_n_e_:_:_V_T_K_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_:_:_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. │ │ │ │   │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00767_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: vtksequencewriterbase.hh Source File │ │ │ +dune-grid: dgfgridfactory.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,209 +70,271 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
vtksequencewriterbase.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
│ │ │ -
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
│ │ │ - │ │ │ +
5#ifndef DUNE_DGF_GRIDFACTORY_HH
│ │ │ +
6#define DUNE_DGF_GRIDFACTORY_HH
│ │ │ +
7
│ │ │ +
8#include <iostream>
│ │ │ +
9#include <string>
│ │ │ +
10#include <vector>
│ │ │ +
11#include <map>
│ │ │ +
12#include <assert.h>
│ │ │ +
13
│ │ │ +
14#include <dune/common/parallel/mpihelper.hh>
│ │ │ + │ │ │ + │ │ │ +
17
│ │ │ + │ │ │ + │ │ │
20
│ │ │ -
21namespace Dune {
│ │ │ -
22
│ │ │ -
32 template<class GridView>
│ │ │ -
│ │ │ - │ │ │ -
34 {
│ │ │ -
35 std::shared_ptr<VTKWriter<GridView> > vtkWriter_;
│ │ │ -
36 std::vector<double> timesteps_;
│ │ │ -
37 std::string name_,path_,extendpath_;
│ │ │ -
38 int rank_;
│ │ │ -
39 int size_;
│ │ │ -
40 public:
│ │ │ -
│ │ │ - │ │ │ -
48 const std::string& name,
│ │ │ -
49 const std::string& path,
│ │ │ -
50 const std::string& extendpath,
│ │ │ -
51 int rank,
│ │ │ -
52 int size)
│ │ │ -
53 : vtkWriter_(vtkWriter),
│ │ │ -
54 name_(name), path_(path),
│ │ │ -
55 extendpath_(extendpath),
│ │ │ -
56 rank_(rank),
│ │ │ -
57 size_(size)
│ │ │ -
58 {}
│ │ │ -
│ │ │ -
59
│ │ │ -
│ │ │ -
63 const std::shared_ptr< VTKWriter<GridView> >& vtkWriter() const
│ │ │ -
64 {
│ │ │ -
65 return vtkWriter_;
│ │ │ -
66 }
│ │ │ -
│ │ │ -
67
│ │ │ -
│ │ │ -
69 void addCellData (const std::shared_ptr<const typename VTKWriter<GridView>::VTKFunction> &p)
│ │ │ -
70 {
│ │ │ -
71 vtkWriter_->addCellData(p);
│ │ │ -
72 }
│ │ │ -
│ │ │ +
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 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
│ │ │ -
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 }
│ │ │ -
│ │ │ +
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
│ │ │ -
│ │ │ -
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 }
│ │ │ +
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 }
│ │ │
│ │ │ -
101
│ │ │ -
102
│ │ │ +
106
│ │ │ +
107 template< int codim >
│ │ │
│ │ │ -
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 };
│ │ │ +
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 };
│ │ │
│ │ │ -
190
│ │ │ -
191} // end namespace Dune
│ │ │
192
│ │ │ -
193#endif
│ │ │ -
Provides file i/o for the visualization toolkit.
│ │ │ -
Common stuff for the VTKWriter.
│ │ │ +
193} // end namespace Dune
│ │ │ +
194
│ │ │ +
195#endif
│ │ │ + │ │ │ + │ │ │ + │ │ │
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
│ │ │ +
Definition dgfgridfactory.hh:38
│ │ │ +
int numParameters() const
Definition dgfgridfactory.hh:108
│ │ │ +
int boundaryId(const Intersection &intersection) const
Definition dgfgridfactory.hh:102
│ │ │ +
const DGFBoundaryParameter::type & boundaryParameter(const Intersection< GG, II > &intersection) const
Definition dgfgridfactory.hh:158
│ │ │ +
std::vector< double > & parameter(const Vertex &vertex)
Definition dgfgridfactory.hh:139
│ │ │ +
MPIHelper::MPICommunicator MPICommunicatorType
Definition dgfgridfactory.hh:41
│ │ │ +
int numParameters(const Entity &) const
Definition dgfgridfactory.hh:119
│ │ │ +
bool wasInserted(const Intersection &intersection) const
Definition dgfgridfactory.hh:96
│ │ │ +
DGFGridFactory(const std::string &filename, MPICommunicatorType comm=MPIHelper::getCommunicator())
Definition dgfgridfactory.hh:50
│ │ │ +
G Grid
Definition dgfgridfactory.hh:39
│ │ │ +
static const int dimension
Definition dgfgridfactory.hh:40
│ │ │ +
Grid * grid()
Definition dgfgridfactory.hh:90
│ │ │ +
std::vector< double > & parameter(const Element &element)
Definition dgfgridfactory.hh:124
│ │ │ +
bool haveBoundaryParameters() const
Definition dgfgridfactory.hh:151
│ │ │ +
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition common/intersection.hh:164
│ │ │ +
bool boundary() const
Return true if intersection is with interior or exterior boundary (see the cases above)
Definition common/intersection.hh:216
│ │ │ +
int indexInInside() const
Local index of codim 1 entity in the inside() entity where intersection is contained in.
Definition common/intersection.hh:346
│ │ │ +
Wrapper class for entities.
Definition common/entity.hh:66
│ │ │ +
static constexpr int dimension
The dimension of the grid.
Definition common/grid.hh:387
│ │ │ +
A Traits struct that collects all associated types of one implementation.
Definition common/grid.hh:411
│ │ │ +
static const type & defaultValue()
default constructor
Definition parser.hh:28
│ │ │ +
std::string type
type of additional boundary parameters
Definition parser.hh:25
│ │ │ +
int nofvtxparams
Definition parser.hh:163
│ │ │ +
std::vector< std::vector< double > > vtxParams
Definition parser.hh:165
│ │ │ +
int nofelparams
Definition parser.hh:163
│ │ │ +
std::vector< std::vector< double > > elParams
Definition parser.hh:165
│ │ │ +
std::vector< std::vector< double > > vtx
Definition parser.hh:125
│ │ │ +
std ::vector< std ::vector< unsigned int > > elements
Definition parser.hh:134
│ │ │ + │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -2,235 +2,309 @@ │ │ │ │ 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 │ │ │ │ +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 │ │ │ │ -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> │ │ │ │ +5#ifndef DUNE_DGF_GRIDFACTORY_HH │ │ │ │ +6#define DUNE_DGF_GRIDFACTORY_HH │ │ │ │ +7 │ │ │ │ +8#include │ │ │ │ +9#include │ │ │ │ +10#include │ │ │ │ +11#include │ │ │ │ +12#include │ │ │ │ +13 │ │ │ │ +14#include │ │ │ │ +15#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_d_g_f_e_x_c_e_p_t_i_o_n_._h_h> │ │ │ │ +16#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_m_a_c_r_o_g_r_i_d_._h_h> │ │ │ │ +17 │ │ │ │ +18#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_p_a_r_s_e_r_._h_h> │ │ │ │ +19#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_i_n_t_e_r_s_e_c_t_i_o_n_._h_h> │ │ │ │ 20 │ │ │ │ -21namespace _D_u_n_e { │ │ │ │ -22 │ │ │ │ -32 template │ │ │ │ -_3_3 class _V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e │ │ │ │ -34 { │ │ │ │ -35 std::shared_ptr > vtkWriter_; │ │ │ │ -36 std::vector timesteps_; │ │ │ │ -37 std::string name_,path_,extendpath_; │ │ │ │ -38 int rank_; │ │ │ │ -39 int size_; │ │ │ │ -40 public: │ │ │ │ -_4_7 explicit _V_T_K_S_e_q_u_e_n_c_e_W_r_i_t_e_r_B_a_s_e( std::shared_ptr<_V_T_K_W_r_i_t_e_r_<_G_r_i_d_V_i_e_w_> > │ │ │ │ -_v_t_k_W_r_i_t_e_r, │ │ │ │ -48 const std::string& name, │ │ │ │ -49 const std::string& path, │ │ │ │ -50 const std::string& extendpath, │ │ │ │ -51 int rank, │ │ │ │ -52 int size) │ │ │ │ -53 : vtkWriter_(_v_t_k_W_r_i_t_e_r), │ │ │ │ -54 name_(name), path_(path), │ │ │ │ -55 extendpath_(extendpath), │ │ │ │ -56 rank_(rank), │ │ │ │ -57 size_(size) │ │ │ │ -58 {} │ │ │ │ -59 │ │ │ │ -_6_3 const std::shared_ptr< VTKWriter >& _v_t_k_W_r_i_t_e_r() const │ │ │ │ -64 { │ │ │ │ -65 return vtkWriter_; │ │ │ │ -66 } │ │ │ │ -67 │ │ │ │ -_6_9 void _a_d_d_C_e_l_l_D_a_t_a (const std::shared_ptr_:_: │ │ │ │ -_V_T_K_F_u_n_c_t_i_o_n> &p) │ │ │ │ -70 { │ │ │ │ -71 vtkWriter_->addCellData(p); │ │ │ │ +21 │ │ │ │ +22namespace _D_u_n_e │ │ │ │ +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 > │ │ │ │ +_3_7 struct _D_G_F_G_r_i_d_F_a_c_t_o_r_y │ │ │ │ +38 { │ │ │ │ +_3_9 typedef G _G_r_i_d; │ │ │ │ +_4_0 const static int _d_i_m_e_n_s_i_o_n = _G_r_i_d_:_:_d_i_m_e_n_s_i_o_n; │ │ │ │ +_4_1 typedef MPIHelper::MPICommunicator _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e; │ │ │ │ +42 │ │ │ │ +43 private: │ │ │ │ +44 typedef typename _G_r_i_d_:_:_t_e_m_p_l_a_t_e Codim< 0 >::Entity Element; │ │ │ │ +45 │ │ │ │ +46 typedef typename _G_r_i_d_:_:_t_e_m_p_l_a_t_e Codim< dimension >::Entity Vertex; │ │ │ │ +47 │ │ │ │ +48 public: │ │ │ │ +49 │ │ │ │ +_5_0 explicit _D_G_F_G_r_i_d_F_a_c_t_o_r_y ( const std::string &filename, │ │ │ │ +51 _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r_T_y_p_e comm = MPIHelper::getCommunicator() ) │ │ │ │ +52 : macroGrid_( filename.c_str(), comm ) │ │ │ │ +53 { │ │ │ │ +54 grid_ = macroGrid_.template createGrid< Grid >(); │ │ │ │ +55 │ │ │ │ +56 if( macroGrid_._n_o_f_e_l_p_a_r_a_m_s > 0 ) │ │ │ │ +57 { │ │ │ │ +58 const size_t nofElements = macroGrid_._e_l_e_m_e_n_t_s.size(); │ │ │ │ +59 for( size_t i = 0; i < nofElements; ++i ) │ │ │ │ +60 { │ │ │ │ +61 std::vector< double > coord; │ │ │ │ +62 │ │ │ │ +63 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 │ │ │ │ -_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 } │ │ │ │ +74 if( macroGrid_._n_o_f_v_t_x_p_a_r_a_m_s > 0 ) │ │ │ │ +75 { │ │ │ │ +76 const size_t nofVertices = macroGrid_._v_t_x.size(); │ │ │ │ +77 for( size_t i = 0; i < nofVertices; ++i ) │ │ │ │ +78 { │ │ │ │ +79 std::vector< double > coord; │ │ │ │ +80 │ │ │ │ +81 DomainType p; │ │ │ │ +82 for( int k = 0; k < DomainType::dimension; ++k ) │ │ │ │ +83 p[ k ] = macroGrid_._v_t_x[i][k]; │ │ │ │ 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) │ │ │ │ +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 /* 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 │ │ │ │ +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#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. │ │ │ │ +193} // end namespace Dune │ │ │ │ +194 │ │ │ │ +195#endif │ │ │ │ +_p_a_r_s_e_r_._h_h │ │ │ │ +_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 │ │ │ │ _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_:_:_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/a00770.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: vtksequencewriter.hh File Reference │ │ │ +dune-grid: general.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,42 +65,32 @@ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ Namespaces
│ │ │ -
vtksequencewriter.hh File Reference
│ │ │ +
general.cc 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>
│ │ │ -
│ │ │ -

Go to the source code of this file.

│ │ │ -

│ │ │ Namespaces

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

│ │ │ -Classes

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,25 +2,20 @@ │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_r_i_d │ │ │ │ * _i_o │ │ │ │ * _f_i_l_e │ │ │ │ - * _v_t_k │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -vtksequencewriter.hh File Reference │ │ │ │ -#include │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_t_k_s_e_q_u_e_n_c_e_w_r_i_t_e_r_b_a_s_e_._h_h> │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_t_k_w_r_i_t_e_r_._h_h> │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_s_u_b_s_a_m_p_l_i_n_g_v_t_k_w_r_i_t_e_r_._h_h> │ │ │ │ -_G_o_ _t_o_ _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_._._. │ │ │ │ -  │ │ │ │ + * _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> │ │ │ │ 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/a00773.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: volumewriter.hh File Reference │ │ │ +dune-grid: boundaryseg.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,43 +65,45 @@ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
volumewriter.hh File Reference
│ │ │ +
boundaryseg.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 <cassert>
│ │ │ +#include <iostream>
│ │ │ +#include <string>
│ │ │ +#include <vector>
│ │ │ +#include <map>
│ │ │ +#include <dune/grid/io/file/dgfparser/parser.hh>
│ │ │ +#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │
│ │ │

Go to the source code of this file.

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

│ │ │ Classes

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

│ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::VTK
namespace  Dune::dgf
 
│ │ │
│ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -2,27 +2,30 @@ │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_r_i_d │ │ │ │ * _i_o │ │ │ │ * _f_i_l_e │ │ │ │ - * _v_t_k │ │ │ │ + * _d_g_f_p_a_r_s_e_r │ │ │ │ + * _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> │ │ │ │ +boundaryseg.hh File Reference │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_p_a_r_s_e_r_._h_h> │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -class   _D_u_n_e_:_:_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_:_:_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_:_:_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/a00773_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: volumewriter.hh Source File │ │ │ +dune-grid: boundaryseg.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,136 +70,122 @@ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
volumewriter.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
│ │ │ -
6#ifndef DUNE_GRID_IO_FILE_VTK_VOLUMEWRITER_HH
│ │ │ -
7#define DUNE_GRID_IO_FILE_VTK_VOLUMEWRITER_HH
│ │ │ -
8
│ │ │ -
9#include <memory>
│ │ │ -
10
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
15
│ │ │ -
16namespace Dune {
│ │ │ -
19
│ │ │ -
20 namespace VTK {
│ │ │ -
21
│ │ │ -
22 template<typename GV>
│ │ │ +
5#ifndef DUNE_DGF_BOUNDARYSEGBLOCK_HH
│ │ │ +
6#define DUNE_DGF_BOUNDARYSEGBLOCK_HH
│ │ │ +
7
│ │ │ +
8#include <cassert>
│ │ │ +
9#include <iostream>
│ │ │ +
10#include <string>
│ │ │ +
11#include <vector>
│ │ │ +
12#include <map>
│ │ │ +
13
│ │ │ + │ │ │ + │ │ │ +
16
│ │ │ +
17
│ │ │ +
18namespace Dune
│ │ │ +
19{
│ │ │ +
20
│ │ │ +
21 namespace dgf
│ │ │ +
22 {
│ │ │
│ │ │ - │ │ │ - │ │ │ -
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
│ │ │ - │ │ │ + │ │ │ +
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 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 }
│ │ │ -
│ │ │ +
42 // some information
│ │ │ +
43 int get( std :: map< EntityKey, BndParam > & facemap,
│ │ │ +
44 bool fixedsize,
│ │ │ +
45 int vtxoffset
│ │ │ +
46 );
│ │ │ +
47
│ │ │ +
│ │ │ +
48 bool ok()
│ │ │ +
49 {
│ │ │ +
50 return goodline;
│ │ │ +
51 }
│ │ │ +
│ │ │ +
52
│ │ │ +
│ │ │ + │ │ │ +
54 {
│ │ │ +
55 return noflines();
│ │ │ +
56 }
│ │ │ +
│ │ │ +
57
│ │ │ +
58 private:
│ │ │ +
59 bool next();
│ │ │
60
│ │ │ -
│ │ │ - │ │ │ - │ │ │ -
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));
│ │ │ +
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 };
│ │ │ -
│ │ │ -
71
│ │ │ -
72 } // namespace VTK
│ │ │ -
73
│ │ │ -
75
│ │ │ -
76} // namespace Dune
│ │ │ -
77
│ │ │ -
78#endif // DUNE_GRID_IO_FILE_VTK_VOLUMEWRITER_HH
│ │ │ - │ │ │ - │ │ │ -
Functions for VTK output.
│ │ │ - │ │ │ +
70 int size()
│ │ │ +
71 {
│ │ │ +
72 return p.size();
│ │ │ +
73 }
│ │ │ +
74
│ │ │ +
75 };
│ │ │ +
│ │ │ +
76
│ │ │ +
77 } // end namespace dgf
│ │ │ +
78
│ │ │ +
79} // end namespace Dune
│ │ │ +
80
│ │ │ +
81#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
│ │ │ +
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
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -2,148 +2,132 @@ │ │ │ │ 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 │ │ │ │ +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 │ │ │ │ -6#ifndef DUNE_GRID_IO_FILE_VTK_VOLUMEWRITER_HH │ │ │ │ -7#define DUNE_GRID_IO_FILE_VTK_VOLUMEWRITER_HH │ │ │ │ -8 │ │ │ │ -9#include │ │ │ │ -10 │ │ │ │ -11#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_b_a_s_i_c_w_r_i_t_e_r_._h_h> │ │ │ │ -12#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_f_u_n_c_t_i_o_n_._h_h> │ │ │ │ -13#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_f_u_n_c_t_i_o_n_w_r_i_t_e_r_._h_h> │ │ │ │ -14#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_o_l_u_m_e_i_t_e_r_a_t_o_r_s_._h_h> │ │ │ │ -15 │ │ │ │ -16namespace _D_u_n_e { │ │ │ │ -19 │ │ │ │ -20 namespace VTK { │ │ │ │ -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; │ │ │ │ +5#ifndef DUNE_DGF_BOUNDARYSEGBLOCK_HH │ │ │ │ +6#define DUNE_DGF_BOUNDARYSEGBLOCK_HH │ │ │ │ +7 │ │ │ │ +8#include │ │ │ │ +9#include │ │ │ │ +10#include │ │ │ │ +11#include │ │ │ │ +12#include │ │ │ │ +13 │ │ │ │ +14#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_p_a_r_s_e_r_._h_h> │ │ │ │ +15#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ +16 │ │ │ │ +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 │ │ │ │ -_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 } │ │ │ │ +42 // some information │ │ │ │ +43 int _g_e_t( std :: map< EntityKey, BndParam > & facemap, │ │ │ │ +44 bool fixedsize, │ │ │ │ +45 int vtxoffset │ │ │ │ +46 ); │ │ │ │ +47 │ │ │ │ +_4_8 bool _o_k() │ │ │ │ +49 { │ │ │ │ +50 return goodline; │ │ │ │ +51 } │ │ │ │ +52 │ │ │ │ +_5_3 int _n_o_f_b_o_u_n_d() │ │ │ │ +54 { │ │ │ │ +55 return _n_o_f_l_i_n_e_s(); │ │ │ │ +56 } │ │ │ │ +57 │ │ │ │ +58 private: │ │ │ │ +59 bool next(); │ │ │ │ 60 │ │ │ │ -_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)); │ │ │ │ +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 &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_:_:_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 │ │ │ │ =============================================================================== │ │ │ │ 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: volumeiterators.hh File Reference │ │ │ +dune-grid: simplex.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,45 +65,41 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
volumeiterators.hh File Reference
│ │ │ +
simplex.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 <vector>
│ │ │ +#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::SimplexBlock
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │

│ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::VTK
namespace  Dune::dgf
 
│ │ │
│ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -2,29 +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 │ │ │ │ -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> │ │ │ │ +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_:_:_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_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/a00776_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: volumeiterators.hh Source File │ │ │ +dune-grid: simplex.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,240 +70,102 @@ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
volumeiterators.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_GRID_IO_FILE_VTK_VOLUMEITERATORS_HH
│ │ │ -
7#define DUNE_GRID_IO_FILE_VTK_VOLUMEITERATORS_HH
│ │ │ -
8
│ │ │ - │ │ │ +
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 {
│ │ │ -
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
│ │ │ - │ │ │ - │ │ │ -
40
│ │ │ - │ │ │ - │ │ │ -
43 typename GV::IndexSet> PointIterator;
│ │ │ -
44
│ │ │ - │ │ │ - │ │ │ -
47 typedef typename GV::Communication Communication;
│ │ │ +
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
│ │ │
│ │ │ -
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
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ +
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
│ │ │ -
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
│ │ │ +
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,286 +2,107 @@ │ │ │ │ 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 │ │ │ │ +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_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> │ │ │ │ +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_/_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> │ │ │ │ +11#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ +12 │ │ │ │ +13namespace _D_u_n_e │ │ │ │ +14{ │ │ │ │ 15 │ │ │ │ -16namespace _D_u_n_e { │ │ │ │ -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; │ │ │ │ -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; │ │ │ │ +16 namespace dgf │ │ │ │ +17 { │ │ │ │ +18 // SimplexBlock │ │ │ │ +19 // ------------ │ │ │ │ +20 │ │ │ │ +_2_1 class _S_i_m_p_l_e_x_B_l_o_c_k │ │ │ │ +22 : public _B_a_s_i_c_B_l_o_c_k │ │ │ │ +23 { │ │ │ │ +24 unsigned int nofvtx; │ │ │ │ +25 int vtxoffset; │ │ │ │ +26 int dimgrid; │ │ │ │ +27 bool goodline; // active line describes a vertex │ │ │ │ +28 int nofparams; // nof parameters │ │ │ │ +29 │ │ │ │ +30 public: │ │ │ │ +31 _S_i_m_p_l_e_x_B_l_o_c_k ( std :: istream &in, int pnofvtx, int pvtxoffset, int │ │ │ │ +&pdimgrid ); │ │ │ │ +32 │ │ │ │ +33 int _g_e_t ( std :: vector< std :: vector< unsigned int > > &simplex, │ │ │ │ +34 std :: vector< std :: vector< double > > ¶ms, │ │ │ │ +35 int &nofp ); │ │ │ │ +36 │ │ │ │ +37 // cubes -> simplex │ │ │ │ +38 static int │ │ │ │ +39 _c_u_b_e_2_s_i_m_p_l_e_x ( std :: vector< std :: vector< double > > &vtx, │ │ │ │ +40 std :: vector< std :: vector< unsigned int > > &elements, │ │ │ │ +41 std :: vector< std :: vector< double > > ¶ms ); │ │ │ │ +42 │ │ │ │ +43 // some information │ │ │ │ +_4_4 bool _o_k () │ │ │ │ +45 { │ │ │ │ +46 return goodline; │ │ │ │ +47 } │ │ │ │ 48 │ │ │ │ -_4_9 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 │ │ │ │ -_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 │ │ │ │ -_c_o_r_n_e_r_._h_h │ │ │ │ +_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_:_:_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_:_:_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/a00779.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: subsamplingvtkwriter.hh File Reference │ │ │ +dune-grid: cube.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,52 +65,33 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ Namespaces
│ │ │ -
subsamplingvtkwriter.hh File Reference
│ │ │ +
cube.cc File Reference
│ │ │
│ │ │
│ │ │ - │ │ │ -

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

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

Go to the source code of this file.

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

│ │ │ -Classes

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

│ │ │ Namespaces

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

Detailed Description

│ │ │ -

Provides subsampled file i/o for the visualization toolkit.

│ │ │ -
Author
Jö Fahlke
│ │ │ -
│ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ @@ -1 +1 @@ │ │ │ │ -utf-8 │ │ │ │ +us-ascii │ │ │ ├── html2text {} │ │ │ │ @@ -2,34 +2,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 │ │ │ │ -subsamplingvtkwriter.hh File Reference │ │ │ │ -Provides subsampled file i/o for the visualization toolkit. _M_o_r_e_._._. │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_t_k_w_r_i_t_e_r_._h_h> │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_t_u_w_r_i_t_e_r_._h_h> │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ -class   _D_u_n_e_:_:_S_u_b_s_a_m_p_l_i_n_g_V_T_K_W_r_i_t_e_r_<_ _G_r_i_d_V_i_e_w_ _> │ │ │ │ -  Writer for the output of subsampled grid functions in the vtk format. │ │ │ │ - _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ + * _d_g_f_p_a_r_s_e_r │ │ │ │ + * _b_l_o_c_k_s │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ +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 subsampled file i/o for the visualization toolkit. │ │ │ │ - Author │ │ │ │ - Jö Fahlke │ │ │ │ +namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ +  │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00782.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: streams.hh File Reference │ │ │ +dune-grid: vertex.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,43 +65,42 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
streams.hh File Reference
│ │ │ +
vertex.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <ostream>
│ │ │ -#include <dune/grid/io/file/vtk/b64enc.hh>
│ │ │ +
#include <iostream>
│ │ │ +#include <vector>
│ │ │ +#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │
│ │ │

Go to the source code of this file.

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

│ │ │ Classes

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

│ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
 
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -2,26 +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 │ │ │ │ -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> │ │ │ │ +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> │ │ │ │ _G_o_ _t_o_ _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_._._. │ │ │ │ +class   _D_u_n_e_:_:_d_g_f_:_:_V_e_r_t_e_x_B_l_o_c_k │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │   Include standard header files. │ │ │ │   │ │ │ │ +namespace   _D_u_n_e_:_:_d_g_f │ │ │ │ +  │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00782_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: streams.hh Source File │ │ │ +dune-grid: vertex.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,132 +70,93 @@ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
streams.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_STREAMS_HH
│ │ │ -
7#define DUNE_GRID_IO_FILE_VTK_STREAMS_HH
│ │ │ -
8
│ │ │ -
9#include <ostream>
│ │ │ +
5#ifndef DUNE_DGF_VERTEXBLOCK_HH
│ │ │ +
6#define DUNE_DGF_VERTEXBLOCK_HH
│ │ │ +
7
│ │ │ +
8#include <iostream>
│ │ │ +
9#include <vector>
│ │ │
10
│ │ │ - │ │ │ + │ │ │
12
│ │ │ -
13namespace Dune {
│ │ │ -
14
│ │ │ -
│ │ │ - │ │ │ -
17 std::ostream& s;
│ │ │ -
18 b64chunk chunk;
│ │ │ -
19 char obuf[4];
│ │ │ -
20
│ │ │ -
21 public:
│ │ │ -
23
│ │ │ -
│ │ │ -
27 Base64Stream(std::ostream& s_)
│ │ │ -
28 : s(s_)
│ │ │ -
29 {
│ │ │ -
30 // reset chunk
│ │ │ -
31 chunk.reset();
│ │ │ -
32 }
│ │ │ -
│ │ │ -
33
│ │ │ +
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 );
│ │ │ +
31
│ │ │ +
32 int get ( std :: vector< std :: vector< double > > &vtx,
│ │ │ +
33 std :: vector< std :: vector< double > > &param,
│ │ │ +
34 int &nofp );
│ │ │
35
│ │ │ -
41 template <class X>
│ │ │ +
36 // some information
│ │ │ +
│ │ │ +
37 bool ok () const
│ │ │ +
38 {
│ │ │ +
39 return goodline;
│ │ │ +
40 }
│ │ │ +
│ │ │ +
41
│ │ │
│ │ │ -
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 }
│ │ │ -
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.
│ │ │ +
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
│ │ │ -
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
│ │ │ +
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,143 +2,93 @@ │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_r_i_d │ │ │ │ * _i_o │ │ │ │ * _f_i_l_e │ │ │ │ - * _v_t_k │ │ │ │ -streams.hh │ │ │ │ + * _d_g_f_p_a_r_s_e_r │ │ │ │ + * _b_l_o_c_k_s │ │ │ │ +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_STREAMS_HH │ │ │ │ -7#define DUNE_GRID_IO_FILE_VTK_STREAMS_HH │ │ │ │ -8 │ │ │ │ -9#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_/_v_t_k_/_b_6_4_e_n_c_._h_h> │ │ │ │ +11#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ 12 │ │ │ │ -13namespace _D_u_n_e { │ │ │ │ -14 │ │ │ │ -_1_6 class _B_a_s_e_6_4_S_t_r_e_a_m { │ │ │ │ -17 std::ostream& s; │ │ │ │ -18 _b_6_4_c_h_u_n_k chunk; │ │ │ │ -19 char obuf[4]; │ │ │ │ -20 │ │ │ │ -21 public: │ │ │ │ -23 │ │ │ │ -_2_7 _B_a_s_e_6_4_S_t_r_e_a_m(std::ostream& s_) │ │ │ │ -28 : s(s_) │ │ │ │ -29 { │ │ │ │ -30 // reset chunk │ │ │ │ -31 chunk._r_e_s_e_t(); │ │ │ │ -32 } │ │ │ │ -33 │ │ │ │ +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 ); │ │ │ │ +31 │ │ │ │ +32 int _g_e_t ( std :: vector< std :: vector< double > > &vtx, │ │ │ │ +33 std :: vector< std :: vector< double > > ¶m, │ │ │ │ +34 int &nofp ); │ │ │ │ 35 │ │ │ │ -41 template │ │ │ │ -_4_2 void _w_r_i_t_e(X & data) │ │ │ │ +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 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 │ │ │ │ -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. │ │ │ │ +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_:_:_b_6_4_c_h_u_n_k │ │ │ │ -struct representing the three byte text as well as the four 6 bit chunks │ │ │ │ -DDeeffiinniittiioonn b64enc.hh:34 │ │ │ │ -_D_u_n_e_:_:_b_6_4_c_h_u_n_k_:_:_w_r_i_t_e │ │ │ │ -void write(char *t) │ │ │ │ -DDeeffiinniittiioonn b64enc.hh:60 │ │ │ │ -_D_u_n_e_:_:_b_6_4_c_h_u_n_k_:_:_s_i_z_e │ │ │ │ -size_type size │ │ │ │ -DDeeffiinniittiioonn b64enc.hh:36 │ │ │ │ -_D_u_n_e_:_:_b_6_4_c_h_u_n_k_:_:_p_u_t │ │ │ │ -void put(const char c) │ │ │ │ -DDeeffiinniittiioonn b64enc.hh:54 │ │ │ │ -_D_u_n_e_:_:_b_6_4_c_h_u_n_k_:_:_r_e_s_e_t │ │ │ │ -void reset() │ │ │ │ -DDeeffiinniittiioonn b64enc.hh:39 │ │ │ │ -_D_u_n_e_:_:_B_a_s_e_6_4_S_t_r_e_a_m │ │ │ │ -class to base64 encode a stream of data │ │ │ │ -DDeeffiinniittiioonn streams.hh:16 │ │ │ │ -_D_u_n_e_:_:_B_a_s_e_6_4_S_t_r_e_a_m_:_:_w_r_i_t_e │ │ │ │ -void write(X &data) │ │ │ │ -encode a data item │ │ │ │ -DDeeffiinniittiioonn streams.hh:42 │ │ │ │ -_D_u_n_e_:_:_B_a_s_e_6_4_S_t_r_e_a_m_:_:_f_l_u_s_h │ │ │ │ -void flush() │ │ │ │ -flush the current unwritten data to the stream. │ │ │ │ -DDeeffiinniittiioonn streams.hh:64 │ │ │ │ -_D_u_n_e_:_:_B_a_s_e_6_4_S_t_r_e_a_m_:_:_B_a_s_e_6_4_S_t_r_e_a_m │ │ │ │ -Base64Stream(std::ostream &s_) │ │ │ │ -Construct a Base64Stream. │ │ │ │ -DDeeffiinniittiioonn streams.hh:27 │ │ │ │ -_D_u_n_e_:_:_B_a_s_e_6_4_S_t_r_e_a_m_:_:_~_B_a_s_e_6_4_S_t_r_e_a_m │ │ │ │ -~Base64Stream() │ │ │ │ -destroy the object │ │ │ │ -DDeeffiinniittiioonn streams.hh:77 │ │ │ │ -_D_u_n_e_:_:_R_a_w_S_t_r_e_a_m │ │ │ │ -write out data in binary │ │ │ │ -DDeeffiinniittiioonn streams.hh:84 │ │ │ │ -_D_u_n_e_:_:_R_a_w_S_t_r_e_a_m_:_:_w_r_i_t_e │ │ │ │ -void write(T data) │ │ │ │ -write data to stream │ │ │ │ -DDeeffiinniittiioonn streams.hh:93 │ │ │ │ -_D_u_n_e_:_:_R_a_w_S_t_r_e_a_m_:_:_R_a_w_S_t_r_e_a_m │ │ │ │ -RawStream(std::ostream &theStream) │ │ │ │ -make a new stream │ │ │ │ -DDeeffiinniittiioonn streams.hh:87 │ │ │ │ +_D_u_n_e_:_:_d_g_f_:_:_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/a00785.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: skeletonfunction.hh File Reference │ │ │ +dune-grid: periodicfacetrans.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,59 +65,53 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces
│ │ │ -
skeletonfunction.hh File Reference
│ │ │ +Namespaces | │ │ │ +Functions
│ │ │ +
periodicfacetrans.hh File Reference
│ │ │ │ │ │
│ │ │ - │ │ │ -

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

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

Go to the source code of this file.

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

│ │ │ Classes

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

│ │ │ Namespaces

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

│ │ │ +Functions

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

Detailed Description

│ │ │ -

Functions for VTK output on the skeleton.

│ │ │ -
Author
Jö Fahlke
│ │ │ -
│ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ @@ -1 +1 @@ │ │ │ │ -utf-8 │ │ │ │ +us-ascii │ │ │ ├── html2text {} │ │ │ │ @@ -2,41 +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 │ │ │ │ -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 │ │ │ │ + * _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 │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_f_u_n_c_t_i_o_n_w_r_i_t_e_r_._h_h> │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_p_v_t_u_w_r_i_t_e_r_._h_h> │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_t_u_w_r_i_t_e_r_._h_h> │ │ │ │ +#include <_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_:_:_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_ _> │ │ │ │ +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_:_:_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_:_:_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_:_:_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_._._. │ │ │ │ +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 │ │ │ │ +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 ********** │ │ │ │ -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/a00785_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: skeletonfunction.hh Source File │ │ │ +dune-grid: periodicfacetrans.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,189 +70,183 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
skeletonfunction.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_SKELETONFUNCTION_HH
│ │ │ -
7#define DUNE_GRID_IO_FILE_VTK_SKELETONFUNCTION_HH
│ │ │ -
8
│ │ │ -
9#include <memory>
│ │ │ -
10#include <string>
│ │ │ -
11#include <vector>
│ │ │ +
5#ifndef DUNE_DGF_PERIODICFACETRANSBLOCK_HH
│ │ │ +
6#define DUNE_DGF_PERIODICFACETRANSBLOCK_HH
│ │ │ +
7
│ │ │ +
8#include <iostream>
│ │ │ +
9#include <vector>
│ │ │ +
10
│ │ │ + │ │ │
12
│ │ │ -
13#include <dune/common/fvector.hh>
│ │ │ -
14
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
18
│ │ │ -
19namespace Dune {
│ │ │ -
20
│ │ │ -
23
│ │ │ -
29 namespace VTK {
│ │ │ -
30
│ │ │ -
32 //
│ │ │ -
33 // Prototype for VTKFunktions on the skeleton
│ │ │ -
34 //
│ │ │ -
35
│ │ │ -
36 template<typename GV, typename RF>
│ │ │ -
│ │ │ - │ │ │ -
38 typedef GV GridView;
│ │ │ -
39 typedef typename GV::Intersection Cell;
│ │ │ -
40
│ │ │ -
41 typedef typename GV::ctype DomainField;
│ │ │ -
42 static const unsigned dimDomain = GV::dimension-1;
│ │ │ -
43 typedef FieldVector<DomainField, dimDomain> Domain;
│ │ │ +
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 typedef RF RangeField;
│ │ │ -
46 typedef std::vector<RangeField> Range;
│ │ │ -
47 };
│ │ │ -
│ │ │ -
48
│ │ │ -
50 template <typename GV, typename RF>
│ │ │ -
│ │ │ - │ │ │ -
52 public:
│ │ │ - │ │ │ +
│ │ │ +
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
│ │ │ -
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 //
│ │ │ +
│ │ │ +
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
│ │ │ -
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 { }
│ │ │ +
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 SkeletonFunctionWriter(const std::shared_ptr<const Func>& func_,
│ │ │ -
100 const std::string& name,
│ │ │ - │ │ │ -
102 : func(func_), name_(name), dimR(func->dimRange()), precision_(prec)
│ │ │ -
103 { }
│ │ │ -
│ │ │ -
104
│ │ │ -
106 virtual std::string name() const { return name_; }
│ │ │ -
107
│ │ │ -
109 virtual unsigned ncomps() const { return dimR; }
│ │ │ -
110
│ │ │ -
│ │ │ -
112 virtual void addArray(PVTUWriter& writer) {
│ │ │ -
113 writer.addArray(name(), ncomps(), precision_);
│ │ │ -
114 }
│ │ │ -
│ │ │ -
115
│ │ │ -
│ │ │ -
117 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {
│ │ │ -
118 arraywriter.reset(writer.makeArrayWriter(name(), ncomps(),
│ │ │ -
119 nitems, precision_));
│ │ │ -
120 return !arraywriter->writeIsNoop();
│ │ │ -
121 }
│ │ │ -
│ │ │ -
122
│ │ │ -
│ │ │ -
124 virtual void write(const typename Func::Traits::Cell& cell,
│ │ │ -
125 const typename Func::Traits::Domain& xl) {
│ │ │ -
126 typename Func::Traits::Range result;
│ │ │ -
127 func->evaluate(cell, xl, result);
│ │ │ -
128 for(unsigned d = 0; d < result.size() && d < dimR; ++d)
│ │ │ -
129 arraywriter->write(result[d]);
│ │ │ -
130 for(unsigned d = result.size(); d < dimR; ++d)
│ │ │ -
131 arraywriter->write(0);
│ │ │ -
132 }
│ │ │ -
│ │ │ -
133
│ │ │ -
│ │ │ -
135 virtual void endWrite() {
│ │ │ -
136 arraywriter.reset();
│ │ │ -
137 }
│ │ │ -
│ │ │ -
138 };
│ │ │ -
│ │ │ -
139
│ │ │ -
140 } // namespace VTK
│ │ │ -
141
│ │ │ -
143
│ │ │ -
144} // namespace Dune
│ │ │ -
145
│ │ │ -
146#endif // DUNE_GRID_IO_FILE_VTK_SKELETONFUNCTION_HH
│ │ │ - │ │ │ - │ │ │ - │ │ │ +
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
│ │ │ +
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
│ │ │ - │ │ │ -
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
│ │ │ +
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,233 +2,181 @@ │ │ │ │ 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 │ │ │ │ + * _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_SKELETONFUNCTION_HH │ │ │ │ -7#define DUNE_GRID_IO_FILE_VTK_SKELETONFUNCTION_HH │ │ │ │ -8 │ │ │ │ -9#include │ │ │ │ -10#include │ │ │ │ -11#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#include │ │ │ │ -14 │ │ │ │ -15#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_f_u_n_c_t_i_o_n_w_r_i_t_e_r_._h_h> │ │ │ │ -16#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_p_v_t_u_w_r_i_t_e_r_._h_h> │ │ │ │ -17#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_t_u_w_r_i_t_e_r_._h_h> │ │ │ │ -18 │ │ │ │ -19namespace _D_u_n_e { │ │ │ │ -20 │ │ │ │ -23 │ │ │ │ -29 namespace VTK { │ │ │ │ -30 │ │ │ │ -32 // │ │ │ │ -33 // Prototype for VTKFunktions on the skeleton │ │ │ │ -34 // │ │ │ │ -35 │ │ │ │ -36 template │ │ │ │ -_3_7 struct _S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_T_r_a_i_t_s { │ │ │ │ -_3_8 typedef GV _G_r_i_d_V_i_e_w; │ │ │ │ -_3_9 typedef typename GV::Intersection _C_e_l_l; │ │ │ │ -40 │ │ │ │ -_4_1 typedef typename GV::ctype _D_o_m_a_i_n_F_i_e_l_d; │ │ │ │ -_4_2 static const unsigned _d_i_m_D_o_m_a_i_n = GV::dimension-1; │ │ │ │ -_4_3 typedef FieldVector _D_o_m_a_i_n; │ │ │ │ +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 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; │ │ │ │ +_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_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 // │ │ │ │ +_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 │ │ │ │ -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 │ │ │ │ +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 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 { } │ │ │ │ +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 │ │ │ │ -_9_9 _S_k_e_l_e_t_o_n_F_u_n_c_t_i_o_n_W_r_i_t_e_r(const std::shared_ptr& func_, │ │ │ │ -100 const std::string& _n_a_m_e, │ │ │ │ -101 _V_T_K_:_:_P_r_e_c_i_s_i_o_n prec = _V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2) │ │ │ │ -102 : func(func_), name_(_n_a_m_e), dimR(func->dimRange()), precision_(prec) │ │ │ │ -103 { } │ │ │ │ -104 │ │ │ │ -_1_0_6 virtual std::string _n_a_m_e() const { return name_; } │ │ │ │ -107 │ │ │ │ -_1_0_9 virtual unsigned _n_c_o_m_p_s() const { return dimR; } │ │ │ │ -110 │ │ │ │ -_1_1_2 virtual void _a_d_d_A_r_r_a_y(_P_V_T_U_W_r_i_t_e_r& writer) { │ │ │ │ -113 writer._a_d_d_A_r_r_a_y(_n_a_m_e(), _n_c_o_m_p_s(), precision_); │ │ │ │ -114 } │ │ │ │ -115 │ │ │ │ -_1_1_7 virtual bool _b_e_g_i_n_W_r_i_t_e(_V_T_U_W_r_i_t_e_r& writer, std::size_t nitems) { │ │ │ │ -118 arraywriter.reset(writer._m_a_k_e_A_r_r_a_y_W_r_i_t_e_r(_n_a_m_e(), _n_c_o_m_p_s(), │ │ │ │ -119 nitems, precision_)); │ │ │ │ -120 return !arraywriter->writeIsNoop(); │ │ │ │ -121 } │ │ │ │ -122 │ │ │ │ -_1_2_4 virtual void _w_r_i_t_e(const typename Func::Traits::Cell& cell, │ │ │ │ -125 const typename Func::Traits::Domain& xl) { │ │ │ │ -126 typename Func::Traits::Range result; │ │ │ │ -127 func->evaluate(cell, xl, result); │ │ │ │ -128 for(unsigned d = 0; d < result.size() && d < dimR; ++d) │ │ │ │ -129 arraywriter->write(result[d]); │ │ │ │ -130 for(unsigned d = result.size(); d < dimR; ++d) │ │ │ │ -131 arraywriter->write(0); │ │ │ │ -132 } │ │ │ │ -133 │ │ │ │ -_1_3_5 virtual void _e_n_d_W_r_i_t_e() { │ │ │ │ -136 arraywriter.reset(); │ │ │ │ -137 } │ │ │ │ -138 }; │ │ │ │ -139 │ │ │ │ -140 } // namespace VTK │ │ │ │ -141 │ │ │ │ -143 │ │ │ │ -144} // namespace Dune │ │ │ │ -145 │ │ │ │ -146#endif // DUNE_GRID_IO_FILE_VTK_SKELETONFUNCTION_HH │ │ │ │ -_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 │ │ │ │ +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 │ │ │ │ +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_:_:_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_:_:_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/a00788.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: pvtuwriter.hh File Reference │ │ │ +dune-grid: boundaryseg.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,44 +65,31 @@ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ Namespaces
│ │ │ -
pvtuwriter.hh File Reference
│ │ │ +
boundaryseg.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>
│ │ │ -
│ │ │ -

Go to the source code of this file.

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

│ │ │ -Classes

class  Dune::VTK::PVTUWriter
 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,28 +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 │ │ │ │ -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_:_:_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_._._. │ │ │ │ -  │ │ │ │ + * _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> │ │ │ │ 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/a00791.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: pointiterator.hh File Reference │ │ │ +dune-grid: gridparameter.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,45 +65,42 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
pointiterator.hh File Reference
│ │ │ +
gridparameter.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>
│ │ │ +
#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::PointIterator< CellIterator, IS >
 iterate over the points of some corner range More...
class  Dune::dgf::GridParameterBlock
 Common Grid parameters. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │

│ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::VTK
namespace  Dune::dgf
 
│ │ │
│ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -2,29 +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 │ │ │ │ -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> │ │ │ │ +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_:_:_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_._._. │ │ │ │ +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/a00791_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: pointiterator.hh Source File │ │ │ +dune-grid: gridparameter.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,151 +70,151 @@ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
pointiterator.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_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
│ │ │ - │ │ │ -
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 }
│ │ │ -
│ │ │ -
85
│ │ │ -
│ │ │ -
86 bool isDereferencable() const {
│ │ │ -
87 return cornerit.isDereferencable();
│ │ │ -
88 }
│ │ │ -
│ │ │ -
89
│ │ │ -
│ │ │ -
90 bool equals(const DerivedType& other) const {
│ │ │ -
91 return cornerit == other.cornerit;
│ │ │ -
92 }
│ │ │ +
5#ifndef DUNE_DGF_GRIDPARAMETERBLOCK_HH
│ │ │ +
6#define DUNE_DGF_GRIDPARAMETERBLOCK_HH
│ │ │ +
7
│ │ │ +
8#include <iostream>
│ │ │ +
9#include <string>
│ │ │ +
10
│ │ │ + │ │ │ +
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 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 }
│ │ │
│ │ │ -
93
│ │ │ +
92
│ │ │
│ │ │ -
94 void increment() {
│ │ │ -
95 for(++cornerit; isDereferencable(); ++cornerit) {
│ │ │ -
96 typename IS::IndexType index =
│ │ │ -
97 is->subIndex(cornerit->cell(), cornerit->duneIndex(), mydim);
│ │ │ -
98
│ │ │ -
99 if(!seen[index]) {
│ │ │ -
100 seen[index] = true;
│ │ │ -
101 break;
│ │ │ -
102 }
│ │ │ -
103 }
│ │ │ -
104 }
│ │ │ -
│ │ │ -
105
│ │ │ -
107
│ │ │ -
│ │ │ -
112 PointIterator(const CellIterator& cellit, const CellIterator& cellend,
│ │ │ -
113 const IS& is_)
│ │ │ -
114 : cornerit(cellit, cellend), is(&is_), seen(is->size(mydim), false)
│ │ │ -
115 { }
│ │ │ -
│ │ │ -
117
│ │ │ -
│ │ │ -
120 PointIterator(const CellIterator& cellend_)
│ │ │ -
121 : cornerit(cellend_), is(0)
│ │ │ -
122 { }
│ │ │ -
│ │ │ -
123 };
│ │ │ -
│ │ │ -
124
│ │ │ -
125 } // namespace VTK
│ │ │ -
126
│ │ │ -
128
│ │ │ -
129} // namespace Dune
│ │ │ -
130
│ │ │ -
131#endif // DUNE_GRID_IO_FILE_VTK_POINTITERATOR_HH
│ │ │ - │ │ │ - │ │ │ + │ │ │ +
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
│ │ │ -
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 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,168 +2,174 @@ │ │ │ │ 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 │ │ │ │ + * _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_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; │ │ │ │ -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 │ │ │ │ -_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; │ │ │ │ +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_/_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 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 │ │ │ │ +_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 } │ │ │ │ -105 │ │ │ │ -107 │ │ │ │ -_1_1_2 _P_o_i_n_t_I_t_e_r_a_t_o_r(const CellIterator& cellit, const CellIterator& cellend, │ │ │ │ -113 const IS& is_) │ │ │ │ -114 : cornerit(cellit, cellend), is(&is_), seen(is->size(_m_y_d_i_m), false) │ │ │ │ -115 { } │ │ │ │ -117 │ │ │ │ -_1_2_0 _P_o_i_n_t_I_t_e_r_a_t_o_r(const CellIterator& cellend_) │ │ │ │ -121 : cornerit(cellend_), is(0) │ │ │ │ -122 { } │ │ │ │ -123 }; │ │ │ │ -124 │ │ │ │ -125 } // namespace VTK │ │ │ │ -126 │ │ │ │ -128 │ │ │ │ -129} // namespace Dune │ │ │ │ -130 │ │ │ │ -131#endif // DUNE_GRID_IO_FILE_VTK_POINTITERATOR_HH │ │ │ │ -_c_o_r_n_e_r_i_t_e_r_a_t_o_r_._h_h │ │ │ │ -_c_o_r_n_e_r_._h_h │ │ │ │ +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_:_:_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_:_:_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/a00794.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: functionwriter.hh File Reference │ │ │ +dune-grid: basic.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,70 +65,53 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces
│ │ │ -
functionwriter.hh File Reference
│ │ │ +Namespaces | │ │ │ +Functions
│ │ │ +
basic.hh File Reference
│ │ │ │ │ │
│ │ │ -
#include <cstddef>
│ │ │ -#include <memory>
│ │ │ +
#include <cassert>
│ │ │ +#include <cctype>
│ │ │ +#include <iostream>
│ │ │ #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 <sstream>
│ │ │ +#include <dune/common/stdstreams.hh>
│ │ │ +#include <dune/grid/io/file/dgfparser/entitykey.hh>
│ │ │ +#include <dune/grid/io/file/dgfparser/dgfexception.hh>
│ │ │
│ │ │

Go to the source code of this file.

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

│ │ │ Classes

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...
class  Dune::dgf::BasicBlock
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │ +

│ │ │ Namespaces

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

│ │ │ +Functions

void Dune::dgf::makeupcase (std ::string &s)
 
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -2,53 +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 │ │ │ │ -functionwriter.hh File Reference │ │ │ │ -#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 │ │ │ │ +basic.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 <_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> │ │ │ │ +#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_:_:_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_._._. │ │ │ │ +class   _D_u_n_e_:_:_d_g_f_:_:_B_a_s_i_c_B_l_o_c_k │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │   Include standard header files. │ │ │ │   │ │ │ │ -namespace   _D_u_n_e_:_:_V_T_K │ │ │ │ +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/a00794_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: functionwriter.hh Source File │ │ │ +dune-grid: basic.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,479 +70,172 @@ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
functionwriter.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
│ │ │ -
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>
│ │ │ +
5#ifndef DUNE_DGF_BASICBLOCK_HH
│ │ │ +
6#define DUNE_DGF_BASICBLOCK_HH
│ │ │ +
7
│ │ │ +
8#include <cassert>
│ │ │ +
9#include <cctype>
│ │ │ +
10#include <iostream>
│ │ │
11#include <string>
│ │ │ -
12#include <typeinfo>
│ │ │ -
13#include <vector>
│ │ │ -
14
│ │ │ -
15#include <dune/common/exceptions.hh>
│ │ │ -
16#include <dune/common/fvector.hh>
│ │ │ +
12#include <sstream>
│ │ │ +
13
│ │ │ +
14#include <dune/common/stdstreams.hh>
│ │ │ + │ │ │ + │ │ │
17
│ │ │ -
18#include <dune/geometry/referenceelements.hh>
│ │ │ -
19
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
24
│ │ │ -
25namespace Dune
│ │ │ -
26{
│ │ │ +
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
│ │ │ -
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;
│ │ │ +
│ │ │ + │ │ │ +
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
│ │ │ -
44 virtual std::string name() const = 0;
│ │ │ +
43 // count the number of lines in the block
│ │ │ +
44 // int countlines ();
│ │ │
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 }
│ │ │ -
│ │ │ -
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:
│ │ │ +
46 protected:
│ │ │ +
47 std::stringstream line; // the active line as string buffer
│ │ │ +
48 // for use in the derived classes
│ │ │ +
49
│ │ │ +
50 // go back to beginning of block
│ │ │ +
│ │ │ +
51 void reset ()
│ │ │ +
52 {
│ │ │ +
53 pos = -1;
│ │ │ +
54 block_.clear();
│ │ │ +
55 block_.seekg( 0 );
│ │ │ +
56 }
│ │ │ +
│ │ │ +
57
│ │ │ +
58 // get next line and store in string stream
│ │ │ +
59 bool getnextline ();
│ │ │ +
60
│ │ │ +
61 // get next entry in line
│ │ │ +
62 template< class ENTRY >
│ │ │ +
│ │ │ +
63 bool getnextentry( ENTRY &entry )
│ │ │ +
64 {
│ │ │ +
65 line >> entry;
│ │ │ +
66 return static_cast< bool >( line );
│ │ │ +
67 }
│ │ │ +
│ │ │ +
68
│ │ │ +
69 bool gettokenparam ( std :: string token, std :: string &entry );
│ │ │ +
70 bool findtoken( std :: string token );
│ │ │ +
71
│ │ │ +
72 public:
│ │ │ +
73 // search for block in file and store in buffer
│ │ │ +
74 BasicBlock ( std::istream &in, const char* id );
│ │ │ +
75
│ │ │ +
76 // some information on this block
│ │ │ +
│ │ │ +
77 bool isactive ()
│ │ │ +
78 {
│ │ │ +
79 return active;
│ │ │ +
80 }
│ │ │ +
│ │ │ +
81
│ │ │ +
│ │ │ +
82 bool isempty ()
│ │ │ +
83 {
│ │ │ +
84 return empty;
│ │ │ +
85 }
│ │ │ +
│ │ │ +
86
│ │ │ +
│ │ │ +
87 int &noflines ()
│ │ │ +
88 {
│ │ │ +
89 return linecount;
│ │ │ +
90 }
│ │ │ +
│ │ │ +
91
│ │ │ +
│ │ │ + │ │ │ +
93 {
│ │ │ +
94 return pos;
│ │ │ +
95 }
│ │ │ +
│ │ │ +
96
│ │ │
│ │ │ -
97 VTKFunctionWriter(const std::shared_ptr<const Func>& func_,
│ │ │ - │ │ │ -
99 : func(func_), precision_(prec)
│ │ │ -
100 { }
│ │ │ +
97 const std::string & id () const
│ │ │ +
98 {
│ │ │ +
99 return identifier;
│ │ │ +
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
│ │ │ -
│ │ │ -
170 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {
│ │ │ -
171 arraywriter.reset(writer.makeArrayWriter(name(), ncomps(),
│ │ │ -
172 nitems, precision_));
│ │ │ -
173 return !arraywriter->writeIsNoop();
│ │ │ -
174 }
│ │ │ -
│ │ │ -
│ │ │ -
176 virtual void write(const typename Base::Cell& cell,
│ │ │ -
177 const typename Base::Domain& xl) {
│ │ │ -
178 FieldVector<typename Base::Cell::Geometry::ctype, Base::Cell::Geometry::coorddimension> xg
│ │ │ -
179 = cell.geometry().global(xl);
│ │ │ -
180 for(unsigned d = 0; d < 3 && d < Base::Cell::Geometry::coorddimension; ++d)
│ │ │ -
181 arraywriter->write(xg[d]);
│ │ │ -
182 for(unsigned d = Base::Cell::Geometry::coorddimension; d < 3; ++d)
│ │ │ -
183 arraywriter->write(0);
│ │ │ -
184 }
│ │ │ -
│ │ │ -
│ │ │ -
186 virtual void endWrite() {
│ │ │ -
187 arraywriter.reset();
│ │ │ -
188 }
│ │ │ -
│ │ │ -
189 };
│ │ │ -
│ │ │ -
190
│ │ │ -
192 template<typename IteratorFactory>
│ │ │ -
│ │ │ - │ │ │ -
194 : public FunctionWriterBase<typename IteratorFactory::Cell>
│ │ │ -
195 {
│ │ │ - │ │ │ -
197 static const unsigned mydim = Base::Cell::mydimension;
│ │ │ -
198
│ │ │ -
199 const IteratorFactory& factory;
│ │ │ -
200 std::shared_ptr<DataArrayWriter> arraywriter;
│ │ │ -
201 std::vector<unsigned> pointIndices;
│ │ │ -
202
│ │ │ -
203 public:
│ │ │ -
│ │ │ -
205 ConformingConnectivityWriter(const IteratorFactory& factory_)
│ │ │ -
206 : factory(factory_)
│ │ │ -
207 { }
│ │ │ -
│ │ │ -
208
│ │ │ -
210 virtual std::string name() const { return "connectivity"; }
│ │ │ -
211
│ │ │ -
213 virtual unsigned ncomps() const { return 1; }
│ │ │ -
214
│ │ │ -
│ │ │ -
216 virtual void addArray(PVTUWriter& writer) {
│ │ │ -
217 writer.addArray(name(), ncomps(), Precision::int32);
│ │ │ -
218 }
│ │ │ -
│ │ │ -
219
│ │ │ -
│ │ │ -
221 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {
│ │ │ -
222 arraywriter.reset(writer.makeArrayWriter(name(), ncomps(),
│ │ │ -
223 nitems, Precision::int32));
│ │ │ -
224 if(arraywriter->writeIsNoop())
│ │ │ -
225 return false;
│ │ │ -
226
│ │ │ -
228 pointIndices.resize(factory.indexSet().size(mydim));
│ │ │ -
229 const typename IteratorFactory::PointIterator& pend =
│ │ │ -
230 factory.endPoints();
│ │ │ -
231 typename IteratorFactory::PointIterator pit = factory.beginPoints();
│ │ │ -
232 unsigned counter = 0;
│ │ │ -
233 while(pit != pend) {
│ │ │ -
234 pointIndices[factory.indexSet().subIndex
│ │ │ -
235 (pit->cell(), pit->duneIndex(), mydim)] = counter;
│ │ │ -
236 ++counter;
│ │ │ -
237 ++pit;
│ │ │ -
238 }
│ │ │ -
239 return true;
│ │ │ -
240 }
│ │ │ -
│ │ │ -
│ │ │ -
242 virtual void write(const typename Base::Cell& cell, unsigned cornerIndex)
│ │ │ -
243 {
│ │ │ -
244 // if pointIndices is empty, we're in writeIsNoop mode
│ │ │ -
245 if(pointIndices.size() == 0)
│ │ │ -
246 return;
│ │ │ -
247 arraywriter->write(pointIndices[factory.indexSet().subIndex
│ │ │ -
248 (cell, cornerIndex, mydim)]);
│ │ │ -
249 }
│ │ │ -
│ │ │ -
│ │ │ -
251 virtual void endWrite() {
│ │ │ -
252 arraywriter.reset();
│ │ │ -
253 pointIndices.clear();
│ │ │ -
254 }
│ │ │ -
│ │ │ -
255 };
│ │ │ -
│ │ │ -
256
│ │ │ -
258 template<typename Cell>
│ │ │ -
│ │ │ - │ │ │ -
260 : public FunctionWriterBase<Cell>
│ │ │ -
261 {
│ │ │ -
262 std::shared_ptr<DataArrayWriter> arraywriter;
│ │ │ -
263 unsigned counter;
│ │ │ -
264
│ │ │ -
265 public:
│ │ │ -
267 virtual std::string name() const { return "connectivity"; }
│ │ │ -
268
│ │ │ -
270 virtual unsigned ncomps() const { return 1; }
│ │ │ -
271
│ │ │ -
│ │ │ -
273 virtual void addArray(PVTUWriter& writer) {
│ │ │ -
274 writer.addArray(name(), ncomps(), Precision::int32);
│ │ │ -
275 }
│ │ │ -
│ │ │ -
276
│ │ │ -
│ │ │ -
278 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {
│ │ │ -
279 arraywriter.reset(writer.makeArrayWriter(name(), ncomps(),
│ │ │ -
280 nitems, Precision::int32));
│ │ │ -
281 counter = 0;
│ │ │ -
282 return !arraywriter->writeIsNoop();
│ │ │ -
283 }
│ │ │ -
│ │ │ -
│ │ │ -
285 virtual void write(const Cell& /* cell */, unsigned /* cornerIndex */)
│ │ │ -
286 {
│ │ │ -
287 arraywriter->write(counter);
│ │ │ -
288 ++counter;
│ │ │ -
289 }
│ │ │ -
│ │ │ -
│ │ │ -
291 virtual void endWrite() {
│ │ │ -
292 arraywriter.reset();
│ │ │ -
293 }
│ │ │ -
│ │ │ -
294 };
│ │ │ -
│ │ │ -
295
│ │ │ -
297 template<typename Cell>
│ │ │ -
│ │ │ - │ │ │ -
299 : public FunctionWriterBase<Cell>
│ │ │ -
300 {
│ │ │ - │ │ │ -
302
│ │ │ -
303 std::shared_ptr<DataArrayWriter> arraywriter;
│ │ │ -
304 unsigned offset;
│ │ │ -
305
│ │ │ -
306 public:
│ │ │ -
308 virtual std::string name() const { return "offsets"; }
│ │ │ -
309
│ │ │ -
311 virtual unsigned ncomps() const { return 1; }
│ │ │ -
312
│ │ │ -
│ │ │ -
314 virtual void addArray(PVTUWriter& writer) {
│ │ │ -
315 writer.addArray(name(), ncomps(), Precision::int32);
│ │ │ -
316 }
│ │ │ -
│ │ │ -
317
│ │ │ -
│ │ │ -
319 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {
│ │ │ -
320 arraywriter.reset(writer.makeArrayWriter(name(), ncomps(),
│ │ │ -
321 nitems, Precision::int32));
│ │ │ -
322 offset = 0;
│ │ │ -
323 return !arraywriter->writeIsNoop();
│ │ │ -
324 }
│ │ │ -
│ │ │ -
│ │ │ -
326 virtual void write(const Cell& cell, const typename Base::Domain&) {
│ │ │ -
327 offset += cell.geometry().corners();
│ │ │ -
328 arraywriter->write(offset);
│ │ │ -
329 }
│ │ │ -
│ │ │ -
│ │ │ -
331 virtual void endWrite() {
│ │ │ -
332 arraywriter.reset();
│ │ │ -
333 }
│ │ │ -
│ │ │ -
334 };
│ │ │ -
│ │ │ -
335
│ │ │ -
337 template<typename Cell>
│ │ │ -
│ │ │ - │ │ │ -
339 : public FunctionWriterBase<Cell>
│ │ │ -
340 {
│ │ │ - │ │ │ -
342
│ │ │ -
343 std::shared_ptr<DataArrayWriter> arraywriter;
│ │ │ -
344
│ │ │ -
345 public:
│ │ │ -
347 virtual std::string name() const { return "types"; }
│ │ │ -
348
│ │ │ -
350 virtual unsigned ncomps() const { return 1; }
│ │ │ -
351
│ │ │ -
│ │ │ -
353 virtual void addArray(PVTUWriter& writer) {
│ │ │ -
354 writer.addArray(name(), ncomps(), Precision::uint8);
│ │ │ -
355 }
│ │ │ -
│ │ │ -
356
│ │ │ -
│ │ │ -
358 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {
│ │ │ -
359 arraywriter.reset(writer.makeArrayWriter
│ │ │ -
360 ( name(), ncomps(), nitems, Precision::uint8));
│ │ │ -
361 return !arraywriter->writeIsNoop();
│ │ │ -
362 }
│ │ │ -
│ │ │ -
│ │ │ -
364 virtual void write(const Cell& cell, const typename Base::Domain&) {
│ │ │ -
365 arraywriter->write(geometryType(cell.type()));
│ │ │ -
366 }
│ │ │ -
│ │ │ -
│ │ │ -
368 virtual void endWrite() {
│ │ │ -
369 arraywriter.reset();
│ │ │ -
370 }
│ │ │ -
│ │ │ -
371 };
│ │ │ -
│ │ │ -
372
│ │ │ -
373 } // namespace VTK
│ │ │ -
374
│ │ │ -
376
│ │ │ -
377} // namespace Dune
│ │ │ -
378
│ │ │ -
379#endif // DUNE_GRID_IO_FILE_VTK_FUNCTIONWRITER_HH
│ │ │ - │ │ │ - │ │ │ -
Data array writers for the VTKWriter.
│ │ │ -
Common stuff for the VTKWriter.
│ │ │ +
102 // for error messages
│ │ │ +
│ │ │ +
103 friend std :: ostream &operator<< ( std :: ostream &os, const BasicBlock &b )
│ │ │ +
104 {
│ │ │ +
105 return os << "block " << b.identifier << " (line " << b.pos << ")";
│ │ │ +
106 }
│ │ │ +
│ │ │ +
107
│ │ │ +
108 };
│ │ │ +
│ │ │ +
109
│ │ │ +
110 } // end namespace dgf
│ │ │ +
111
│ │ │ +
112} // end namespace Dune
│ │ │ +
113
│ │ │ +
114#endif
│ │ │ + │ │ │ + │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ -
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 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 {} │ │ │ │ @@ -2,577 +2,175 @@ │ │ │ │ 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 │ │ │ │ + * _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 │ │ │ │ -6#ifndef DUNE_GRID_IO_FILE_VTK_FUNCTIONWRITER_HH │ │ │ │ -7#define DUNE_GRID_IO_FILE_VTK_FUNCTIONWRITER_HH │ │ │ │ -8 │ │ │ │ -9#include │ │ │ │ -10#include │ │ │ │ +5#ifndef DUNE_DGF_BASICBLOCK_HH │ │ │ │ +6#define DUNE_DGF_BASICBLOCK_HH │ │ │ │ +7 │ │ │ │ +8#include │ │ │ │ +9#include │ │ │ │ +10#include │ │ │ │ 11#include │ │ │ │ -12#include │ │ │ │ -13#include │ │ │ │ -14 │ │ │ │ -15#include │ │ │ │ -16#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 │ │ │ │ -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{ │ │ │ │ +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 │ │ │ │ -_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; │ │ │ │ +_3_0 class _B_a_s_i_c_B_l_o_c_k │ │ │ │ +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 │ │ │ │ -_4_4 virtual std::string _n_a_m_e() const = 0; │ │ │ │ +43 // count the number of lines in the block │ │ │ │ +44 // int countlines (); │ │ │ │ 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() {} │ │ │ │ -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 { } │ │ │ │ +46 protected: │ │ │ │ +_4_7 std::stringstream _l_i_n_e; // the active line as string buffer │ │ │ │ +48 // for use in the derived classes │ │ │ │ +49 │ │ │ │ +50 // go back to beginning of block │ │ │ │ +_5_1 void _r_e_s_e_t () │ │ │ │ +52 { │ │ │ │ +53 pos = -1; │ │ │ │ +54 block_.clear(); │ │ │ │ +55 block_.seekg( 0 ); │ │ │ │ +56 } │ │ │ │ +57 │ │ │ │ +58 // get next line and store in string stream │ │ │ │ +59 bool _g_e_t_n_e_x_t_l_i_n_e (); │ │ │ │ +60 │ │ │ │ +61 // get next entry in line │ │ │ │ +62 template< class ENTRY > │ │ │ │ +_6_3 bool _g_e_t_n_e_x_t_e_n_t_r_y( ENTRY &entry ) │ │ │ │ +64 { │ │ │ │ +65 _l_i_n_e >> entry; │ │ │ │ +66 return static_cast< bool >( _l_i_n_e ); │ │ │ │ +67 } │ │ │ │ +68 │ │ │ │ +69 bool _g_e_t_t_o_k_e_n_p_a_r_a_m ( std :: string token, std :: string &entry ); │ │ │ │ +70 bool _f_i_n_d_t_o_k_e_n( std :: string token ); │ │ │ │ +71 │ │ │ │ +72 public: │ │ │ │ +73 // search for block in file and store in buffer │ │ │ │ +74 _B_a_s_i_c_B_l_o_c_k ( std::istream &in, const char* id ); │ │ │ │ +75 │ │ │ │ +76 // some information on this block │ │ │ │ +_7_7 bool _i_s_a_c_t_i_v_e () │ │ │ │ +78 { │ │ │ │ +79 return active; │ │ │ │ +80 } │ │ │ │ +81 │ │ │ │ +_8_2 bool _i_s_e_m_p_t_y () │ │ │ │ +83 { │ │ │ │ +84 return empty; │ │ │ │ +85 } │ │ │ │ +86 │ │ │ │ +_8_7 int &_n_o_f_l_i_n_e_s () │ │ │ │ +88 { │ │ │ │ +89 return linecount; │ │ │ │ +90 } │ │ │ │ +91 │ │ │ │ +_9_2 int _l_i_n_e_n_u_m_b_e_r () │ │ │ │ +93 { │ │ │ │ +94 return pos; │ │ │ │ +95 } │ │ │ │ +96 │ │ │ │ +_9_7 const std::string & _i_d () const │ │ │ │ +98 { │ │ │ │ +99 return identifier; │ │ │ │ +100 } │ │ │ │ 101 │ │ │ │ -_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 │ │ │ │ -_1_7_0 virtual bool _b_e_g_i_n_W_r_i_t_e(_V_T_U_W_r_i_t_e_r& writer, std::size_t nitems) { │ │ │ │ -171 arraywriter.reset(writer._m_a_k_e_A_r_r_a_y_W_r_i_t_e_r(_n_a_m_e(), _n_c_o_m_p_s(), │ │ │ │ -172 nitems, precision_)); │ │ │ │ -173 return !arraywriter->writeIsNoop(); │ │ │ │ -174 } │ │ │ │ -_1_7_6 virtual void _w_r_i_t_e(const typename _B_a_s_e_:_:_C_e_l_l& cell, │ │ │ │ -177 const typename _B_a_s_e_:_:_D_o_m_a_i_n& xl) { │ │ │ │ -178 FieldVector xg │ │ │ │ -179 = cell.geometry().global(xl); │ │ │ │ -180 for(unsigned d = 0; d < 3 && d < Base::Cell::Geometry::coorddimension; ++d) │ │ │ │ -181 arraywriter->write(xg[d]); │ │ │ │ -182 for(unsigned d = Base::Cell::Geometry::coorddimension; d < 3; ++d) │ │ │ │ -183 arraywriter->write(0); │ │ │ │ -184 } │ │ │ │ -_1_8_6 virtual void _e_n_d_W_r_i_t_e() { │ │ │ │ -187 arraywriter.reset(); │ │ │ │ -188 } │ │ │ │ -189 }; │ │ │ │ -190 │ │ │ │ -192 template │ │ │ │ -_1_9_3 class _C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r │ │ │ │ -194 : public _F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e │ │ │ │ -195 { │ │ │ │ -196 typedef _F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e_<_t_y_p_e_n_a_m_e_ _I_t_e_r_a_t_o_r_F_a_c_t_o_r_y_:_:_C_e_l_l_> _B_a_s_e; │ │ │ │ -197 static const unsigned mydim = Base::Cell::mydimension; │ │ │ │ -198 │ │ │ │ -199 const IteratorFactory& factory; │ │ │ │ -200 std::shared_ptr arraywriter; │ │ │ │ -201 std::vector pointIndices; │ │ │ │ -202 │ │ │ │ -203 public: │ │ │ │ -_2_0_5 _C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r(const IteratorFactory& factory_) │ │ │ │ -206 : factory(factory_) │ │ │ │ -207 { } │ │ │ │ -208 │ │ │ │ -_2_1_0 virtual std::string _n_a_m_e() const { return "connectivity"; } │ │ │ │ -211 │ │ │ │ -_2_1_3 virtual unsigned _n_c_o_m_p_s() const { return 1; } │ │ │ │ -214 │ │ │ │ -_2_1_6 virtual void _a_d_d_A_r_r_a_y(_P_V_T_U_W_r_i_t_e_r& writer) { │ │ │ │ -217 writer._a_d_d_A_r_r_a_y(_n_a_m_e(), _n_c_o_m_p_s(), _P_r_e_c_i_s_i_o_n_:_:_i_n_t_3_2); │ │ │ │ -218 } │ │ │ │ -219 │ │ │ │ -_2_2_1 virtual bool _b_e_g_i_n_W_r_i_t_e(_V_T_U_W_r_i_t_e_r& writer, std::size_t nitems) { │ │ │ │ -222 arraywriter.reset(writer._m_a_k_e_A_r_r_a_y_W_r_i_t_e_r(_n_a_m_e(), _n_c_o_m_p_s(), │ │ │ │ -223 nitems, _P_r_e_c_i_s_i_o_n_:_:_i_n_t_3_2)); │ │ │ │ -224 if(arraywriter->writeIsNoop()) │ │ │ │ -225 return false; │ │ │ │ -226 │ │ │ │ -228 pointIndices.resize(factory.indexSet().size(mydim)); │ │ │ │ -229 const typename IteratorFactory::PointIterator& pend = │ │ │ │ -230 factory.endPoints(); │ │ │ │ -231 typename IteratorFactory::PointIterator pit = factory.beginPoints(); │ │ │ │ -232 unsigned counter = 0; │ │ │ │ -233 while(pit != pend) { │ │ │ │ -234 pointIndices[factory.indexSet().subIndex │ │ │ │ -235 (pit->cell(), pit->duneIndex(), mydim)] = counter; │ │ │ │ -236 ++counter; │ │ │ │ -237 ++pit; │ │ │ │ -238 } │ │ │ │ -239 return true; │ │ │ │ -240 } │ │ │ │ -_2_4_2 virtual void _w_r_i_t_e(const typename _B_a_s_e_:_:_C_e_l_l& cell, unsigned cornerIndex) │ │ │ │ -243 { │ │ │ │ -244 // if pointIndices is empty, we're in writeIsNoop mode │ │ │ │ -245 if(pointIndices.size() == 0) │ │ │ │ -246 return; │ │ │ │ -247 arraywriter->write(pointIndices[factory.indexSet().subIndex │ │ │ │ -248 (cell, cornerIndex, mydim)]); │ │ │ │ -249 } │ │ │ │ -_2_5_1 virtual void _e_n_d_W_r_i_t_e() { │ │ │ │ -252 arraywriter.reset(); │ │ │ │ -253 pointIndices.clear(); │ │ │ │ -254 } │ │ │ │ -255 }; │ │ │ │ -256 │ │ │ │ -258 template │ │ │ │ -_2_5_9 class _N_o_n_C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r │ │ │ │ -260 : public _F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e │ │ │ │ -261 { │ │ │ │ -262 std::shared_ptr arraywriter; │ │ │ │ -263 unsigned counter; │ │ │ │ -264 │ │ │ │ -265 public: │ │ │ │ -_2_6_7 virtual std::string _n_a_m_e() const { return "connectivity"; } │ │ │ │ -268 │ │ │ │ -_2_7_0 virtual unsigned _n_c_o_m_p_s() const { return 1; } │ │ │ │ -271 │ │ │ │ -_2_7_3 virtual void _a_d_d_A_r_r_a_y(_P_V_T_U_W_r_i_t_e_r& writer) { │ │ │ │ -274 writer._a_d_d_A_r_r_a_y(_n_a_m_e(), _n_c_o_m_p_s(), _P_r_e_c_i_s_i_o_n_:_:_i_n_t_3_2); │ │ │ │ -275 } │ │ │ │ -276 │ │ │ │ -_2_7_8 virtual bool _b_e_g_i_n_W_r_i_t_e(_V_T_U_W_r_i_t_e_r& writer, std::size_t nitems) { │ │ │ │ -279 arraywriter.reset(writer._m_a_k_e_A_r_r_a_y_W_r_i_t_e_r(_n_a_m_e(), _n_c_o_m_p_s(), │ │ │ │ -280 nitems, _P_r_e_c_i_s_i_o_n_:_:_i_n_t_3_2)); │ │ │ │ -281 counter = 0; │ │ │ │ -282 return !arraywriter->writeIsNoop(); │ │ │ │ -283 } │ │ │ │ -_2_8_5 virtual void _w_r_i_t_e(const _C_e_l_l& /* cell */, unsigned /* cornerIndex */) │ │ │ │ -286 { │ │ │ │ -287 arraywriter->write(counter); │ │ │ │ -288 ++counter; │ │ │ │ -289 } │ │ │ │ -_2_9_1 virtual void _e_n_d_W_r_i_t_e() { │ │ │ │ -292 arraywriter.reset(); │ │ │ │ -293 } │ │ │ │ -294 }; │ │ │ │ -295 │ │ │ │ -297 template │ │ │ │ -_2_9_8 class _O_f_f_s_e_t_s_W_r_i_t_e_r │ │ │ │ -299 : public _F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e │ │ │ │ -300 { │ │ │ │ -301 typedef _F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e_<_C_e_l_l_> _B_a_s_e; │ │ │ │ -302 │ │ │ │ -303 std::shared_ptr arraywriter; │ │ │ │ -304 unsigned offset; │ │ │ │ -305 │ │ │ │ -306 public: │ │ │ │ -_3_0_8 virtual std::string _n_a_m_e() const { return "offsets"; } │ │ │ │ -309 │ │ │ │ -_3_1_1 virtual unsigned _n_c_o_m_p_s() const { return 1; } │ │ │ │ -312 │ │ │ │ -_3_1_4 virtual void _a_d_d_A_r_r_a_y(_P_V_T_U_W_r_i_t_e_r& writer) { │ │ │ │ -315 writer._a_d_d_A_r_r_a_y(_n_a_m_e(), _n_c_o_m_p_s(), _P_r_e_c_i_s_i_o_n_:_:_i_n_t_3_2); │ │ │ │ -316 } │ │ │ │ -317 │ │ │ │ -_3_1_9 virtual bool _b_e_g_i_n_W_r_i_t_e(_V_T_U_W_r_i_t_e_r& writer, std::size_t nitems) { │ │ │ │ -320 arraywriter.reset(writer._m_a_k_e_A_r_r_a_y_W_r_i_t_e_r(_n_a_m_e(), _n_c_o_m_p_s(), │ │ │ │ -321 nitems, _P_r_e_c_i_s_i_o_n_:_:_i_n_t_3_2)); │ │ │ │ -322 offset = 0; │ │ │ │ -323 return !arraywriter->writeIsNoop(); │ │ │ │ -324 } │ │ │ │ -_3_2_6 virtual void _w_r_i_t_e(const _C_e_l_l& cell, const typename _B_a_s_e_:_:_D_o_m_a_i_n&) { │ │ │ │ -327 offset += cell.geometry().corners(); │ │ │ │ -328 arraywriter->write(offset); │ │ │ │ -329 } │ │ │ │ -_3_3_1 virtual void _e_n_d_W_r_i_t_e() { │ │ │ │ -332 arraywriter.reset(); │ │ │ │ -333 } │ │ │ │ -334 }; │ │ │ │ -335 │ │ │ │ -337 template │ │ │ │ -_3_3_8 class _T_y_p_e_s_W_r_i_t_e_r │ │ │ │ -339 : public _F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e │ │ │ │ -340 { │ │ │ │ -341 typedef _F_u_n_c_t_i_o_n_W_r_i_t_e_r_B_a_s_e_<_C_e_l_l_> _B_a_s_e; │ │ │ │ -342 │ │ │ │ -343 std::shared_ptr arraywriter; │ │ │ │ -344 │ │ │ │ -345 public: │ │ │ │ -_3_4_7 virtual std::string _n_a_m_e() const { return "types"; } │ │ │ │ -348 │ │ │ │ -_3_5_0 virtual unsigned _n_c_o_m_p_s() const { return 1; } │ │ │ │ -351 │ │ │ │ -_3_5_3 virtual void _a_d_d_A_r_r_a_y(_P_V_T_U_W_r_i_t_e_r& writer) { │ │ │ │ -354 writer._a_d_d_A_r_r_a_y(_n_a_m_e(), _n_c_o_m_p_s(), _P_r_e_c_i_s_i_o_n_:_:_u_i_n_t_8); │ │ │ │ -355 } │ │ │ │ -356 │ │ │ │ -_3_5_8 virtual bool _b_e_g_i_n_W_r_i_t_e(_V_T_U_W_r_i_t_e_r& writer, std::size_t nitems) { │ │ │ │ -359 arraywriter.reset(writer._m_a_k_e_A_r_r_a_y_W_r_i_t_e_r │ │ │ │ -360 ( _n_a_m_e(), _n_c_o_m_p_s(), nitems, _P_r_e_c_i_s_i_o_n_:_:_u_i_n_t_8)); │ │ │ │ -361 return !arraywriter->writeIsNoop(); │ │ │ │ -362 } │ │ │ │ -_3_6_4 virtual void _w_r_i_t_e(const _C_e_l_l& cell, const typename _B_a_s_e_:_:_D_o_m_a_i_n&) { │ │ │ │ -365 arraywriter->write(_g_e_o_m_e_t_r_y_T_y_p_e(cell.type())); │ │ │ │ -366 } │ │ │ │ -_3_6_8 virtual void _e_n_d_W_r_i_t_e() { │ │ │ │ -369 arraywriter.reset(); │ │ │ │ -370 } │ │ │ │ -371 }; │ │ │ │ -372 │ │ │ │ -373 } // namespace VTK │ │ │ │ -374 │ │ │ │ -376 │ │ │ │ -377} // namespace Dune │ │ │ │ -378 │ │ │ │ -379#endif // DUNE_GRID_IO_FILE_VTK_FUNCTIONWRITER_HH │ │ │ │ -_v_t_u_w_r_i_t_e_r_._h_h │ │ │ │ -_p_v_t_u_w_r_i_t_e_r_._h_h │ │ │ │ -_d_a_t_a_a_r_r_a_y_w_r_i_t_e_r_._h_h │ │ │ │ -Data array writers for the VTKWriter. │ │ │ │ -_c_o_m_m_o_n_._h_h │ │ │ │ -Common stuff for the VTKWriter. │ │ │ │ +102 // for error messages │ │ │ │ +_1_0_3 friend std :: ostream &_o_p_e_r_a_t_o_r_<_<_ ( std :: ostream &os, const _B_a_s_i_c_B_l_o_c_k &b │ │ │ │ +) │ │ │ │ +104 { │ │ │ │ +105 return os << "block " << b.identifier << " (line " << b.pos << ")"; │ │ │ │ +106 } │ │ │ │ +107 │ │ │ │ +108 }; │ │ │ │ +109 │ │ │ │ +110 } // end namespace dgf │ │ │ │ +111 │ │ │ │ +112} // end namespace Dune │ │ │ │ +113 │ │ │ │ +114#endif │ │ │ │ +_d_g_f_e_x_c_e_p_t_i_o_n_._h_h │ │ │ │ +_e_n_t_i_t_y_k_e_y_._h_h │ │ │ │ _D_u_n_e │ │ │ │ Include standard header files. │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ -_D_u_n_e_:_:_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_:_:_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/a00797.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: function.hh File Reference │ │ │ +dune-grid: general.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,59 +65,43 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
function.hh File Reference
│ │ │ +
general.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>
│ │ │ +
#include <iostream>
│ │ │ +#include <vector>
│ │ │ +#include <dune/grid/io/file/dgfparser/blocks/basic.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...
class  Dune::dgf::GeneralBlock
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ + │ │ │

│ │ │ 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,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 │ │ │ │ -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> │ │ │ │ +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_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_._._. │ │ │ │ +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. │ │ │ │   │ │ │ │ -********** 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/a00797_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: function.hh Source File │ │ │ +dune-grid: general.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,277 +70,98 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
function.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_FUNCTION_HH
│ │ │ -
7#define DUNE_GRID_IO_FILE_VTK_FUNCTION_HH
│ │ │ -
8
│ │ │ -
9#include <string>
│ │ │ +
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
│ │ │ -
11#include <dune/common/exceptions.hh>
│ │ │ -
12#include <dune/common/fvector.hh>
│ │ │ + │ │ │ +
12
│ │ │
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 //
│ │ │ +
14namespace Dune
│ │ │ +
15{
│ │ │ +
16
│ │ │ +
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
│ │ │ -
40 template< class GridView >
│ │ │ -
│ │ │ - │ │ │ -
42 {
│ │ │ -
43 public:
│ │ │ -
44 typedef typename GridView::ctype ctype;
│ │ │ -
45 constexpr static int dim = GridView::dimension;
│ │ │ -
46 typedef typename GridView::template Codim< 0 >::Entity Entity;
│ │ │ -
47
│ │ │ -
50 virtual int ncomps () const = 0;
│ │ │ -
51
│ │ │ -
53
│ │ │ -
60 virtual double evaluate (int comp, const Entity& e,
│ │ │ -
61 const Dune::FieldVector<ctype,dim>& xi) const = 0;
│ │ │ +
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
│ │ │ -
64 virtual std::string name () const = 0;
│ │ │ -
65
│ │ │ -
│ │ │ -
67 virtual VTK::Precision precision() const
│ │ │ -
68 { return VTK::Precision::float32; }
│ │ │ -
│ │ │ -
69
│ │ │ -
71 virtual ~VTKFunction () {}
│ │ │ -
72 };
│ │ │ -
│ │ │ -
73
│ │ │ -
75 //
│ │ │ -
76 // P0VTKFunction
│ │ │ -
77 //
│ │ │ -
78
│ │ │ -
80
│ │ │ -
94 template<typename GV, typename V>
│ │ │ -
│ │ │ - │ │ │ -
96 : public VTKFunction< GV >
│ │ │ -
97 {
│ │ │ -
99 typedef VTKFunction< GV > Base;
│ │ │ - │ │ │ -
102
│ │ │ -
104 const V& v;
│ │ │ -
106 std::string s;
│ │ │ -
108 int ncomps_;
│ │ │ -
111 int mycomp_;
│ │ │ -
113 VTK::Precision prec_;
│ │ │ -
115 Mapper mapper;
│ │ │ -
116
│ │ │ -
117 public:
│ │ │ -
118 typedef typename Base::Entity Entity;
│ │ │ -
119 typedef typename Base::ctype ctype;
│ │ │ -
120 using Base::dim;
│ │ │ -
121
│ │ │ -
│ │ │ -
123 int ncomps () const override
│ │ │ -
124 {
│ │ │ -
125 return 1;
│ │ │ -
126 }
│ │ │ -
│ │ │ -
127
│ │ │ -
│ │ │ -
129 double evaluate (int, const Entity& e,
│ │ │ -
130 const Dune::FieldVector<ctype,dim>&) const override
│ │ │ -
131 {
│ │ │ -
132 return v[mapper.index(e)*ncomps_+mycomp_];
│ │ │ -
133 }
│ │ │ -
│ │ │ -
134
│ │ │ -
│ │ │ -
136 std::string name () const override
│ │ │ -
137 {
│ │ │ -
138 return s;
│ │ │ -
139 }
│ │ │ -
│ │ │ -
140
│ │ │ -
│ │ │ -
142 VTK::Precision precision() const override
│ │ │ -
143 {
│ │ │ -
144 return prec_;
│ │ │ -
145 }
│ │ │ -
│ │ │ -
146
│ │ │ -
148
│ │ │ -
│ │ │ -
165 P0VTKFunction(const GV &gv, const V &v_, const std::string &s_,
│ │ │ -
166 int ncomps=1, int mycomp=0, VTK::Precision prec = VTK::Precision::float32)
│ │ │ -
167 : v( v_ ),
│ │ │ -
168 s( s_ ),
│ │ │ -
169 ncomps_(ncomps),
│ │ │ -
170 mycomp_(mycomp),
│ │ │ -
171 prec_(prec),
│ │ │ -
172 mapper( gv, mcmgElementLayout() )
│ │ │ -
173 {
│ │ │ -
174 if (v.size()!=(unsigned int)(mapper.size()*ncomps_))
│ │ │ -
175 DUNE_THROW(IOError, "P0VTKFunction: size mismatch");
│ │ │ -
176 }
│ │ │ -
│ │ │ -
177
│ │ │ -
179 virtual ~P0VTKFunction() {}
│ │ │ -
180 };
│ │ │ -
│ │ │ -
181
│ │ │ -
183 //
│ │ │ -
184 // P1VTKFunction
│ │ │ -
185 //
│ │ │ -
186
│ │ │ -
188
│ │ │ -
202 template<typename GV, typename V>
│ │ │ -
│ │ │ - │ │ │ -
204 : public VTKFunction< GV >
│ │ │ -
205 {
│ │ │ -
207 typedef VTKFunction< GV > Base;
│ │ │ - │ │ │ -
210
│ │ │ -
212 const V& v;
│ │ │ -
214 std::string s;
│ │ │ -
216 int ncomps_;
│ │ │ -
219 int mycomp_;
│ │ │ -
221 VTK::Precision prec_;
│ │ │ -
223 Mapper mapper;
│ │ │ -
224
│ │ │ -
225 public:
│ │ │ -
226 typedef typename Base::Entity Entity;
│ │ │ -
227 typedef typename Base::ctype ctype;
│ │ │ -
228 using Base::dim;
│ │ │ -
229
│ │ │ -
│ │ │ -
231 int ncomps () const override
│ │ │ -
232 {
│ │ │ -
233 return 1;
│ │ │ -
234 }
│ │ │ -
│ │ │ -
235
│ │ │ -
│ │ │ -
237 double evaluate ([[maybe_unused]] int comp, const Entity& e,
│ │ │ -
238 const Dune::FieldVector<ctype,dim>& xi) const override
│ │ │ -
239 {
│ │ │ -
240 const unsigned int myDim = Entity::mydimension;
│ │ │ -
241 const unsigned int nVertices = e.subEntities(dim);
│ │ │ -
242
│ │ │ -
243 std::vector<FieldVector<ctype,1> > cornerValues(nVertices);
│ │ │ -
244 for (unsigned i=0; i<nVertices; ++i)
│ │ │ -
245 cornerValues[i] = v[mapper.subIndex(e,i,myDim)*ncomps_+mycomp_];
│ │ │ -
246
│ │ │ -
247 // (Ab)use the MultiLinearGeometry class to do multi-linear interpolation between scalars
│ │ │ -
248 const MultiLinearGeometry<ctype,dim,1> interpolation(e.type(), cornerValues);
│ │ │ -
249 return interpolation.global(xi);
│ │ │ -
250 }
│ │ │ -
│ │ │ -
251
│ │ │ -
│ │ │ -
253 std::string name () const override
│ │ │ -
254 {
│ │ │ -
255 return s;
│ │ │ -
256 }
│ │ │ -
│ │ │ -
257
│ │ │ -
│ │ │ -
259 VTK::Precision precision() const override
│ │ │ -
260 {
│ │ │ -
261 return prec_;
│ │ │ -
262 }
│ │ │ -
│ │ │ -
263
│ │ │ -
265
│ │ │ -
│ │ │ -
282 P1VTKFunction(const GV& gv, const V &v_, const std::string &s_,
│ │ │ -
283 int ncomps=1, int mycomp=0, VTK::Precision prec = VTK::Precision::float32)
│ │ │ -
284 : v( v_ ),
│ │ │ -
285 s( s_ ),
│ │ │ -
286 ncomps_(ncomps),
│ │ │ -
287 mycomp_(mycomp),
│ │ │ -
288 prec_(prec),
│ │ │ -
289 mapper( gv, mcmgVertexLayout() )
│ │ │ -
290 {
│ │ │ -
291 if (v.size()!=(unsigned int)(mapper.size()*ncomps_))
│ │ │ -
292 DUNE_THROW(IOError,"P1VTKFunction: size mismatch");
│ │ │ -
293 }
│ │ │ -
│ │ │ -
294
│ │ │ -
296 virtual ~P1VTKFunction() {}
│ │ │ -
297 };
│ │ │ -
│ │ │ -
298
│ │ │ -
300
│ │ │ -
301} // namespace Dune
│ │ │ -
302
│ │ │ -
303#endif // DUNE_GRID_IO_FILE_VTK_FUNCTION_HH
│ │ │ -
Mapper for multiple codim and multiple geometry types.
│ │ │ -
Common stuff for the VTKWriter.
│ │ │ -
static constexpr int dimension
The dimension of the grid.
Definition common/gridview.hh: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
│ │ │ +
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
│ │ │ - │ │ │ -
static constexpr int mydimension
Dimensionality of the reference element of the entity.
Definition common/entity.hh:112
│ │ │ -
A struct that collects all associated types of one implementation from the Traits class.
Definition common/gridview.hh: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
│ │ │ -
Index index(const EntityType &e) const
Map entity to starting index in array for dof block.
Definition mcmgmapper.hh:171
│ │ │ -
A base class for grid functions with any return type and dimension.
Definition function.hh:42
│ │ │ -
virtual double evaluate(int comp, const Entity &e, const Dune::FieldVector< ctype, dim > &xi) const =0
evaluate single component comp in the entity e at local coordinates xi
│ │ │ -
GridView::ctype ctype
Definition function.hh:44
│ │ │ -
GridView::template Codim< 0 >::Entity Entity
Definition function.hh:46
│ │ │ -
static constexpr int dim
Definition function.hh:45
│ │ │ -
virtual std::string name() const =0
get name
│ │ │ -
virtual VTK::Precision precision() const
get output precision for the field
Definition function.hh:67
│ │ │ -
virtual int ncomps() const =0
│ │ │ -
virtual ~VTKFunction()
virtual destructor
Definition function.hh:71
│ │ │ -
Take a vector and interpret it as cell data for the VTKWriter.
Definition function.hh:97
│ │ │ -
std::string name() const override
get name
Definition function.hh:136
│ │ │ -
Base::ctype ctype
Definition function.hh:119
│ │ │ -
double evaluate(int, const Entity &e, const Dune::FieldVector< ctype, dim > &) const override
evaluate
Definition function.hh:129
│ │ │ -
P0VTKFunction(const GV &gv, const V &v_, const std::string &s_, int ncomps=1, int mycomp=0, VTK::Precision prec=VTK::Precision::float32)
construct from a vector and a name
Definition function.hh:165
│ │ │ -
VTK::Precision precision() const override
get output precision for the field
Definition function.hh:142
│ │ │ -
Base::Entity Entity
Definition function.hh:118
│ │ │ -
virtual ~P0VTKFunction()
destructor
Definition function.hh:179
│ │ │ -
int ncomps() const override
return number of components
Definition function.hh:123
│ │ │ -
Take a vector and interpret it as point data for the VTKWriter.
Definition function.hh:205
│ │ │ -
std::string name() const override
get name
Definition function.hh:253
│ │ │ -
virtual ~P1VTKFunction()
destructor
Definition function.hh:296
│ │ │ -
Base::Entity Entity
Definition function.hh:226
│ │ │ -
Base::ctype ctype
Definition function.hh:227
│ │ │ -
VTK::Precision precision() const override
get output precision for the field
Definition function.hh:259
│ │ │ -
double evaluate(int comp, const Entity &e, const Dune::FieldVector< ctype, dim > &xi) const override
evaluate
Definition function.hh:237
│ │ │ -
P1VTKFunction(const GV &gv, const V &v_, const std::string &s_, int ncomps=1, int mycomp=0, VTK::Precision prec=VTK::Precision::float32)
construct from a vector and a name
Definition function.hh:282
│ │ │ -
int ncomps() const override
return number of components
Definition function.hh:231
│ │ │ +
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,353 +2,99 @@ │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_r_i_d │ │ │ │ * _i_o │ │ │ │ * _f_i_l_e │ │ │ │ - * _v_t_k │ │ │ │ -function.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_FUNCTION_HH │ │ │ │ -7#define DUNE_GRID_IO_FILE_VTK_FUNCTION_HH │ │ │ │ -8 │ │ │ │ -9#include │ │ │ │ +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 │ │ │ │ -12#include │ │ │ │ +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 │ │ │ │ -18#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_m_c_m_g_m_a_p_p_e_r_._h_h> │ │ │ │ -19#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_m_m_o_n_._h_h> │ │ │ │ -20 │ │ │ │ -26namespace _D_u_n_e │ │ │ │ -27{ │ │ │ │ -30 │ │ │ │ -32 // │ │ │ │ -33 // Base VTKFunction │ │ │ │ -34 // │ │ │ │ +14namespace _D_u_n_e │ │ │ │ +15{ │ │ │ │ +16 │ │ │ │ +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 │ │ │ │ -40 template< class GridView > │ │ │ │ -_4_1 class _V_T_K_F_u_n_c_t_i_o_n │ │ │ │ +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 public: │ │ │ │ -_4_4 typedef typename _G_r_i_d_V_i_e_w_:_:_c_t_y_p_e _c_t_y_p_e; │ │ │ │ -_4_5 constexpr static int _d_i_m = _G_r_i_d_V_i_e_w_:_:_d_i_m_e_n_s_i_o_n; │ │ │ │ -_4_6 typedef typename _G_r_i_d_V_i_e_w_:_:_t_e_m_p_l_a_t_e Codim< 0 >::Entity _E_n_t_i_t_y; │ │ │ │ -47 │ │ │ │ -_5_0 virtual int _n_c_o_m_p_s () const = 0; │ │ │ │ -51 │ │ │ │ -53 │ │ │ │ -_6_0 virtual double _e_v_a_l_u_a_t_e (int comp, const _E_n_t_i_t_y& e, │ │ │ │ -61 const Dune::FieldVector& xi) const = 0; │ │ │ │ +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 │ │ │ │ -_6_4 virtual std::string _n_a_m_e () const = 0; │ │ │ │ -65 │ │ │ │ -_6_7 virtual _V_T_K_:_:_P_r_e_c_i_s_i_o_n _p_r_e_c_i_s_i_o_n() const │ │ │ │ -68 { return _V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2; } │ │ │ │ -69 │ │ │ │ -_7_1 virtual _~_V_T_K_F_u_n_c_t_i_o_n () {} │ │ │ │ -72 }; │ │ │ │ -73 │ │ │ │ -75 // │ │ │ │ -76 // P0VTKFunction │ │ │ │ -77 // │ │ │ │ -78 │ │ │ │ -80 │ │ │ │ -94 template │ │ │ │ -_9_5 class _P_0_V_T_K_F_u_n_c_t_i_o_n │ │ │ │ -96 : public _V_T_K_F_u_n_c_t_i_o_n< GV > │ │ │ │ -97 { │ │ │ │ -99 typedef _V_T_K_F_u_n_c_t_i_o_n_<_ _G_V_ _> _B_a_s_e; │ │ │ │ -101 typedef _M_u_l_t_i_p_l_e_C_o_d_i_m_M_u_l_t_i_p_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_<_G_V_> _M_a_p_p_e_r; │ │ │ │ -102 │ │ │ │ -104 const V& v; │ │ │ │ -106 std::string s; │ │ │ │ -108 int ncomps_; │ │ │ │ -111 int mycomp_; │ │ │ │ -113 _V_T_K_:_:_P_r_e_c_i_s_i_o_n prec_; │ │ │ │ -115 _M_a_p_p_e_r mapper; │ │ │ │ -116 │ │ │ │ -117 public: │ │ │ │ -_1_1_8 typedef typename _B_a_s_e_:_:_E_n_t_i_t_y _E_n_t_i_t_y; │ │ │ │ -_1_1_9 typedef typename _B_a_s_e_:_:_c_t_y_p_e _c_t_y_p_e; │ │ │ │ -120 using _B_a_s_e_:_:_d_i_m; │ │ │ │ -121 │ │ │ │ -_1_2_3 int _n_c_o_m_p_s () const override │ │ │ │ -124 { │ │ │ │ -125 return 1; │ │ │ │ -126 } │ │ │ │ -127 │ │ │ │ -_1_2_9 double _e_v_a_l_u_a_t_e (int, const _E_n_t_i_t_y& e, │ │ │ │ -130 const Dune::FieldVector&) const override │ │ │ │ -131 { │ │ │ │ -132 return v[mapper._i_n_d_e_x(e)*ncomps_+mycomp_]; │ │ │ │ -133 } │ │ │ │ -134 │ │ │ │ -_1_3_6 std::string _n_a_m_e () const override │ │ │ │ -137 { │ │ │ │ -138 return s; │ │ │ │ -139 } │ │ │ │ -140 │ │ │ │ -_1_4_2 _V_T_K_:_:_P_r_e_c_i_s_i_o_n _p_r_e_c_i_s_i_o_n() const override │ │ │ │ -143 { │ │ │ │ -144 return prec_; │ │ │ │ -145 } │ │ │ │ -146 │ │ │ │ -148 │ │ │ │ -_1_6_5 _P_0_V_T_K_F_u_n_c_t_i_o_n(const GV &gv, const V &v_, const std::string &s_, │ │ │ │ -166 int _n_c_o_m_p_s=1, int mycomp=0, _V_T_K_:_:_P_r_e_c_i_s_i_o_n prec = _V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2) │ │ │ │ -167 : v( v_ ), │ │ │ │ -168 s( s_ ), │ │ │ │ -169 ncomps_(_n_c_o_m_p_s), │ │ │ │ -170 mycomp_(mycomp), │ │ │ │ -171 prec_(prec), │ │ │ │ -172 mapper( gv, _m_c_m_g_E_l_e_m_e_n_t_L_a_y_o_u_t() ) │ │ │ │ -173 { │ │ │ │ -174 if (v.size()!=(unsigned int)(mapper._s_i_z_e()*ncomps_)) │ │ │ │ -175 DUNE_THROW(IOError, "P0VTKFunction: size mismatch"); │ │ │ │ -176 } │ │ │ │ -177 │ │ │ │ -_1_7_9 virtual _~_P_0_V_T_K_F_u_n_c_t_i_o_n() {} │ │ │ │ -180 }; │ │ │ │ -181 │ │ │ │ -183 // │ │ │ │ -184 // P1VTKFunction │ │ │ │ -185 // │ │ │ │ -186 │ │ │ │ -188 │ │ │ │ -202 template │ │ │ │ -_2_0_3 class _P_1_V_T_K_F_u_n_c_t_i_o_n │ │ │ │ -204 : public _V_T_K_F_u_n_c_t_i_o_n< GV > │ │ │ │ -205 { │ │ │ │ -207 typedef _V_T_K_F_u_n_c_t_i_o_n_<_ _G_V_ _> _B_a_s_e; │ │ │ │ -209 typedef _M_u_l_t_i_p_l_e_C_o_d_i_m_M_u_l_t_i_p_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_<_G_V_> _M_a_p_p_e_r; │ │ │ │ -210 │ │ │ │ -212 const V& v; │ │ │ │ -214 std::string s; │ │ │ │ -216 int ncomps_; │ │ │ │ -219 int mycomp_; │ │ │ │ -221 _V_T_K_:_:_P_r_e_c_i_s_i_o_n prec_; │ │ │ │ -223 _M_a_p_p_e_r mapper; │ │ │ │ -224 │ │ │ │ -225 public: │ │ │ │ -_2_2_6 typedef typename _B_a_s_e_:_:_E_n_t_i_t_y _E_n_t_i_t_y; │ │ │ │ -_2_2_7 typedef typename _B_a_s_e_:_:_c_t_y_p_e _c_t_y_p_e; │ │ │ │ -228 using _B_a_s_e_:_:_d_i_m; │ │ │ │ -229 │ │ │ │ -_2_3_1 int _n_c_o_m_p_s () const override │ │ │ │ -232 { │ │ │ │ -233 return 1; │ │ │ │ -234 } │ │ │ │ -235 │ │ │ │ -_2_3_7 double _e_v_a_l_u_a_t_e ([[maybe_unused]] int comp, const _E_n_t_i_t_y& e, │ │ │ │ -238 const Dune::FieldVector& xi) const override │ │ │ │ -239 { │ │ │ │ -240 const unsigned int myDim = _E_n_t_i_t_y_:_:_m_y_d_i_m_e_n_s_i_o_n; │ │ │ │ -241 const unsigned int nVertices = e.subEntities(_d_i_m); │ │ │ │ -242 │ │ │ │ -243 std::vector > cornerValues(nVertices); │ │ │ │ -244 for (unsigned i=0; i interpolation(e.type(), │ │ │ │ -cornerValues); │ │ │ │ -249 return interpolation.global(xi); │ │ │ │ -250 } │ │ │ │ -251 │ │ │ │ -_2_5_3 std::string _n_a_m_e () const override │ │ │ │ -254 { │ │ │ │ -255 return s; │ │ │ │ -256 } │ │ │ │ -257 │ │ │ │ -_2_5_9 _V_T_K_:_:_P_r_e_c_i_s_i_o_n _p_r_e_c_i_s_i_o_n() const override │ │ │ │ -260 { │ │ │ │ -261 return prec_; │ │ │ │ -262 } │ │ │ │ -263 │ │ │ │ -265 │ │ │ │ -_2_8_2 _P_1_V_T_K_F_u_n_c_t_i_o_n(const GV& gv, const V &v_, const std::string &s_, │ │ │ │ -283 int _n_c_o_m_p_s=1, int mycomp=0, _V_T_K_:_:_P_r_e_c_i_s_i_o_n prec = _V_T_K_:_:_P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2) │ │ │ │ -284 : v( v_ ), │ │ │ │ -285 s( s_ ), │ │ │ │ -286 ncomps_(_n_c_o_m_p_s), │ │ │ │ -287 mycomp_(mycomp), │ │ │ │ -288 prec_(prec), │ │ │ │ -289 mapper( gv, _m_c_m_g_V_e_r_t_e_x_L_a_y_o_u_t() ) │ │ │ │ -290 { │ │ │ │ -291 if (v.size()!=(unsigned int)(mapper._s_i_z_e()*ncomps_)) │ │ │ │ -292 DUNE_THROW(IOError,"P1VTKFunction: size mismatch"); │ │ │ │ -293 } │ │ │ │ -294 │ │ │ │ -_2_9_6 virtual _~_P_1_V_T_K_F_u_n_c_t_i_o_n() {} │ │ │ │ -297 }; │ │ │ │ -298 │ │ │ │ -300 │ │ │ │ -301} // namespace Dune │ │ │ │ -302 │ │ │ │ -303#endif // DUNE_GRID_IO_FILE_VTK_FUNCTION_HH │ │ │ │ -_m_c_m_g_m_a_p_p_e_r_._h_h │ │ │ │ -Mapper for multiple codim and multiple geometry types. │ │ │ │ -_c_o_m_m_o_n_._h_h │ │ │ │ -Common stuff for the VTKWriter. │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ -static constexpr int dimension │ │ │ │ -The dimension of the grid. │ │ │ │ -DDeeffiinniittiioonn common/gridview.hh: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_:_:_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 │ │ │ │ +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_:_:_P_r_e_c_i_s_i_o_n_:_:_f_l_o_a_t_3_2 │ │ │ │ -@ float32 │ │ │ │ -_D_u_n_e_:_:_E_n_t_i_t_y_:_:_m_y_d_i_m_e_n_s_i_o_n │ │ │ │ -static constexpr int mydimension │ │ │ │ -Dimensionality of the reference element of the entity. │ │ │ │ -DDeeffiinniittiioonn common/entity.hh:112 │ │ │ │ -_D_u_n_e_:_:_G_r_i_d_V_i_e_w_:_:_C_o_d_i_m │ │ │ │ -A struct that collects all associated types of one implementation from the │ │ │ │ -Traits class. │ │ │ │ -DDeeffiinniittiioonn common/gridview.hh: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_:_:_M_u_l_t_i_p_l_e_C_o_d_i_m_M_u_l_t_i_p_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r_:_:_i_n_d_e_x │ │ │ │ -Index index(const EntityType &e) const │ │ │ │ -Map entity to starting index in array for dof block. │ │ │ │ -DDeeffiinniittiioonn mcmgmapper.hh:171 │ │ │ │ -_D_u_n_e_:_:_V_T_K_F_u_n_c_t_i_o_n │ │ │ │ -A base class for grid functions with any return type and dimension. │ │ │ │ -DDeeffiinniittiioonn function.hh:42 │ │ │ │ -_D_u_n_e_:_:_V_T_K_F_u_n_c_t_i_o_n_:_:_e_v_a_l_u_a_t_e │ │ │ │ -virtual double evaluate(int comp, const Entity &e, const Dune::FieldVector< │ │ │ │ -ctype, dim > &xi) const =0 │ │ │ │ -evaluate single component comp in the entity e at local coordinates xi │ │ │ │ -_D_u_n_e_:_:_V_T_K_F_u_n_c_t_i_o_n_:_:_c_t_y_p_e │ │ │ │ -GridView::ctype ctype │ │ │ │ -DDeeffiinniittiioonn function.hh:44 │ │ │ │ -_D_u_n_e_:_:_V_T_K_F_u_n_c_t_i_o_n_:_:_E_n_t_i_t_y │ │ │ │ -GridView::template Codim< 0 >::Entity Entity │ │ │ │ -DDeeffiinniittiioonn function.hh:46 │ │ │ │ -_D_u_n_e_:_:_V_T_K_F_u_n_c_t_i_o_n_:_:_d_i_m │ │ │ │ -static constexpr int dim │ │ │ │ -DDeeffiinniittiioonn function.hh:45 │ │ │ │ -_D_u_n_e_:_:_V_T_K_F_u_n_c_t_i_o_n_:_:_n_a_m_e │ │ │ │ -virtual std::string name() const =0 │ │ │ │ -get name │ │ │ │ -_D_u_n_e_:_:_V_T_K_F_u_n_c_t_i_o_n_:_:_p_r_e_c_i_s_i_o_n │ │ │ │ -virtual VTK::Precision precision() const │ │ │ │ -get output precision for the field │ │ │ │ -DDeeffiinniittiioonn function.hh:67 │ │ │ │ -_D_u_n_e_:_:_V_T_K_F_u_n_c_t_i_o_n_:_:_n_c_o_m_p_s │ │ │ │ -virtual int ncomps() const =0 │ │ │ │ -_D_u_n_e_:_:_V_T_K_F_u_n_c_t_i_o_n_:_:_~_V_T_K_F_u_n_c_t_i_o_n │ │ │ │ -virtual ~VTKFunction() │ │ │ │ -virtual destructor │ │ │ │ -DDeeffiinniittiioonn function.hh:71 │ │ │ │ -_D_u_n_e_:_:_P_0_V_T_K_F_u_n_c_t_i_o_n │ │ │ │ -Take a vector and interpret it as cell data for the VTKWriter. │ │ │ │ -DDeeffiinniittiioonn function.hh:97 │ │ │ │ -_D_u_n_e_:_:_P_0_V_T_K_F_u_n_c_t_i_o_n_:_:_n_a_m_e │ │ │ │ -std::string name() const override │ │ │ │ -get name │ │ │ │ -DDeeffiinniittiioonn function.hh:136 │ │ │ │ -_D_u_n_e_:_:_P_0_V_T_K_F_u_n_c_t_i_o_n_:_:_c_t_y_p_e │ │ │ │ -Base::ctype ctype │ │ │ │ -DDeeffiinniittiioonn function.hh:119 │ │ │ │ -_D_u_n_e_:_:_P_0_V_T_K_F_u_n_c_t_i_o_n_:_:_e_v_a_l_u_a_t_e │ │ │ │ -double evaluate(int, const Entity &e, const Dune::FieldVector< ctype, dim > &) │ │ │ │ -const override │ │ │ │ -evaluate │ │ │ │ -DDeeffiinniittiioonn function.hh:129 │ │ │ │ -_D_u_n_e_:_:_P_0_V_T_K_F_u_n_c_t_i_o_n_:_:_P_0_V_T_K_F_u_n_c_t_i_o_n │ │ │ │ -P0VTKFunction(const GV &gv, const V &v_, const std::string &s_, int ncomps=1, │ │ │ │ -int mycomp=0, VTK::Precision prec=VTK::Precision::float32) │ │ │ │ -construct from a vector and a name │ │ │ │ -DDeeffiinniittiioonn function.hh:165 │ │ │ │ -_D_u_n_e_:_:_P_0_V_T_K_F_u_n_c_t_i_o_n_:_:_p_r_e_c_i_s_i_o_n │ │ │ │ -VTK::Precision precision() const override │ │ │ │ -get output precision for the field │ │ │ │ -DDeeffiinniittiioonn function.hh:142 │ │ │ │ -_D_u_n_e_:_:_P_0_V_T_K_F_u_n_c_t_i_o_n_:_:_E_n_t_i_t_y │ │ │ │ -Base::Entity Entity │ │ │ │ -DDeeffiinniittiioonn function.hh:118 │ │ │ │ -_D_u_n_e_:_:_P_0_V_T_K_F_u_n_c_t_i_o_n_:_:_~_P_0_V_T_K_F_u_n_c_t_i_o_n │ │ │ │ -virtual ~P0VTKFunction() │ │ │ │ -destructor │ │ │ │ -DDeeffiinniittiioonn function.hh:179 │ │ │ │ -_D_u_n_e_:_:_P_0_V_T_K_F_u_n_c_t_i_o_n_:_:_n_c_o_m_p_s │ │ │ │ -int ncomps() const override │ │ │ │ -return number of components │ │ │ │ -DDeeffiinniittiioonn function.hh:123 │ │ │ │ -_D_u_n_e_:_:_P_1_V_T_K_F_u_n_c_t_i_o_n │ │ │ │ -Take a vector and interpret it as point data for the VTKWriter. │ │ │ │ -DDeeffiinniittiioonn function.hh:205 │ │ │ │ -_D_u_n_e_:_:_P_1_V_T_K_F_u_n_c_t_i_o_n_:_:_n_a_m_e │ │ │ │ -std::string name() const override │ │ │ │ -get name │ │ │ │ -DDeeffiinniittiioonn function.hh:253 │ │ │ │ -_D_u_n_e_:_:_P_1_V_T_K_F_u_n_c_t_i_o_n_:_:_~_P_1_V_T_K_F_u_n_c_t_i_o_n │ │ │ │ -virtual ~P1VTKFunction() │ │ │ │ -destructor │ │ │ │ -DDeeffiinniittiioonn function.hh:296 │ │ │ │ -_D_u_n_e_:_:_P_1_V_T_K_F_u_n_c_t_i_o_n_:_:_E_n_t_i_t_y │ │ │ │ -Base::Entity Entity │ │ │ │ -DDeeffiinniittiioonn function.hh:226 │ │ │ │ -_D_u_n_e_:_:_P_1_V_T_K_F_u_n_c_t_i_o_n_:_:_c_t_y_p_e │ │ │ │ -Base::ctype ctype │ │ │ │ -DDeeffiinniittiioonn function.hh:227 │ │ │ │ -_D_u_n_e_:_:_P_1_V_T_K_F_u_n_c_t_i_o_n_:_:_p_r_e_c_i_s_i_o_n │ │ │ │ -VTK::Precision precision() const override │ │ │ │ -get output precision for the field │ │ │ │ -DDeeffiinniittiioonn function.hh:259 │ │ │ │ -_D_u_n_e_:_:_P_1_V_T_K_F_u_n_c_t_i_o_n_:_:_e_v_a_l_u_a_t_e │ │ │ │ -double evaluate(int comp, const Entity &e, const Dune::FieldVector< ctype, dim │ │ │ │ -> &xi) const override │ │ │ │ -evaluate │ │ │ │ -DDeeffiinniittiioonn function.hh:237 │ │ │ │ -_D_u_n_e_:_:_P_1_V_T_K_F_u_n_c_t_i_o_n_:_:_P_1_V_T_K_F_u_n_c_t_i_o_n │ │ │ │ -P1VTKFunction(const GV &gv, const V &v_, const std::string &s_, int ncomps=1, │ │ │ │ -int mycomp=0, VTK::Precision prec=VTK::Precision::float32) │ │ │ │ -construct from a vector and a name │ │ │ │ -DDeeffiinniittiioonn function.hh:282 │ │ │ │ -_D_u_n_e_:_:_P_1_V_T_K_F_u_n_c_t_i_o_n_:_:_n_c_o_m_p_s │ │ │ │ -int ncomps() const override │ │ │ │ -return number of components │ │ │ │ -DDeeffiinniittiioonn function.hh:231 │ │ │ │ +_D_u_n_e_:_:_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/a00800.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dataarraywriter.hh File Reference │ │ │ +dune-grid: simplex.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,78 +65,33 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ Namespaces
│ │ │ -
dataarraywriter.hh File Reference
│ │ │ +
simplex.cc 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>
│ │ │ -
│ │ │ -

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::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,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 │ │ │ │ -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_._._. │ │ │ │ -  │ │ │ │ + * _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 │ │ │ │   │ │ │ │ -********** 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/a00803.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: corneriterator.hh File Reference │ │ │ +dune-grid: interval.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,45 +65,51 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces
│ │ │ -
corneriterator.hh File Reference
│ │ │ +Namespaces | │ │ │ +Functions
│ │ │ +
interval.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 <iostream>
│ │ │ +#include <vector>
│ │ │ +#include <array>
│ │ │ +#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │
│ │ │

Go to the source code of this file.

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

│ │ │ Classes

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

│ │ │ Namespaces

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

│ │ │ +Functions

std::ostream & Dune::dgf::operator<< (std::ostream &out, const IntervalBlock::Interval &interval)
 
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -2,28 +2,33 @@ │ │ │ │ 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 │ │ │ │ -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> │ │ │ │ + * _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 │ │ │ │ +#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_:_:_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_._._. │ │ │ │ +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_:_:_V_T_K │ │ │ │ +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/a00803_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: corneriterator.hh Source File │ │ │ +dune-grid: interval.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,170 +70,210 @@ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
corneriterator.hh
│ │ │ +
interval.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>
│ │ │ +
5#ifndef DUNE_DGF_INTERVALBLOCK_HH
│ │ │ +
6#define DUNE_DGF_INTERVALBLOCK_HH
│ │ │ +
7
│ │ │ +
8#include <iostream>
│ │ │ +
9#include <vector>
│ │ │ +
10#include <array>
│ │ │ +
11
│ │ │ + │ │ │
13
│ │ │ -
14#include <dune/geometry/referenceelements.hh>
│ │ │ -
15
│ │ │ - │ │ │ +
14
│ │ │ +
15namespace Dune
│ │ │ +
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 }
│ │ │ +
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 }
│ │ │ +
│ │ │ +
77
│ │ │ +
│ │ │ +
78 const Interval &get ( int block ) const
│ │ │ +
79 {
│ │ │ +
80 return intervals_[ block ];
│ │ │ +
81 }
│ │ │ +
│ │ │ +
82
│ │ │ +
│ │ │ +
83 int numIntervals () const
│ │ │ +
84 {
│ │ │ +
85 return intervals_.size();
│ │ │ +
86 }
│ │ │ +
│ │ │ +
87
│ │ │ +
│ │ │ +
88 int dimw () const
│ │ │ +
89 {
│ │ │ +
90 return dimw_;
│ │ │ +
91 }
│ │ │ +
│ │ │ +
92
│ │ │ +
93 int getVtx ( int block, std::vector< std::vector< double > > &vtx ) const;
│ │ │ +
94 int getHexa ( int block, std::vector< std::vector< unsigned int > > &cubes,
│ │ │ +
95 int offset = 0 ) const;
│ │ │ +
96
│ │ │ +
│ │ │ +
97 int nofvtx ( int block ) const
│ │ │ +
98 {
│ │ │ +
99 const Interval &interval = get( block );
│ │ │ +
100 int n = 1;
│ │ │ +
101 for( int i = 0; i < dimw_; ++i )
│ │ │ +
102 n *= (interval.n[ i ] + 1);
│ │ │ +
103 return n;
│ │ │ +
104 }
│ │ │ +
│ │ │ +
105
│ │ │ +
│ │ │ +
106 int nofhexa ( int block ) const
│ │ │ +
107 {
│ │ │ +
108 const Interval &interval = get( block );
│ │ │ +
109 int n = 1;
│ │ │ +
110 for( int i = 0; i < dimw_; ++i )
│ │ │ +
111 n *= interval.n[ i ];
│ │ │ +
112 return n;
│ │ │
113 }
│ │ │
│ │ │ -
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
│ │ │ - │ │ │ +
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
│ │ │ + │ │ │
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
│ │ │ +
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
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -2,197 +2,220 @@ │ │ │ │ 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 │ │ │ │ + * _b_l_o_c_k_s │ │ │ │ +interval.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-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 │ │ │ │ +5#ifndef DUNE_DGF_INTERVALBLOCK_HH │ │ │ │ +6#define DUNE_DGF_INTERVALBLOCK_HH │ │ │ │ +7 │ │ │ │ +8#include │ │ │ │ +9#include │ │ │ │ +10#include │ │ │ │ +11 │ │ │ │ +12#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ 13 │ │ │ │ -14#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> │ │ │ │ +14 │ │ │ │ +15namespace _D_u_n_e │ │ │ │ +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 } │ │ │ │ +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 } │ │ │ │ +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; │ │ │ │ +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 } │ │ │ │ -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 │ │ │ │ +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 │ │ │ │ _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_:_:_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 │ │ │ │ =============================================================================== │ │ │ │ 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: corner.hh File Reference │ │ │ +dune-grid: polyhedron.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,40 +65,40 @@ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
corner.hh File Reference
│ │ │ +
polyhedron.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <dune/grid/io/file/vtk/common.hh>
│ │ │ +
#include <algorithm>
│ │ │ +#include <dune/grid/io/file/dgfparser/blocks/polygon.hh>
│ │ │
│ │ │

Go to the source code of this file.

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

│ │ │ Classes

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

│ │ │ Namespaces

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

Go to the source code of this file.

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

│ │ │ Classes

struct  Dune::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...
class  Dune::dgf::CubeBlock
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │ -

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

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,27 @@ │ │ │ │ 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 │ │ │ │ +cube.hh File Reference │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -struct   _D_u_n_e_:_:_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_._._. │ │ │ │ +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_:_:_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 │ │ │ │ +namespace   _D_u_n_e_:_:_d_g_f │ │ │ │   │ │ │ │ -********** 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/a00809_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: common.hh Source File │ │ │ +dune-grid: cube.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,384 +70,96 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
common.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
│ │ │ -
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_CUBEBLOCK_HH
│ │ │ +
6#define DUNE_DGF_CUBEBLOCK_HH
│ │ │ +
7
│ │ │ +
8#include <cassert>
│ │ │ +
9#include <iostream>
│ │ │ +
10#include <vector>
│ │ │ +
11
│ │ │ + │ │ │
13
│ │ │ -
14#include <dune/common/exceptions.hh>
│ │ │ -
15#include <dune/geometry/type.hh>
│ │ │ -
16#include <dune/common/typetraits.hh>
│ │ │ +
14
│ │ │ +
15namespace Dune
│ │ │ +
16{
│ │ │
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 };
│ │ │ +
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 }
│ │ │ +
│ │ │ +
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
│ │ │ -
│ │ │ -
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 //
│ │ │ -
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
│ │ │ +
59} // end namespace Dune
│ │ │ +
60
│ │ │ +
61#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
│ │ │ +
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 {} │ │ │ │ @@ -2,452 +2,97 @@ │ │ │ │ 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 │ │ │ │ +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 │ │ │ │ -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_CUBEBLOCK_HH │ │ │ │ +6#define DUNE_DGF_CUBEBLOCK_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#include │ │ │ │ -15#include │ │ │ │ -16#include │ │ │ │ +14 │ │ │ │ +15namespace _D_u_n_e │ │ │ │ +16{ │ │ │ │ 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 }; │ │ │ │ +18 namespace dgf │ │ │ │ +19 { │ │ │ │ +20 │ │ │ │ +_2_1 class _C_u_b_e_B_l_o_c_k │ │ │ │ +22 : public _B_a_s_i_c_B_l_o_c_k │ │ │ │ +23 { │ │ │ │ +24 unsigned int nofvtx; │ │ │ │ +25 int dimgrid; │ │ │ │ +26 bool goodline; // active line describes a vertex │ │ │ │ +27 std :: vector< unsigned int > map; // active vertex │ │ │ │ +28 int nofparams; │ │ │ │ +29 int vtxoffset; │ │ │ │ +30 │ │ │ │ +31 public: │ │ │ │ +32 _C_u_b_e_B_l_o_c_k ( std :: istream &in, int pnofvtx, int pvtxoffset, int &pdimgrid │ │ │ │ +); │ │ │ │ +33 │ │ │ │ +34 int _g_e_t ( std :: vector< std :: vector< unsigned int> > &simplex, │ │ │ │ +35 std :: vector< std :: vector< double > > ¶ms, │ │ │ │ +36 int &nofp ); │ │ │ │ +37 │ │ │ │ +38 // some information │ │ │ │ +_3_9 bool _o_k () │ │ │ │ +40 { │ │ │ │ +41 return goodline; │ │ │ │ +42 } │ │ │ │ +43 │ │ │ │ +_4_4 int _n_o_f_s_i_m_p_l_e_x () │ │ │ │ +45 { │ │ │ │ +46 return _n_o_f_l_i_n_e_s(); │ │ │ │ +47 } │ │ │ │ +48 │ │ │ │ +49 private: │ │ │ │ +50 // get the dimension of the grid │ │ │ │ +51 int getDimGrid (); │ │ │ │ +52 // get next simplex │ │ │ │ +53 bool next ( std :: vector< unsigned int > &simplex, │ │ │ │ +54 std :: vector< double > ¶m ); │ │ │ │ +55 }; │ │ │ │ +56 │ │ │ │ +57 } // end namespace dgf │ │ │ │ 58 │ │ │ │ -_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 // │ │ │ │ -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 │ │ │ │ +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_:_:_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_:_:_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/a00812.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: boundarywriter.hh File Reference │ │ │ +dune-grid: periodicfacetrans.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,43 +65,31 @@ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ Namespaces
│ │ │ -
boundarywriter.hh File Reference
│ │ │ +
periodicfacetrans.cc 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>
│ │ │ -
│ │ │ -

Go to the source code of this file.

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

│ │ │ -Classes

class  Dune::VTK::NonConformingBoundaryWriter< GV >
 
│ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │

│ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::VTK
namespace  Dune::dgf
 
│ │ │
│ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -2,27 +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 │ │ │ │ -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_:_:_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_ _> │ │ │ │ -  │ │ │ │ + * _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> │ │ │ │ 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/a00815.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: boundaryiterators.hh File Reference │ │ │ +dune-grid: polygon.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,57 +65,44 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
boundaryiterators.hh File Reference
│ │ │ +
polygon.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 <iostream>
│ │ │ +#include <vector>
│ │ │ +#include <dune/common/typetraits.hh>
│ │ │ +#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │
│ │ │

Go to the source code of this file.

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

│ │ │ Classes

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

│ │ │ Namespaces

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

Detailed Description

│ │ │ -

Functions for VTK output on the skeleton.

│ │ │ -
Author
Jö Fahlke
│ │ │ -
│ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ @@ -1 +1 @@ │ │ │ │ -utf-8 │ │ │ │ +us-ascii │ │ │ ├── html2text {} │ │ │ │ @@ -2,39 +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 │ │ │ │ -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> │ │ │ │ +polygon.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_:_:_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_ _> │ │ │ │ +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_:_:_V_T_K │ │ │ │ +namespace   _D_u_n_e_:_:_d_g_f │ │ │ │   │ │ │ │ -********** 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/a00815_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: boundaryiterators.hh Source File │ │ │ +dune-grid: polygon.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,283 +70,95 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
boundaryiterators.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
│ │ │ -
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>
│ │ │ +
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
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
17
│ │ │ -
18namespace Dune {
│ │ │ +
14namespace Dune
│ │ │ +
15{
│ │ │ +
16
│ │ │ +
17 namespace dgf
│ │ │ +
18 {
│ │ │
19
│ │ │ +
20 // PolygonBlock
│ │ │ +
21 // ------------
│ │ │
22
│ │ │ -
28 namespace VTK {
│ │ │ -
29
│ │ │ -
31
│ │ │ -
35 template<typename GV>
│ │ │ -
│ │ │ - │ │ │ -
37 : public ForwardIteratorFacade
│ │ │ -
38 < BoundaryIterator<GV>,
│ │ │ -
39 const typename GV::Intersection,
│ │ │ -
40 const typename GV::Intersection&,
│ │ │ -
41 typename std::iterator_traits<typename GV::template Codim<0>::
│ │ │ -
42 Iterator>::difference_type>
│ │ │ -
43 {
│ │ │ -
44 public:
│ │ │ -
45 // reiterator the facades typedefs here
│ │ │ - │ │ │ -
47 typedef const typename GV::Intersection Value;
│ │ │ -
48 typedef Value& Reference;
│ │ │ -
49 typedef typename GV::template Codim<0>::Iterator ElementIterator;
│ │ │ -
50 typedef typename GV::IntersectionIterator IntersectionIterator;
│ │ │ -
51 typedef typename std::iterator_traits<ElementIterator>::difference_type
│ │ │ - │ │ │ -
53
│ │ │ -
54 private:
│ │ │ -
55 typedef ForwardIteratorFacade<DerivedType, Value, Reference,
│ │ │ -
56 DifferenceType> Facade;
│ │ │ -
57
│ │ │ -
58 const GV* gv;
│ │ │ - │ │ │ -
60 std::shared_ptr<IntersectionIterator> iit;
│ │ │ -
61
│ │ │ -
62 bool valid() const {
│ │ │ -
63 // we're valid if we're passed-the-end
│ │ │ -
64 if(eit == gv->template end<0>()) return true;
│ │ │ -
65 // or if we're on a boundary
│ │ │ -
66 if((*iit)->boundary() && !(*iit)->neighbor()) return true;
│ │ │ -
67 // otherwise we're invalid
│ │ │ -
68 return false;
│ │ │ -
69 }
│ │ │ -
70
│ │ │ -
71 void basic_increment() {
│ │ │ -
72 ++*iit;
│ │ │ -
73 if(*iit == gv->iend(*eit)) {
│ │ │ -
74 iit.reset();
│ │ │ -
75 ++eit;
│ │ │ -
76 if(eit != gv->template end<0>())
│ │ │ -
77 iit.reset(new IntersectionIterator(gv->ibegin(*eit)));
│ │ │ -
78 }
│ │ │ -
79 }
│ │ │ -
80
│ │ │ -
81 public:
│ │ │ -
│ │ │ - │ │ │ -
83 return **iit;
│ │ │ -
84 }
│ │ │ -
│ │ │ -
│ │ │ -
85 bool equals(const DerivedType& other) const {
│ │ │ -
86 if(eit != other.eit) return false;
│ │ │ -
87
│ │ │ -
88 // this is a bit tricky, since we may not compare iit if we are
│ │ │ -
89 // passed-the-end
│ │ │ -
90 bool mePassedTheEnd = eit == gv->template end<0>();
│ │ │ -
91 bool otherPassedTheEnd = other.eit == other.gv->template end<0>();
│ │ │ -
92
│ │ │ -
93 // both passed-the-end => consider them equal
│ │ │ -
94 if(mePassedTheEnd && otherPassedTheEnd) return true;
│ │ │ -
95
│ │ │ -
96 // one passed the end => not equal
│ │ │ -
97 if(mePassedTheEnd || otherPassedTheEnd) return false;
│ │ │ -
98
│ │ │ -
99 // none passed-the-end => do their iit iterators match?
│ │ │ -
100 return *iit == *other.iit;
│ │ │ -
101 }
│ │ │ -
│ │ │ -
102
│ │ │ -
│ │ │ -
103 void increment() {
│ │ │ -
104 basic_increment();
│ │ │ -
105 while(!valid()) basic_increment();
│ │ │ -
106 }
│ │ │ -
│ │ │ -
107
│ │ │ -
109
│ │ │ -
│ │ │ -
113 BoundaryIterator(const GV& gv_, const ElementIterator& eit_,
│ │ │ -
114 const IntersectionIterator& iit_)
│ │ │ -
115 : gv(&gv_), eit(eit_), iit(new IntersectionIterator(iit_))
│ │ │ -
116 {
│ │ │ -
117 while(!valid()) basic_increment();
│ │ │ -
118 }
│ │ │ -
│ │ │ -
120
│ │ │ -
│ │ │ -
125 BoundaryIterator(const GV& gv_, const ElementIterator& eit_)
│ │ │ -
126 : gv(&gv_), eit(eit_)
│ │ │ -
127 {
│ │ │ -
128 if(eit != gv->template end<0>())
│ │ │ -
129 iit.reset(new IntersectionIterator(gv->ibegin(*eit)));
│ │ │ -
130
│ │ │ -
131 while(!valid()) basic_increment();
│ │ │ -
132 }
│ │ │ -
│ │ │ -
134
│ │ │ -
│ │ │ -
138 BoundaryIterator(const GV& gv_, bool end = false)
│ │ │ -
139 : gv(&gv_), eit(end ? gv->template end<0>() : gv->template begin<0>())
│ │ │ -
140 {
│ │ │ -
141 if(eit != gv->template end<0>())
│ │ │ -
142 iit.reset(new IntersectionIterator(gv->ibegin(*eit)));
│ │ │ -
143
│ │ │ -
144 while(!valid()) basic_increment();
│ │ │ -
145 }
│ │ │ -
│ │ │ -
146 };
│ │ │ -
│ │ │ -
147
│ │ │ -
148 template<typename ElementIndexSet>
│ │ │ -
│ │ │ - │ │ │ -
150 const ElementIndexSet& eis;
│ │ │ -
151
│ │ │ -
152 public:
│ │ │ -
│ │ │ -
153 IntersectionIndexSet(const ElementIndexSet& eis_)
│ │ │ -
154 : eis(eis_)
│ │ │ -
155 { }
│ │ │ -
│ │ │ -
156 };
│ │ │ +
│ │ │ + │ │ │ +
24 : public BasicBlock
│ │ │ +
25 {
│ │ │ +
│ │ │ +
26 PolygonBlock ( std::istream &in, int numVtx, int vtxOfs )
│ │ │ +
27 : BasicBlock( in, "Polygon" ), vtxBegin_( vtxOfs ), vtxEnd_( vtxOfs + numVtx )
│ │ │ +
28 {}
│ │ │
│ │ │ -
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
│ │ │ - │ │ │ - │ │ │ - │ │ │ +
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
│ │ │ + │ │ │
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 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 {} │ │ │ │ @@ -2,320 +2,104 @@ │ │ │ │ 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 │ │ │ │ + * _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 │ │ │ │ -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 │ │ │ │ +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 │ │ │ │ -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 { │ │ │ │ +14namespace _D_u_n_e │ │ │ │ +15{ │ │ │ │ +16 │ │ │ │ +17 namespace dgf │ │ │ │ +18 { │ │ │ │ 19 │ │ │ │ +20 // PolygonBlock │ │ │ │ +21 // ------------ │ │ │ │ 22 │ │ │ │ -28 namespace VTK { │ │ │ │ +_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 │ │ │ │ -31 │ │ │ │ -35 template │ │ │ │ -_3_6 class _B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r │ │ │ │ -37 : public ForwardIteratorFacade │ │ │ │ -38 < BoundaryIterator, │ │ │ │ -39 const typename GV::Intersection, │ │ │ │ -40 const typename GV::Intersection&, │ │ │ │ -41 typename std::iterator_traits:: │ │ │ │ -42 Iterator>::difference_type> │ │ │ │ -43 { │ │ │ │ -44 public: │ │ │ │ -45 // reiterator the facades typedefs here │ │ │ │ -_4_6 typedef _B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_<_G_V_> _D_e_r_i_v_e_d_T_y_p_e; │ │ │ │ -_4_7 typedef const typename GV::Intersection _V_a_l_u_e; │ │ │ │ -_4_8 typedef _V_a_l_u_e& _R_e_f_e_r_e_n_c_e; │ │ │ │ -_4_9 typedef typename GV::template Codim<0>::Iterator _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r; │ │ │ │ -_5_0 typedef typename GV::IntersectionIterator _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r; │ │ │ │ -51 typedef typename std::iterator_traits::difference_type │ │ │ │ -_5_2 _D_i_f_f_e_r_e_n_c_e_T_y_p_e; │ │ │ │ -53 │ │ │ │ -54 private: │ │ │ │ -55 typedef ForwardIteratorFacade<_D_e_r_i_v_e_d_T_y_p_e, _V_a_l_u_e, _R_e_f_e_r_e_n_c_e, │ │ │ │ -56 _D_i_f_f_e_r_e_n_c_e_T_y_p_e> Facade; │ │ │ │ -57 │ │ │ │ -58 const GV* gv; │ │ │ │ -59 _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r eit; │ │ │ │ -60 std::shared_ptr iit; │ │ │ │ -61 │ │ │ │ -62 bool valid() const { │ │ │ │ -63 // we're valid if we're passed-the-end │ │ │ │ -64 if(eit == gv->template end<0>()) return true; │ │ │ │ -65 // or if we're on a boundary │ │ │ │ -66 if((*iit)->boundary() && !(*iit)->neighbor()) return true; │ │ │ │ -67 // otherwise we're invalid │ │ │ │ -68 return false; │ │ │ │ -69 } │ │ │ │ -70 │ │ │ │ -71 void basic_increment() { │ │ │ │ -72 ++*iit; │ │ │ │ -73 if(*iit == gv->iend(*eit)) { │ │ │ │ -74 iit.reset(); │ │ │ │ -75 ++eit; │ │ │ │ -76 if(eit != gv->template end<0>()) │ │ │ │ -77 iit.reset(new _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r(gv->ibegin(*eit))); │ │ │ │ -78 } │ │ │ │ -79 } │ │ │ │ -80 │ │ │ │ -81 public: │ │ │ │ -_8_2 _R_e_f_e_r_e_n_c_e _d_e_r_e_f_e_r_e_n_c_e() const { │ │ │ │ -83 return **iit; │ │ │ │ -84 } │ │ │ │ -_8_5 bool _e_q_u_a_l_s(const _D_e_r_i_v_e_d_T_y_p_e& other) const { │ │ │ │ -86 if(eit != other.eit) return false; │ │ │ │ -87 │ │ │ │ -88 // this is a bit tricky, since we may not compare iit if we are │ │ │ │ -89 // passed-the-end │ │ │ │ -90 bool mePassedTheEnd = eit == gv->template end<0>(); │ │ │ │ -91 bool otherPassedTheEnd = other.eit == other.gv->template end<0>(); │ │ │ │ -92 │ │ │ │ -93 // both passed-the-end => consider them equal │ │ │ │ -94 if(mePassedTheEnd && otherPassedTheEnd) return true; │ │ │ │ -95 │ │ │ │ -96 // one passed the end => not equal │ │ │ │ -97 if(mePassedTheEnd || otherPassedTheEnd) return false; │ │ │ │ -98 │ │ │ │ -99 // none passed-the-end => do their iit iterators match? │ │ │ │ -100 return *iit == *other.iit; │ │ │ │ -101 } │ │ │ │ -102 │ │ │ │ -_1_0_3 void _i_n_c_r_e_m_e_n_t() { │ │ │ │ -104 basic_increment(); │ │ │ │ -105 while(!valid()) basic_increment(); │ │ │ │ -106 } │ │ │ │ -107 │ │ │ │ -109 │ │ │ │ -_1_1_3 _B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r(const GV& gv_, const _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r& eit_, │ │ │ │ -114 const _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r& iit_) │ │ │ │ -115 : gv(&gv_), eit(eit_), iit(new _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r(iit_)) │ │ │ │ -116 { │ │ │ │ -117 while(!valid()) basic_increment(); │ │ │ │ -118 } │ │ │ │ -120 │ │ │ │ -_1_2_5 _B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r(const GV& gv_, const _E_l_e_m_e_n_t_I_t_e_r_a_t_o_r& eit_) │ │ │ │ -126 : gv(&gv_), eit(eit_) │ │ │ │ -127 { │ │ │ │ -128 if(eit != gv->template end<0>()) │ │ │ │ -129 iit.reset(new _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r(gv->ibegin(*eit))); │ │ │ │ -130 │ │ │ │ -131 while(!valid()) basic_increment(); │ │ │ │ -132 } │ │ │ │ -134 │ │ │ │ -_1_3_8 _B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r(const GV& gv_, bool end = false) │ │ │ │ -139 : gv(&gv_), eit(end ? gv->template end<0>() : gv->template begin<0>()) │ │ │ │ -140 { │ │ │ │ -141 if(eit != gv->template end<0>()) │ │ │ │ -142 iit.reset(new _I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r(gv->ibegin(*eit))); │ │ │ │ -143 │ │ │ │ -144 while(!valid()) basic_increment(); │ │ │ │ -145 } │ │ │ │ -146 }; │ │ │ │ -147 │ │ │ │ -148 template │ │ │ │ -_1_4_9 class _I_n_t_e_r_s_e_c_t_i_o_n_I_n_d_e_x_S_e_t { │ │ │ │ -150 const ElementIndexSet& eis; │ │ │ │ -151 │ │ │ │ -152 public: │ │ │ │ -_1_5_3 _I_n_t_e_r_s_e_c_t_i_o_n_I_n_d_e_x_S_e_t(const ElementIndexSet& eis_) │ │ │ │ -154 : eis(eis_) │ │ │ │ -155 { } │ │ │ │ -156 }; │ │ │ │ -157 │ │ │ │ -158 template │ │ │ │ -_1_5_9 class _N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y { │ │ │ │ -160 const GV& gv; │ │ │ │ -161 │ │ │ │ -162 public: │ │ │ │ -_1_6_3 static const unsigned _d_i_m_C_e_l_l = GV::dimension-1; │ │ │ │ -164 │ │ │ │ -_1_6_5 typedef typename GV::Intersection _C_e_l_l; │ │ │ │ -_1_6_6 typedef _B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_<_G_V_> _C_e_l_l_I_t_e_r_a_t_o_r; │ │ │ │ -167 │ │ │ │ -_1_6_8 typedef _V_T_K_:_:_C_o_r_n_e_r_<_C_e_l_l_> _C_o_r_n_e_r; │ │ │ │ -_1_6_9 typedef _V_T_K_:_:_C_o_r_n_e_r_I_t_e_r_a_t_o_r_<_C_e_l_l_I_t_e_r_a_t_o_r_> _C_o_r_n_e_r_I_t_e_r_a_t_o_r; │ │ │ │ -170 │ │ │ │ -_1_7_1 typedef _C_o_r_n_e_r _P_o_i_n_t; │ │ │ │ -_1_7_2 typedef _C_o_r_n_e_r_I_t_e_r_a_t_o_r _P_o_i_n_t_I_t_e_r_a_t_o_r; │ │ │ │ -173 │ │ │ │ -_1_7_4 typedef _N_o_n_C_o_n_f_o_r_m_i_n_g_C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r_<_C_e_l_l_> _C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r; │ │ │ │ -_1_7_5 typedef typename GV::Communication _C_o_m_m_u_n_i_c_a_t_i_o_n; │ │ │ │ -176 │ │ │ │ -_1_7_7 explicit _N_o_n_C_o_n_f_o_r_m_i_n_g_B_o_u_n_d_a_r_y_I_t_e_r_a_t_o_r_F_a_c_t_o_r_y(const GV& gv_) │ │ │ │ -178 : gv(gv_) │ │ │ │ -179 { } │ │ │ │ -180 │ │ │ │ -_1_8_1 _C_e_l_l_I_t_e_r_a_t_o_r _b_e_g_i_n_C_e_l_l_s() const { │ │ │ │ -182 return _C_e_l_l_I_t_e_r_a_t_o_r(gv); │ │ │ │ -183 } │ │ │ │ -_1_8_4 _C_e_l_l_I_t_e_r_a_t_o_r _e_n_d_C_e_l_l_s() const { │ │ │ │ -185 return _C_e_l_l_I_t_e_r_a_t_o_r(gv, true); │ │ │ │ -186 } │ │ │ │ -187 │ │ │ │ -_1_8_8 _C_o_r_n_e_r_I_t_e_r_a_t_o_r _b_e_g_i_n_C_o_r_n_e_r_s() const { │ │ │ │ -189 return _C_o_r_n_e_r_I_t_e_r_a_t_o_r(_b_e_g_i_n_C_e_l_l_s(), _e_n_d_C_e_l_l_s()); │ │ │ │ -190 } │ │ │ │ -_1_9_1 _C_o_r_n_e_r_I_t_e_r_a_t_o_r _e_n_d_C_o_r_n_e_r_s() const { │ │ │ │ -192 return _C_o_r_n_e_r_I_t_e_r_a_t_o_r(_e_n_d_C_e_l_l_s()); │ │ │ │ -193 } │ │ │ │ -194 │ │ │ │ -_1_9_5 _P_o_i_n_t_I_t_e_r_a_t_o_r _b_e_g_i_n_P_o_i_n_t_s() const { return _b_e_g_i_n_C_o_r_n_e_r_s(); } │ │ │ │ -_1_9_6 _P_o_i_n_t_I_t_e_r_a_t_o_r _e_n_d_P_o_i_n_t_s() const { return _e_n_d_C_o_r_n_e_r_s(); } │ │ │ │ -197 │ │ │ │ -_1_9_8 _C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r _m_a_k_e_C_o_n_n_e_c_t_i_v_i_t_y() const { │ │ │ │ -199 return _C_o_n_n_e_c_t_i_v_i_t_y_W_r_i_t_e_r(); │ │ │ │ -200 } │ │ │ │ -_2_0_1 const _C_o_m_m_u_n_i_c_a_t_i_o_n& _c_o_m_m() const { │ │ │ │ -202 return gv.comm(); │ │ │ │ -203 } │ │ │ │ -204 }; │ │ │ │ -205 │ │ │ │ -206 } // namespace VTK │ │ │ │ -207 │ │ │ │ -209 │ │ │ │ -210} // namespace Dune │ │ │ │ -211 │ │ │ │ -212#endif // DUNE_GRID_IO_FILE_VTK_BOUNDARYITERATORS_HH │ │ │ │ -_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 │ │ │ │ -_c_o_r_n_e_r_._h_h │ │ │ │ +_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 │ │ │ │ _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_:_:_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/a00818.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: basicwriter.hh File Reference │ │ │ +dune-grid: simplexgeneration.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,52 +65,40 @@ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
basicwriter.hh File Reference
│ │ │ +
simplexgeneration.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <fstream>
│ │ │ -#include <iomanip>
│ │ │ -#include <iterator>
│ │ │ -#include <list>
│ │ │ -#include <memory>
│ │ │ -#include <sstream>
│ │ │ -#include <string>
│ │ │ -#include <dune/common/parallel/mpiguard.hh>
│ │ │ -#include <dune/common/path.hh>
│ │ │ -#include <dune/geometry/referenceelements.hh>
│ │ │ -#include <dune/grid/io/file/vtk/common.hh>
│ │ │ -#include <dune/grid/io/file/vtk/functionwriter.hh>
│ │ │ -#include <dune/grid/io/file/vtk/pvtuwriter.hh>
│ │ │ -#include <dune/grid/io/file/vtk/vtuwriter.hh>
│ │ │ +
#include <iostream>
│ │ │ +#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │
│ │ │

Go to the source code of this file.

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

│ │ │ Classes

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

│ │ │ Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::VTK
namespace  Dune::dgf
 
│ │ │
│ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -2,36 +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 │ │ │ │ -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> │ │ │ │ +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_:_:_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_ _> │ │ │ │ +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/a00818_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: basicwriter.hh Source File │ │ │ +dune-grid: simplexgeneration.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,494 +70,156 @@ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
basicwriter.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_BASICWRITER_HH
│ │ │ -
7#define DUNE_GRID_IO_FILE_VTK_BASICWRITER_HH
│ │ │ -
8
│ │ │ -
9#include <fstream>
│ │ │ -
10#include <iomanip>
│ │ │ -
11#include <iterator>
│ │ │ -
12#include <list>
│ │ │ -
13#include <memory>
│ │ │ -
14#include <sstream>
│ │ │ -
15#include <string>
│ │ │ -
16
│ │ │ -
17#include <dune/common/parallel/mpiguard.hh>
│ │ │ -
18#include <dune/common/path.hh>
│ │ │ -
19
│ │ │ -
20#include <dune/geometry/referenceelements.hh>
│ │ │ -
21
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
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;
│ │ │ -
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
│ │ │ - │ │ │ +
5#ifndef DUNE_DGF_SIMPLEXGENERATIONBLOCK_HH
│ │ │ +
6#define DUNE_DGF_SIMPLEXGENERATIONBLOCK_HH
│ │ │ +
7
│ │ │ +
8#include <iostream>
│ │ │ +
9
│ │ │ + │ │ │ +
11
│ │ │ +
12namespace Dune
│ │ │ +
13{
│ │ │ +
14
│ │ │ +
15 namespace dgf
│ │ │ +
16 {
│ │ │ +
17
│ │ │ +
│ │ │ + │ │ │ +
19 : public BasicBlock
│ │ │ +
20 {
│ │ │ +
21 double area_;
│ │ │ +
22 double angle_;
│ │ │ +
23 bool display_;
│ │ │ +
24 std::string path_;
│ │ │ +
25 bool haspath_;
│ │ │ +
26 std::string filename_;
│ │ │ +
27 std::string filetype_;
│ │ │ +
28 std::string parameter_;
│ │ │ +
29 std::string dumpfilename_;
│ │ │ +
30 bool hasfile_;
│ │ │ +
31 int dimension_;
│ │ │ +
32
│ │ │ +
33 public:
│ │ │ +
34 SimplexGenerationBlock ( std :: istream &in );
│ │ │ +
35
│ │ │ +
│ │ │ +
36 double maxArea ()
│ │ │ +
37 {
│ │ │ +
38 return area_;
│ │ │ +
39 }
│ │ │ +
│ │ │ +
40
│ │ │ +
│ │ │ +
41 double minAngle ()
│ │ │ +
42 {
│ │ │ +
43 return angle_;
│ │ │ +
44 }
│ │ │ +
│ │ │ +
45
│ │ │ +
│ │ │ +
46 bool display ()
│ │ │ +
47 {
│ │ │ +
48 return display_;
│ │ │ +
49 }
│ │ │ +
│ │ │ +
50
│ │ │ +
│ │ │ +
51 bool haspath ()
│ │ │ +
52 {
│ │ │ +
53 return haspath_;
│ │ │ +
54 }
│ │ │ +
│ │ │
55
│ │ │ -
56 const IteratorFactory& factory;
│ │ │ -
57
│ │ │ -
58 WriterList cellData;
│ │ │ -
59 WriterList pointData;
│ │ │ +
│ │ │ +
56 std :: string path ()
│ │ │ +
57 {
│ │ │ +
58 return path_;
│ │ │ +
59 }
│ │ │ +
│ │ │
60
│ │ │ - │ │ │ -
62 typename IteratorFactory::ConnectivityWriter connectivity;
│ │ │ -
63 OffsetsWriter<Cell> offsets;
│ │ │ - │ │ │ +
│ │ │ +
61 bool hasfile ()
│ │ │ +
62 {
│ │ │ +
63 return hasfile_;
│ │ │ +
64 }
│ │ │ +
│ │ │
65
│ │ │ -
66 public:
│ │ │ -
│ │ │ -
67 BasicWriter(const IteratorFactory& factory_)
│ │ │ -
68 : factory(factory_), connectivity(factory.makeConnectivity())
│ │ │ -
69 { }
│ │ │ +
│ │ │ +
66 std :: string filename ()
│ │ │ +
67 {
│ │ │ +
68 return filename_;
│ │ │ +
69 }
│ │ │
│ │ │
70
│ │ │ -
72 //
│ │ │ -
73 // Methods for adding data
│ │ │ -
74 //
│ │ │ +
│ │ │ +
71 std :: string filetype ()
│ │ │ +
72 {
│ │ │ +
73 return filetype_;
│ │ │ +
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.
│ │ │ +
76 int dimension ()
│ │ │ +
77 {
│ │ │ +
78 return dimension_;
│ │ │ +
79 }
│ │ │ +
│ │ │ +
80
│ │ │ +
│ │ │ +
81 std :: string parameter ()
│ │ │ +
82 {
│ │ │ +
83 return parameter_;
│ │ │ +
84 }
│ │ │ +
│ │ │ +
85
│ │ │ +
│ │ │ +
86 const std::string dumpFileName ( ) const
│ │ │ +
87 {
│ │ │ +
88 return dumpfilename_;
│ │ │ +
89 }
│ │ │ +
│ │ │ +
90 };
│ │ │ +
│ │ │ +
91
│ │ │ +
92 } // end namespace dgf
│ │ │ +
93
│ │ │ +
94} // end namespace Dune
│ │ │ +
95
│ │ │ +
96#endif
│ │ │ + │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │ -
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 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,605 +2,151 @@ │ │ │ │ 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 │ │ │ │ + * _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_BASICWRITER_HH │ │ │ │ -7#define DUNE_GRID_IO_FILE_VTK_BASICWRITER_HH │ │ │ │ -8 │ │ │ │ -9#include │ │ │ │ -10#include │ │ │ │ -11#include │ │ │ │ -12#include │ │ │ │ -13#include │ │ │ │ -14#include │ │ │ │ -15#include │ │ │ │ -16 │ │ │ │ -17#include │ │ │ │ -18#include │ │ │ │ -19 │ │ │ │ -20#include │ │ │ │ -21 │ │ │ │ -22#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_c_o_m_m_o_n_._h_h> │ │ │ │ -23#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_f_u_n_c_t_i_o_n_w_r_i_t_e_r_._h_h> │ │ │ │ -24#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_p_v_t_u_w_r_i_t_e_r_._h_h> │ │ │ │ -25#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_v_t_k_/_v_t_u_w_r_i_t_e_r_._h_h> │ │ │ │ -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; │ │ │ │ -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; │ │ │ │ +5#ifndef DUNE_DGF_SIMPLEXGENERATIONBLOCK_HH │ │ │ │ +6#define DUNE_DGF_SIMPLEXGENERATIONBLOCK_HH │ │ │ │ +7 │ │ │ │ +8#include │ │ │ │ +9 │ │ │ │ +10#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ +11 │ │ │ │ +12namespace _D_u_n_e │ │ │ │ +13{ │ │ │ │ +14 │ │ │ │ +15 namespace dgf │ │ │ │ +16 { │ │ │ │ +17 │ │ │ │ +_1_8 class _S_i_m_p_l_e_x_G_e_n_e_r_a_t_i_o_n_B_l_o_c_k │ │ │ │ +19 : public _B_a_s_i_c_B_l_o_c_k │ │ │ │ +20 { │ │ │ │ +21 double area_; │ │ │ │ +22 double angle_; │ │ │ │ +23 bool display_; │ │ │ │ +24 std::string path_; │ │ │ │ +25 bool haspath_; │ │ │ │ +26 std::string filename_; │ │ │ │ +27 std::string filetype_; │ │ │ │ +28 std::string parameter_; │ │ │ │ +29 std::string dumpfilename_; │ │ │ │ +30 bool hasfile_; │ │ │ │ +31 int dimension_; │ │ │ │ +32 │ │ │ │ +33 public: │ │ │ │ +34 _S_i_m_p_l_e_x_G_e_n_e_r_a_t_i_o_n_B_l_o_c_k ( std :: istream &in ); │ │ │ │ +35 │ │ │ │ +_3_6 double _m_a_x_A_r_e_a () │ │ │ │ +37 { │ │ │ │ +38 return area_; │ │ │ │ +39 } │ │ │ │ +40 │ │ │ │ +_4_1 double _m_i_n_A_n_g_l_e () │ │ │ │ +42 { │ │ │ │ +43 return angle_; │ │ │ │ +44 } │ │ │ │ +45 │ │ │ │ +_4_6 bool _d_i_s_p_l_a_y () │ │ │ │ +47 { │ │ │ │ +48 return display_; │ │ │ │ +49 } │ │ │ │ +50 │ │ │ │ +_5_1 bool _h_a_s_p_a_t_h () │ │ │ │ +52 { │ │ │ │ +53 return haspath_; │ │ │ │ +54 } │ │ │ │ 55 │ │ │ │ -56 const IteratorFactory& factory; │ │ │ │ -57 │ │ │ │ -58 WriterList cellData; │ │ │ │ -59 WriterList pointData; │ │ │ │ +_5_6 std :: string _p_a_t_h () │ │ │ │ +57 { │ │ │ │ +58 return path_; │ │ │ │ +59 } │ │ │ │ 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; │ │ │ │ +_6_1 bool _h_a_s_f_i_l_e () │ │ │ │ +62 { │ │ │ │ +63 return hasfile_; │ │ │ │ +64 } │ │ │ │ 65 │ │ │ │ -66 public: │ │ │ │ -_6_7 _B_a_s_i_c_W_r_i_t_e_r(const IteratorFactory& factory_) │ │ │ │ -68 : factory(factory_), connectivity(factory.makeConnectivity()) │ │ │ │ -69 { } │ │ │ │ +_6_6 std :: string _f_i_l_e_n_a_m_e () │ │ │ │ +67 { │ │ │ │ +68 return filename_; │ │ │ │ +69 } │ │ │ │ 70 │ │ │ │ -72 // │ │ │ │ -73 // Methods for adding data │ │ │ │ -74 // │ │ │ │ +_7_1 std :: string _f_i_l_e_t_y_p_e () │ │ │ │ +72 { │ │ │ │ +73 return filetype_; │ │ │ │ +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 │ │ │ │ -_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 │ │ │ │ -_c_o_m_m_o_n_._h_h │ │ │ │ -Common stuff for the VTKWriter. │ │ │ │ +_7_6 int _d_i_m_e_n_s_i_o_n () │ │ │ │ +77 { │ │ │ │ +78 return dimension_; │ │ │ │ +79 } │ │ │ │ +80 │ │ │ │ +_8_1 std :: string _p_a_r_a_m_e_t_e_r () │ │ │ │ +82 { │ │ │ │ +83 return parameter_; │ │ │ │ +84 } │ │ │ │ +85 │ │ │ │ +_8_6 const std::string _d_u_m_p_F_i_l_e_N_a_m_e ( ) const │ │ │ │ +87 { │ │ │ │ +88 return dumpfilename_; │ │ │ │ +89 } │ │ │ │ +90 }; │ │ │ │ +91 │ │ │ │ +92 } // end namespace dgf │ │ │ │ +93 │ │ │ │ +94} // end namespace Dune │ │ │ │ +95 │ │ │ │ +96#endif │ │ │ │ +_b_a_s_i_c_._h_h │ │ │ │ _D_u_n_e │ │ │ │ Include standard header files. │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ -_D_u_n_e_:_:_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_:_:_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/a00821.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...
 
│ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ 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/a00824.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: vtk.hh File Reference │ │ │ +dune-grid: basic.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,33 +65,33 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
vtk.hh File Reference
│ │ │ +
│ │ │ +Namespaces
│ │ │ +
basic.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.

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

│ │ │ +Namespaces

namespace  Dune
 Include standard header files.
 
namespace  Dune::dgf
 
│ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -2,19 +2,20 @@ │ │ │ │ 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 │ │ │ │ +_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/a00827.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: starcdreader.hh File Reference │ │ │ +dune-grid: simplexgeneration.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,44 +65,32 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ Namespaces
│ │ │ -
starcdreader.hh File Reference
│ │ │ +
simplexgeneration.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>
│ │ │ -
│ │ │ -

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.
 
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 │ │ │ │ -_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_o_ _t_o_ _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_._._. │ │ │ │ -  │ │ │ │ + * _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/a00830.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: printgrid.hh File Reference │ │ │ +dune-grid: boundarydom.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,44 +65,48 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Namespaces | │ │ │ -Functions
│ │ │ -
printgrid.hh File Reference
│ │ │ +Classes | │ │ │ +Namespaces
│ │ │ +
boundarydom.hh File Reference
│ │ │ │ │ │
│ │ │ -
#include <fstream>
│ │ │ +
#include <iostream>
│ │ │ #include <string>
│ │ │ -#include <dune/common/exceptions.hh>
│ │ │ -#include <dune/common/parallel/mpihelper.hh>
│ │ │ -#include <dune/grid/common/mcmgmapper.hh>
│ │ │ +#include <vector>
│ │ │ +#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │ +#include <dune/grid/io/file/dgfparser/parser.hh>
│ │ │
│ │ │

Go to the source code of this file.

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

│ │ │ +Classes

struct  Dune::dgf::DomainData
 
struct  Dune::dgf::Domain
 
class  Dune::dgf::BoundaryDomBlock
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ 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.
 
namespace  Dune::dgf
 
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -2,29 +2,32 @@ │ │ │ │ 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 │ │ │ │ + * _d_g_f_p_a_r_s_e_r │ │ │ │ + * _b_l_o_c_k_s │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +boundarydom.hh File Reference │ │ │ │ +#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 │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_p_a_r_s_e_r_._h_h> │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +CCllaasssseess │ │ │ │ +struct   _D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n_D_a_t_a │ │ │ │ +  │ │ │ │ +struct   _D_u_n_e_:_:_d_g_f_:_:_D_o_m_a_i_n │ │ │ │ +  │ │ │ │ + class   _D_u_n_e_:_:_d_g_f_:_:_B_o_u_n_d_a_r_y_D_o_m_B_l_o_c_k │ │ │ │ +  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │   Include standard header files. │ │ │ │   │ │ │ │ -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. │ │ │ │ +namespace   _D_u_n_e_:_:_d_g_f │ │ │ │   │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00830_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: printgrid.hh Source File │ │ │ +dune-grid: boundarydom.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,226 +70,419 @@ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
printgrid.hh
│ │ │ +
boundarydom.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
│ │ │ +
5#ifndef DUNE_DGF_BOUNDARYDOMBLOCK_HH
│ │ │ +
6#define DUNE_DGF_BOUNDARYDOMBLOCK_HH
│ │ │
7
│ │ │ -
8#include <fstream>
│ │ │ +
8#include <iostream>
│ │ │
9#include <string>
│ │ │ -
10
│ │ │ -
11#include <dune/common/exceptions.hh>
│ │ │ -
12#include <dune/common/parallel/mpihelper.hh>
│ │ │ - │ │ │ +
10#include <vector>
│ │ │ +
11
│ │ │ + │ │ │ + │ │ │
14
│ │ │ -
15namespace Dune {
│ │ │ -
16
│ │ │ -
17 namespace {
│ │ │ +
15
│ │ │ +
16namespace Dune
│ │ │ +
17{
│ │ │
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 }
│ │ │ +
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 // 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 }
│ │ │ +
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
│ │ │ -
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;
│ │ │ +
59 // reset data
│ │ │ +
│ │ │ +
60 void reset ( int id, BoundaryParameter parameter, bool defaultData = false )
│ │ │ +
61 {
│ │ │ +
62 id_ = id;
│ │ │ +
63 parameter_ = parameter;
│ │ │ +
64 defaultData_ = defaultData;
│ │ │ +
65 }
│ │ │ +
│ │ │ +
66
│ │ │ +
67 // returns true if data origins from default boundary domain
│ │ │ +
│ │ │ +
68 bool isDefault () const
│ │ │ +
69 {
│ │ │ +
70 return defaultData_;
│ │ │ +
71 }
│ │ │ +
│ │ │ +
72
│ │ │ +
│ │ │ +
73 friend std::ostream & operator<< ( std :: ostream & os, const DomainData & ddata )
│ │ │ +
74 {
│ │ │ +
75 os << "domain data: id = " << ddata.id();
│ │ │ +
76 if( ddata.hasParameter() )
│ │ │ +
77 os << ", parameter = " << ddata.parameter();
│ │ │ +
78 return os;
│ │ │ +
79 }
│ │ │ +
│ │ │ +
80
│ │ │ +
81 private:
│ │ │ +
82 int id_;
│ │ │ +
83 BoundaryParameter parameter_;
│ │ │ +
84 bool defaultData_;
│ │ │ +
85
│ │ │ +
86 }; // end struct DomainData
│ │ │ +
│ │ │ +
87
│ │ │ +
88
│ │ │ +
│ │ │ +
89 struct Domain
│ │ │ +
90 {
│ │ │ +
91 // dimension of world coordinates
│ │ │ +
92 const int dimensionworld;
│ │ │ +
93
│ │ │ + │ │ │ +
95
│ │ │ +
96 // constructor
│ │ │ +
│ │ │ +
97 Domain( std::vector< double > p1, std::vector< double > p2, int id, BoundaryParameter & parameter )
│ │ │ +
98 : dimensionworld( p1.size() ),
│ │ │ +
99 left_( p1 ),
│ │ │ +
100 right_( p2 ),
│ │ │ +
101 data_( id, parameter )
│ │ │ +
102 {
│ │ │ +
103 if( int( p2.size() ) != dimensionworld )
│ │ │ +
104 {
│ │ │ +
105 DUNE_THROW(DGFException,
│ │ │ +
106 "ERROR in " << *this << "!");
│ │ │ +
107 }
│ │ │ +
108 }
│ │ │ +
│ │ │
109
│ │ │ -
110 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) {
│ │ │ +
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 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");
│ │ │ +
147 left_ = other.left_;
│ │ │ +
148 right_= other.right_;
│ │ │ +
149 data_= other.data_;
│ │ │ +
150 return *this;
│ │ │ +
151 }
│ │ │ +
│ │ │
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 }
│ │ │ +
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 // 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 }
│ │ │ +
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}
│ │ │ -
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
│ │ │ +
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
│ │ │ + │ │ │ + │ │ │
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
│ │ │ +
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,259 +2,437 @@ │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_r_i_d │ │ │ │ * _i_o │ │ │ │ * _f_i_l_e │ │ │ │ -printgrid.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 │ │ │ │ LICENSE.md in module root │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ 3// -*- 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 │ │ │ │ +5#ifndef DUNE_DGF_BOUNDARYDOMBLOCK_HH │ │ │ │ +6#define DUNE_DGF_BOUNDARYDOMBLOCK_HH │ │ │ │ 7 │ │ │ │ -8#include │ │ │ │ +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> │ │ │ │ +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 │ │ │ │ -15namespace _D_u_n_e { │ │ │ │ -16 │ │ │ │ -17 namespace { │ │ │ │ +15 │ │ │ │ +16namespace _D_u_n_e │ │ │ │ +17{ │ │ │ │ 18 │ │ │ │ -19 template │ │ │ │ -20 struct ElementDataLayout │ │ │ │ -21 { │ │ │ │ -22 bool contains (Dune::GeometryType gt) │ │ │ │ +19 namespace dgf │ │ │ │ +20 { │ │ │ │ +21 │ │ │ │ +_2_2 struct _D_o_m_a_i_n_D_a_t_a │ │ │ │ 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; │ │ │ │ +_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 // 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 │ │ │ │ +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 │ │ │ │ -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; │ │ │ │ +59 // reset data │ │ │ │ +_6_0 void _r_e_s_e_t ( int id, _B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r _p_a_r_a_m_e_t_e_r, bool defaultData = false ) │ │ │ │ +61 { │ │ │ │ +62 id_ = _i_d; │ │ │ │ +63 parameter_ = _p_a_r_a_m_e_t_e_r; │ │ │ │ +64 defaultData_ = defaultData; │ │ │ │ +65 } │ │ │ │ +66 │ │ │ │ +67 // returns true if data origins from default boundary domain │ │ │ │ +_6_8 bool _i_s_D_e_f_a_u_l_t () const │ │ │ │ +69 { │ │ │ │ +70 return defaultData_; │ │ │ │ +71 } │ │ │ │ +72 │ │ │ │ +_7_3 friend std::ostream & _o_p_e_r_a_t_o_r_<_<_ ( std :: ostream & os, const _D_o_m_a_i_n_D_a_t_a & │ │ │ │ +ddata ) │ │ │ │ +74 { │ │ │ │ +75 os << "domain data: id = " << ddata._i_d(); │ │ │ │ +76 if( ddata._h_a_s_P_a_r_a_m_e_t_e_r() ) │ │ │ │ +77 os << ", parameter = " << ddata._p_a_r_a_m_e_t_e_r(); │ │ │ │ +78 return os; │ │ │ │ +79 } │ │ │ │ +80 │ │ │ │ +81 private: │ │ │ │ +82 int id_; │ │ │ │ +83 _B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r parameter_; │ │ │ │ +84 bool defaultData_; │ │ │ │ +85 │ │ │ │ +86 }; // end struct DomainData │ │ │ │ +87 │ │ │ │ +88 │ │ │ │ +_8_9 struct _D_o_m_a_i_n │ │ │ │ +90 { │ │ │ │ +91 // dimension of world coordinates │ │ │ │ +_9_2 const int _d_i_m_e_n_s_i_o_n_w_o_r_l_d; │ │ │ │ +93 │ │ │ │ +_9_4 typedef _D_G_F_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r_:_:_t_y_p_e _B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r; │ │ │ │ +95 │ │ │ │ +96 // constructor │ │ │ │ +_9_7 _D_o_m_a_i_n( std::vector< double > p1, std::vector< double > p2, int id, │ │ │ │ +_B_o_u_n_d_a_r_y_P_a_r_a_m_e_t_e_r & parameter ) │ │ │ │ +98 : _d_i_m_e_n_s_i_o_n_w_o_r_l_d( p1.size() ), │ │ │ │ +99 left_( p1 ), │ │ │ │ +100 right_( p2 ), │ │ │ │ +101 data_( id, parameter ) │ │ │ │ +102 { │ │ │ │ +103 if( int( p2.size() ) != _d_i_m_e_n_s_i_o_n_w_o_r_l_d ) │ │ │ │ +104 { │ │ │ │ +105 DUNE_THROW(_D_G_F_E_x_c_e_p_t_i_o_n, │ │ │ │ +106 "ERROR in " << *this << "!"); │ │ │ │ +107 } │ │ │ │ +108 } │ │ │ │ 109 │ │ │ │ -110 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) { │ │ │ │ +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 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"); │ │ │ │ +147 left_ = other.left_; │ │ │ │ +148 right_= other.right_; │ │ │ │ +149 data_= other.data_; │ │ │ │ +150 return *this; │ │ │ │ +151 } │ │ │ │ 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 │ │ │ │ +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 // 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 } │ │ │ │ +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} │ │ │ │ -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 │ │ │ │ +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 │ │ │ │ _D_u_n_e │ │ │ │ Include standard header files. │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ -_D_u_n_e_:_:_p_r_i_n_t_G_r_i_d │ │ │ │ -void printGrid(const GridType &grid, const Dune::MPIHelper &helper, std::string │ │ │ │ -output_file="printgrid", int size=2000, bool execute_plot=true, bool png=true, │ │ │ │ -bool local_corner_indices=true, bool local_intersection_indices=true, bool │ │ │ │ -outer_normals=true) │ │ │ │ -Print a grid as a gnuplot for testing and development. │ │ │ │ -DDeeffiinniittiioonn printgrid.hh:73 │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_s_e_c_t_i_o_n_I_t_e_r_a_t_o_r │ │ │ │ -Mesh entities of codimension 0 ("elements") allow to visit all intersections │ │ │ │ -with "neighboring" eleme... │ │ │ │ -DDeeffiinniittiioonn common/intersectioniterator.hh:83 │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_r │ │ │ │ -Mapper interface. │ │ │ │ -DDeeffiinniittiioonn mapper.hh:110 │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_r_:_:_i_n_d_e_x │ │ │ │ -Index index(const EntityType &e) const │ │ │ │ -Map entity to array index. │ │ │ │ -DDeeffiinniittiioonn mapper.hh:122 │ │ │ │ -_D_u_n_e_:_:_M_a_p_p_e_r_:_:_s_u_b_I_n_d_e_x │ │ │ │ -Index subIndex(const typename G::Traits::template Codim< 0 >::Entity &e, int i, │ │ │ │ -unsigned int codim) const │ │ │ │ -Map subentity i of codim cc of a codim 0 entity to array index. │ │ │ │ -DDeeffiinniittiioonn mapper.hh:136 │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_p_l_e_C_o_d_i_m_M_u_l_t_i_p_l_e_G_e_o_m_T_y_p_e_M_a_p_p_e_r │ │ │ │ -Implementation class for a multiple codim and multiple geometry type mapper. │ │ │ │ -DDeeffiinniittiioonn mcmgmapper.hh:129 │ │ │ │ +_D_u_n_e_:_:_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 │ │ │ │ =============================================================================== │ │ │ │ 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: gnuplot.cc File Reference │ │ │ +dune-grid: gridparameter.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,39 +65,33 @@ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Namespaces
│ │ │ -
gnuplot.cc File Reference
│ │ │ +
gridparameter.cc File Reference
│ │ │
│ │ │
│ │ │ - │ │ │ -

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

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

Go to the source code of this file.

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

│ │ │ Namespaces

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

Detailed Description

│ │ │ -

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

│ │ │ -
Author
Christian Engwer
│ │ │ -
│ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -2,23 +2,20 @@ │ │ │ │ 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 │ │ │ │ + * _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 │ │ │ │ -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_. │ │ │ │ +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. │ │ │ │   │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Implementation of gnuplot output for 1D and 2D 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/a00836.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: gnuplot.hh File Reference │ │ │ +dune-grid: boundarydom.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,58 +65,33 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ Namespaces
│ │ │ -
gnuplot.hh File Reference
│ │ │ +
boundarydom.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.

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

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

│ │ │ 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 │ │ │ │ +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. │ │ │ │   │ │ │ │ -********** 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/a00839.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: gmshwriter.hh File Reference │ │ │ +dune-grid: interval.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,48 +65,32 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ Namespaces
│ │ │ -
gmshwriter.hh File Reference
│ │ │ +
interval.cc 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>
│ │ │ -
│ │ │ -

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.
 
namespace  Dune::dgf
 
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -2,30 +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 │ │ │ │ -gmshwriter.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 <_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_._._. │ │ │ │ -  │ │ │ │ + * _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> │ │ │ │ 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/a00842.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: gmshreader.hh File Reference │ │ │ +dune-grid: dim.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,83 +65,41 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces | │ │ │ -Enumerations | │ │ │ -Functions
│ │ │ -
gmshreader.hh File Reference
│ │ │ +Namespaces
│ │ │ +
dim.hh File Reference
│ │ │ │ │ │
│ │ │ -
#include <cstdarg>
│ │ │ -#include <cstdio>
│ │ │ -#include <cstring>
│ │ │ -#include <fstream>
│ │ │ -#include <iostream>
│ │ │ -#include <map>
│ │ │ -#include <memory>
│ │ │ -#include <string>
│ │ │ -#include <tuple>
│ │ │ -#include <vector>
│ │ │ -#include <utility>
│ │ │ -#include <dune/common/exceptions.hh>
│ │ │ -#include <dune/common/fvector.hh>
│ │ │ -#include <dune/geometry/type.hh>
│ │ │ -#include <dune/grid/common/boundarysegment.hh>
│ │ │ -#include <dune/grid/common/gridfactory.hh>
│ │ │ +
#include <iostream>
│ │ │ +#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
│ │ │
│ │ │

Go to the source code of this file.

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

│ │ │ Classes

struct  Dune::GmshReaderOptions
 Options for read operation. More...
 
class  Dune::GmshReaderParser< GridType >
 dimension independent parts for GmshReaderParser More...
 
class  Dune::GmshReader< GridType >
 Read Gmsh mesh file. More...
class  Dune::dgf::DimBlock
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │ -

│ │ │ Namespaces

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

│ │ │ -Enumerations

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

│ │ │ -Functions

constexpr ReaderOptions Dune::Gmsh::operator| (ReaderOptions a, ReaderOptions b)
 composition operator for reader options
 
constexpr bool Dune::Gmsh::operator& (ReaderOptions a, ReaderOptions b)
 query operator for reader options (is b set in a)
 
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -2,60 +2,25 @@ │ │ │ │ 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 │ │ │ │ + * _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 │ │ │ │ +dim.hh File Reference │ │ │ │ #include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_b_o_u_n_d_a_r_y_s_e_g_m_e_n_t_._h_h> │ │ │ │ -#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_g_r_i_d_f_a_c_t_o_r_y_._h_h> │ │ │ │ +#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_:_:_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_._._. │ │ │ │ +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_:_:_G_m_s_h │ │ │ │ -  │ │ │ │ -EEnnuummeerraattiioonnss │ │ │ │ -enum class   _D_u_n_e_:_:_G_m_s_h_:_:_R_e_a_d_e_r_O_p_t_i_o_n_s { _D_u_n_e_:_:_G_m_s_h_:_:_R_e_a_d_e_r_O_p_t_i_o_n_s_:_:_v_e_r_b_o_s_e = 1 │ │ │ │ - , _D_u_n_e_:_:_G_m_s_h_:_:_R_e_a_d_e_r_O_p_t_i_o_n_s_:_:_i_n_s_e_r_t_B_o_u_n_d_a_r_y_S_e_g_m_e_n_t_s = 2 , _D_u_n_e_:_: │ │ │ │ - _G_m_s_h_:_:_R_e_a_d_e_r_O_p_t_i_o_n_s_:_:_r_e_a_d_E_l_e_m_e_n_t_D_a_t_a = 4 , _D_u_n_e_:_:_G_m_s_h_:_: │ │ │ │ - _R_e_a_d_e_r_O_p_t_i_o_n_s_:_:_r_e_a_d_B_o_u_n_d_a_r_y_D_a_t_a = 8 } │ │ │ │ -  Option for the Gmsh mesh file reader. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -constexpr _R_e_a_d_e_r_O_p_t_i_o_n_s  _D_u_n_e_:_:_G_m_s_h_:_:_o_p_e_r_a_t_o_r_| (_R_e_a_d_e_r_O_p_t_i_o_n_s a, _R_e_a_d_e_r_O_p_t_i_o_n_s │ │ │ │ - b) │ │ │ │ -  composition operator for reader options │ │ │ │ -  │ │ │ │ - constexpr bool  _D_u_n_e_:_:_G_m_s_h_:_:_o_p_e_r_a_t_o_r_& (_R_e_a_d_e_r_O_p_t_i_o_n_s a, _R_e_a_d_e_r_O_p_t_i_o_n_s │ │ │ │ - b) │ │ │ │ -  query operator for reader options (is b set in a) │ │ │ │ +namespace   _D_u_n_e_:_:_d_g_f │ │ │ │   │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ ├── ./usr/share/doc/libdune-grid-doc/doxygen/a00842_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: gmshreader.hh Source File │ │ │ +dune-grid: dim.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,1198 +70,79 @@ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
gmshreader.hh
│ │ │ +
dim.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>
│ │ │ -
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
│ │ │ +
5#ifndef DUNE_DGF_DIMBLOCK_HH
│ │ │ +
6#define DUNE_DGF_DIMBLOCK_HH
│ │ │ +
7
│ │ │ +
8#include <iostream>
│ │ │ +
9
│ │ │ + │ │ │ +
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
│ │ │ + │ │ │
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.
│ │ │ +
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 {} │ │ │ │ @@ -2,1334 +2,76 @@ │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_r_i_d │ │ │ │ * _i_o │ │ │ │ * _f_i_l_e │ │ │ │ -gmshreader.hh │ │ │ │ + * _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 │ │ │ │ -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 │ │ │ │ +5#ifndef DUNE_DGF_DIMBLOCK_HH │ │ │ │ +6#define DUNE_DGF_DIMBLOCK_HH │ │ │ │ +7 │ │ │ │ +8#include │ │ │ │ +9 │ │ │ │ +10#include <_d_u_n_e_/_g_r_i_d_/_i_o_/_f_i_l_e_/_d_g_f_p_a_r_s_e_r_/_b_l_o_c_k_s_/_b_a_s_i_c_._h_h> │ │ │ │ +11 │ │ │ │ +12 │ │ │ │ +13namespace _D_u_n_e │ │ │ │ +14{ │ │ │ │ +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 │ │ │ │ _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_:_:_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/a00845.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: gmsh2dgf.cc File Reference │ │ │ +dune-grid: projection.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,70 +65,76 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ +Classes | │ │ │ +Namespaces | │ │ │ Functions
│ │ │ -
gmsh2dgf.cc File Reference
│ │ │ +
projection.cc 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 <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

int main (int argc, char *argv[])
 
std::ostream & Dune::dgf::operator<< (std::ostream &out, const ProjectionBlock::Token &token)
 
│ │ │ -

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,57 @@ │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_r_i_d │ │ │ │ * _i_o │ │ │ │ * _f_i_l_e │ │ │ │ * _d_g_f_p_a_r_s_e_r │ │ │ │ - * _u_t_i_l_s │ │ │ │ -_F_u_n_c_t_i_o_n_s │ │ │ │ -gmsh2dgf.cc File Reference │ │ │ │ -a small program converting a gmsh file into a DGF file _M_o_r_e_._._. │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include <_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> │ │ │ │ + * _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 │ │ │ │ -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 │ │ │ │ + ProjectionBlock::Token &token) │ │ │ │   │ │ │ │ -********** 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/a00848.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: dgf2dgf.cc File Reference │ │ │ +dune-grid: vertex.cc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,74 +65,33 @@ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Functions
│ │ │ -
dgf2dgf.cc File Reference
│ │ │ +Namespaces
│ │ │ +
vertex.cc 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[])
 

│ │ │ +Namespaces

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

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,41 +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 │ │ │ │ - * _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[]) │ │ │ │ + * _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. │ │ │ │ +  │ │ │ │ +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/a00851.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: parser.hh File Reference │ │ │ +dune-grid: dgfidentitygrid.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,32 +72,29 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
parser.hh File Reference
│ │ │ +
dgfidentitygrid.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/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::DGFBoundaryParameter
 Contains types for additional features. More...
struct  Dune::DGFGridFactory< IdentityGrid< HostGrid > >
 
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::DGFGridInfo< IdentityGrid< HostGrid > >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -4,28 +4,24 @@ │ │ │ │ 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 │ │ │ │ -parser.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> │ │ │ │ +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_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_._._. │ │ │ │ +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_ _>_ _> │ │ │ │   │ │ │ │ - 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_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. │ │ │ │   │ │ │ │ =============================================================================== │ │ │ │ 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: parser.hh Source File │ │ │ +dune-grid: dgfidentitygrid.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,226 +74,175 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
parser.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#ifndef DUNE_DGF_DUNEGRIDFORMATPARSER_HH
│ │ │ -
6#define DUNE_DGF_DUNEGRIDFORMATPARSER_HH
│ │ │ +
5#ifndef DUNE_DGFPARSER_DGFIDENTITYGRID_HH
│ │ │ +
6#define DUNE_DGFPARSER_DGFIDENTITYGRID_HH
│ │ │
7
│ │ │ -
8#include <iostream>
│ │ │ -
9#include <string>
│ │ │ -
10#include <vector>
│ │ │ -
11#include <map>
│ │ │ -
12
│ │ │ - │ │ │ -
14
│ │ │ -
15namespace Dune
│ │ │ -
16{
│ │ │ -
17
│ │ │ -
18 class DGFPrintInfo;
│ │ │ +
8#include <dune/common/typetraits.hh>
│ │ │ +
9
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
13
│ │ │ +
14namespace Dune
│ │ │ +
15{
│ │ │ +
16
│ │ │ +
17 // DGFGridFactory for IdentityGrid
│ │ │ +
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;
│ │ │ +
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
│ │ │ -
41 static const char delimiter = ':';
│ │ │ -
42 };
│ │ │ +
│ │ │ +
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 }
│ │ │
│ │ │ -
43
│ │ │ -
│ │ │ - │ │ │ -
47 {
│ │ │ -
48 public:
│ │ │ -
49 typedef enum {Simplex,Cube,General} element_t;
│ │ │
50
│ │ │ - │ │ │ -
52
│ │ │ -
54 DuneGridFormatParser ( int rank, int size );
│ │ │ +
│ │ │ +
51 Grid *grid () const
│ │ │ +
52 {
│ │ │ +
53 return grid_;
│ │ │ +
54 }
│ │ │ +
│ │ │
55
│ │ │ -
66 static bool isDuneGridFormat ( std::istream &input );
│ │ │ +
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
│ │ │ -
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 );
│ │ │ +
68 template< int codim >
│ │ │ +
│ │ │ +
69 int numParameters () const
│ │ │ +
70 {
│ │ │ +
71 return dgfHostFactory_.template numParameters< codim >();
│ │ │ +
72 }
│ │ │ +
│ │ │ +
73
│ │ │ +
74 template< class Entity >
│ │ │ +
│ │ │ +
75 std::vector< double > &parameter ( const Entity &entity )
│ │ │ +
76 {
│ │ │ +
77 return dgfHostFactory_.parameter( HostGridAccess< Grid >::hostEntity( entity ) );
│ │ │ +
78 }
│ │ │ +
│ │ │ +
79
│ │ │ +
80 private:
│ │ │ +
81 DGFGridFactory< HostGrid > dgfHostFactory_;
│ │ │ +
82 Grid *grid_;
│ │ │ +
83 };
│ │ │ +
│ │ │ +
84
│ │ │ +
85
│ │ │ +
86
│ │ │ +
87 // DGFGridInfo for IdGrid
│ │ │ +
88 // ----------------------
│ │ │ +
89
│ │ │ +
90 template< class HostGrid >
│ │ │ +
│ │ │ +
91 struct DGFGridInfo< IdentityGrid< HostGrid > >
│ │ │ +
92 {
│ │ │ +
│ │ │ +
93 static int refineStepsForHalf ()
│ │ │ +
94 {
│ │ │ + │ │ │ +
96 }
│ │ │ +
│ │ │
97
│ │ │ -
98 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
│ │ │ - │ │ │ +
│ │ │ +
98 static double refineWeight ()
│ │ │ +
99 {
│ │ │ + │ │ │ +
101 }
│ │ │ +
│ │ │ +
102 };
│ │ │ +
│ │ │ +
103
│ │ │ +
104}
│ │ │ +
105
│ │ │ +
106#endif // #ifndef DUNE_DGFPARSER_DGFIDENTITYGRID_HH
│ │ │ +
The IdentityGrid class.
│ │ │ + │ │ │
Include standard header files.
Definition agrid.hh:60
│ │ │
Definition 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
│ │ │ +
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 {} │ │ │ │ @@ -3,331 +3,208 @@ │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _g_r_i_d │ │ │ │ * _i_o │ │ │ │ * _f_i_l_e │ │ │ │ * _d_g_f_p_a_r_s_e_r │ │ │ │ -parser.hh │ │ │ │ +dgfidentitygrid.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 4// vi: set et ts=4 sw=2 sts=2: │ │ │ │ -5#ifndef DUNE_DGF_DUNEGRIDFORMATPARSER_HH │ │ │ │ -6#define DUNE_DGF_DUNEGRIDFORMATPARSER_HH │ │ │ │ +5#ifndef DUNE_DGFPARSER_DGFIDENTITYGRID_HH │ │ │ │ +6#define DUNE_DGFPARSER_DGFIDENTITYGRID_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; │ │ │ │ +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 │ │ │ │ -_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; │ │ │ │ +20 template< class HostGrid > │ │ │ │ +_2_1 struct _D_G_F_G_r_i_d_F_a_c_t_o_r_y< _I_d_e_n_t_i_t_y_G_r_i_d< HostGrid > > │ │ │ │ +22 { │ │ │ │ +_2_3 typedef _I_d_e_n_t_i_t_y_G_r_i_d_<_ _H_o_s_t_G_r_i_d_ _> _G_r_i_d; │ │ │ │ +24 │ │ │ │ +_2_5 const static int _d_i_m_e_n_s_i_o_n = _G_r_i_d_:_:_d_i_m_e_n_s_i_o_n; │ │ │ │ +_2_6 typedef MPIHelper::MPICommunicator _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r; │ │ │ │ +_2_7 typedef typename _G_r_i_d_:_:_t_e_m_p_l_a_t_e Codim<0>::Entity _E_l_e_m_e_n_t; │ │ │ │ +_2_8 typedef typename _G_r_i_d_:_:_t_e_m_p_l_a_t_e Codim::Entity _V_e_r_t_e_x; │ │ │ │ +29 │ │ │ │ +_3_0 explicit _D_G_F_G_r_i_d_F_a_c_t_o_r_y ( std::istream &input, │ │ │ │ +31 _M_P_I_C_o_m_m_u_n_i_c_a_t_o_r comm = MPIHelper::getCommunicator() ) │ │ │ │ +32 : dgfHostFactory_( input, comm ), │ │ │ │ +33 grid_( 0 ) │ │ │ │ +34 { │ │ │ │ +35 HostGrid *hostGrid = dgfHostFactory_.grid(); │ │ │ │ +36 assert( hostGrid != 0 ); │ │ │ │ +37 grid_ = new _G_r_i_d( *hostGrid ); │ │ │ │ 38 } │ │ │ │ 39 │ │ │ │ -_4_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; │ │ │ │ +_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 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 ); │ │ │ │ +_5_1 _G_r_i_d *_g_r_i_d () const │ │ │ │ +52 { │ │ │ │ +53 return grid_; │ │ │ │ +54 } │ │ │ │ 55 │ │ │ │ -66 static bool _i_s_D_u_n_e_G_r_i_d_F_o_r_m_a_t ( std::istream &input ); │ │ │ │ +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 │ │ │ │ -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 │ │ │ │ -); │ │ │ │ +68 template< int codim > │ │ │ │ +_6_9 int _n_u_m_P_a_r_a_m_e_t_e_r_s () const │ │ │ │ +70 { │ │ │ │ +71 return dgfHostFactory_.template numParameters< codim >(); │ │ │ │ +72 } │ │ │ │ +73 │ │ │ │ +74 template< class Entity > │ │ │ │ +_7_5 std::vector< double > &_p_a_r_a_m_e_t_e_r ( const _E_n_t_i_t_y &entity ) │ │ │ │ +76 { │ │ │ │ +77 return dgfHostFactory_.parameter( _H_o_s_t_G_r_i_d_A_c_c_e_s_s_<_ _G_r_i_d_ _>_:_:_h_o_s_t_E_n_t_i_t_y( entity │ │ │ │ +) ); │ │ │ │ +78 } │ │ │ │ +79 │ │ │ │ +80 private: │ │ │ │ +81 _D_G_F_G_r_i_d_F_a_c_t_o_r_y_<_ _H_o_s_t_G_r_i_d_ _> dgfHostFactory_; │ │ │ │ +82 _G_r_i_d *grid_; │ │ │ │ +83 }; │ │ │ │ +84 │ │ │ │ +85 │ │ │ │ +86 │ │ │ │ +87 // DGFGridInfo for IdGrid │ │ │ │ +88 // ---------------------- │ │ │ │ +89 │ │ │ │ +90 template< class HostGrid > │ │ │ │ +_9_1 struct _D_G_F_G_r_i_d_I_n_f_o< _I_d_e_n_t_i_t_y_G_r_i_d< HostGrid > > │ │ │ │ +92 { │ │ │ │ +_9_3 static int _r_e_f_i_n_e_S_t_e_p_s_F_o_r_H_a_l_f () │ │ │ │ +94 { │ │ │ │ +95 return _D_G_F_G_r_i_d_I_n_f_o_<_ _H_o_s_t_G_r_i_d_ _>_:_:_r_e_f_i_n_e_S_t_e_p_s_F_o_r_H_a_l_f(); │ │ │ │ +96 } │ │ │ │ 97 │ │ │ │ -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 │ │ │ │ +_9_8 static double _r_e_f_i_n_e_W_e_i_g_h_t () │ │ │ │ +99 { │ │ │ │ +100 return _D_G_F_G_r_i_d_I_n_f_o_<_ _H_o_s_t_G_r_i_d_ _>_:_:_r_e_f_i_n_e_W_e_i_g_h_t(); │ │ │ │ +101 } │ │ │ │ +102 }; │ │ │ │ +103 │ │ │ │ +104} │ │ │ │ +105 │ │ │ │ +106#endif // #ifndef DUNE_DGFPARSER_DGFIDENTITYGRID_HH │ │ │ │ +_i_d_e_n_t_i_t_y_g_r_i_d_._h_h │ │ │ │ +The IdentityGrid class. │ │ │ │ +_h_o_s_t_g_r_i_d_a_c_c_e_s_s_._h_h │ │ │ │ _D_u_n_e │ │ │ │ Include standard header files. │ │ │ │ DDeeffiinniittiioonn agrid.hh:60 │ │ │ │ _D_u_n_e_:_:_D_G_F_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_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/a00854.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: macrogrid.hh File Reference │ │ │ +dune-grid: dgfoned.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,26 +72,34 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
macrogrid.hh File Reference
│ │ │ +
dgfoned.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <iostream>
│ │ │ -#include <dune/common/parallel/mpihelper.hh>
│ │ │ -#include <dune/grid/io/file/dgfparser/parser.hh>
│ │ │ +
#include <algorithm>
│ │ │ +#include <fstream>
│ │ │ +#include <iostream>
│ │ │ +#include <istream>
│ │ │ +#include <vector>
│ │ │ +#include <dune/common/exceptions.hh>
│ │ │ +#include <dune/grid/common/intersection.hh>
│ │ │ +#include <dune/grid/onedgrid.hh>
│ │ │ +#include "dgfparser.hh"
│ │ │
│ │ │

Go to the source code of this file.

│ │ │

│ │ │ Namespaces

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

│ │ │ Classes

class  Dune::MacroGrid
struct  Dune::DGFGridInfo< OneDGrid >
 
struct  Dune::DGFGridFactory< OneDGrid >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -4,21 +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 │ │ │ │ -macrogrid.hh File Reference │ │ │ │ +dgfoned.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_/_p_a_r_s_e_r_._h_h> │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_c_o_m_m_o_n_/_i_n_t_e_r_s_e_c_t_i_o_n_._h_h> │ │ │ │ +#include <_d_u_n_e_/_g_r_i_d_/_o_n_e_d_g_r_i_d_._h_h> │ │ │ │ +#include "_d_g_f_p_a_r_s_e_r_._h_h" │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -class   _D_u_n_e_:_:_M_a_c_r_o_G_r_i_d │ │ │ │ +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/a00854_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-grid: macrogrid.hh Source File │ │ │ +dune-grid: dgfoned.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,114 +74,291 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
macrogrid.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_MACROGRID_HH
│ │ │ -
6#define DUNE_DGF_MACROGRID_HH
│ │ │ +
5#ifndef DUNE_GRID_FILE_IO_DGFPARSER_DGFONED_HH
│ │ │ +
6#define DUNE_GRID_FILE_IO_DGFPARSER_DGFONED_HH
│ │ │
7
│ │ │ -
8
│ │ │ -
9#include <iostream>
│ │ │ -
10
│ │ │ -
11#include <dune/common/parallel/mpihelper.hh>
│ │ │ - │ │ │ -
13
│ │ │ +
8//- C++ includes
│ │ │ +
9#include <algorithm>
│ │ │ +
10#include <fstream>
│ │ │ +
11#include <iostream>
│ │ │ +
12#include <istream>
│ │ │ +
13#include <vector>
│ │ │
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 protected:
│ │ │ -
│ │ │ -
32 MacroGrid(const char* filename, MPICommunicatorType MPICOMM = MPIHelper::getCommunicator())
│ │ │ -
33 : DuneGridFormatParser( rank(MPICOMM), size(MPICOMM) )
│ │ │ -
34 , filename_(filename)
│ │ │ -
35 , MPICOMM_(MPICOMM) {}
│ │ │ -
│ │ │ +
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
│ │ │ +
34
│ │ │ +
35
│ │ │
36
│ │ │ -
│ │ │ -
38 MacroGrid(MPICommunicatorType MPICOMM = MPIHelper::getCommunicator())
│ │ │ -
39 : DuneGridFormatParser( rank(MPICOMM), size(MPICOMM) )
│ │ │ -
40 , filename_(0)
│ │ │ -
41 , MPICOMM_(MPICOMM) {}
│ │ │ -
│ │ │ +
37namespace Dune
│ │ │ +
38{
│ │ │ +
39
│ │ │ +
40 // DGFGridInfo
│ │ │ +
41 // -----------
│ │ │
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( [[may TRUNCATED DUE TO SIZE LIMIT: 10485760 bytes

│ │ │ Namespaces

namespace  Dune
 Include standard header files.